mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
-) Removed pendingOrders from BfxWebsocket() (it was not used anywhere)
-) Fixed issue in confirm_order_new() (the keys of the dict pending_orders are the cids of the orders, and not the ids)
This commit is contained in:
committed by
Robert Kowalski
parent
e39ed1c491
commit
50c52b77ab
@@ -78,8 +78,8 @@ class OrderManager:
|
||||
async def confirm_order_new(self, raw_ws_data):
|
||||
order = Order.from_raw_order(raw_ws_data[2])
|
||||
order.set_open_state(True)
|
||||
if order.id in self.pending_orders:
|
||||
del self.pending_orders[order.id]
|
||||
if order.cid in self.pending_orders:
|
||||
del self.pending_orders[order.cid]
|
||||
self.open_orders[order.id] = order
|
||||
order.set_confirmed()
|
||||
self.bfxapi._emit('order_confirmed', order)
|
||||
@@ -270,3 +270,5 @@ class OrderManager:
|
||||
|
||||
def _gen_unique_cid(self):
|
||||
return gen_unique_cid()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user