bot split sex
This commit is contained in:
28
bot split/position.py
Normal file
28
bot split/position.py
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
class PositionManager:
|
||||
def __init__(self):
|
||||
self.POSITION_LIMIT = {
|
||||
"BOND": 100,
|
||||
"GS": 10,
|
||||
"MS": 10,
|
||||
"VALBZ": 100,
|
||||
"VALE": 100,
|
||||
"WFC": 100,
|
||||
"XLF": 100
|
||||
}
|
||||
self.position = {
|
||||
"BOND": 0,
|
||||
"GS": 0,
|
||||
"MS": 0,
|
||||
"VALBZ": 0,
|
||||
"VALE": 0,
|
||||
"WFC": 0,
|
||||
"XLF": 0
|
||||
}
|
||||
|
||||
def update_position(self, symbol: str, quantity: int):
|
||||
self.position[symbol] += quantity
|
||||
|
||||
def get_position(self, symbol: str):
|
||||
return self.position[symbol]
|
||||
Reference in New Issue
Block a user