Files
JSETC/bot split/position.py
2026-05-09 15:32:14 +09:00

28 lines
642 B
Python

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]