parsing str to symbol when adding new positions

This commit is contained in:
Giulio De Pasquale 2020-12-14 14:49:51 +00:00
parent 3e45135809
commit d1e9be15a1

View File

@ -42,8 +42,8 @@ class BfxBot:
self.status[symbol].set_price(self.ticker.current_tick, last_price) self.status[symbol].set_price(self.ticker.current_tick, last_price)
# updating positions # updating positions
for p in [x for x in active_positions if x.symbol == symbol]: for p in [x for x in active_positions if x.symbol == str(symbol)]:
await self.status[p.symbol].add_position(p) await self.status[Symbol.from_str(p.symbol)].add_position(p)
# # updating orders # # updating orders
# active_orders = await self.bfx.get_active_orders(symbol) # active_orders = await self.bfx.get_active_orders(symbol)