diff --git a/CHANGELOG b/CHANGELOG index 11a5f11..6ecf9e4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +1.1.11 +-) 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) + 1.1.10 - Fixed get_seed_candles() [backwards compatible] diff --git a/bfxapi/version.py b/bfxapi/version.py index ad61f56..210e972 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.1.10' +__version__ = '1.1.11' diff --git a/bfxapi/websockets/bfx_websocket.py b/bfxapi/websockets/bfx_websocket.py index 839b121..6f752b0 100644 --- a/bfxapi/websockets/bfx_websocket.py +++ b/bfxapi/websockets/bfx_websocket.py @@ -158,7 +158,6 @@ class BfxWebsocket(GenericWebsocket): self.API_SECRET = API_SECRET self.manageOrderBooks = manageOrderBooks self.dead_man_switch = dead_man_switch - self.pendingOrders = {} self.orderBooks = {} self.ws_capacity = ws_capacity self.channel_filter = channel_filter diff --git a/bfxapi/websockets/order_manager.py b/bfxapi/websockets/order_manager.py index c327142..bb5adba 100644 --- a/bfxapi/websockets/order_manager.py +++ b/bfxapi/websockets/order_manager.py @@ -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() + + diff --git a/setup.py b/setup.py index 557cc52..fe24427 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.1.10', + version='1.1.11', description='Official Bitfinex Python API', long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction', long_description_content_type='text/markdown',