fix critical
This commit is contained in:
6
state.py
6
state.py
@@ -34,8 +34,10 @@ class StateManager:
|
||||
self.positions[symbol] = self.positions.get(symbol, 0) + quantity
|
||||
|
||||
def update_bid_ask_price(self, symbol: str, bid_price: int, ask_price: int):
|
||||
self.bid_prices[symbol] = bid_price
|
||||
self.ask_prices[symbol] = ask_price
|
||||
if bid_price is not None:
|
||||
self.bid_prices[symbol] = bid_price
|
||||
if ask_price is not None:
|
||||
self.ask_prices[symbol] = ask_price
|
||||
|
||||
def get_position(self, symbol: str) -> int:
|
||||
return self.positions.get(symbol, 0)
|
||||
|
||||
Reference in New Issue
Block a user