-) 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:
Dario Moceri
2021-03-15 16:18:15 +01:00
committed by Robert Kowalski
parent e39ed1c491
commit 50c52b77ab
5 changed files with 10 additions and 5 deletions

View File

@@ -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]

View File

@@ -2,4 +2,4 @@
This module contains the current version of the bfxapi lib
"""
__version__ = '1.1.10'
__version__ = '1.1.11'

View File

@@ -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

View File

@@ -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()

View File

@@ -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',