mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Invalid orders should be removed from pending_orders (#126)
* Invalid orders should be removed from pending_orders * If an EXCHANGE_FILL_OR_KILL order is unfilled and cancelled, confirm_order_new will not get called. This can leave lots of pending orders remaining in the order_manager. However, confirm_order_closed will get called, and therefore we should delete pending orders from that method as well. * updated CHANGELOG
This commit is contained in:
@@ -314,6 +314,7 @@ class BfxWebsocket(GenericWebsocket):
|
||||
notificationText = nInfo[7]
|
||||
if notificationType == 'ERROR':
|
||||
# self._emit('error', notificationText)
|
||||
await self._order_error_handler(data)
|
||||
self.logger.error(
|
||||
"Notification ERROR: {}".format(notificationText))
|
||||
else:
|
||||
@@ -327,6 +328,9 @@ class BfxWebsocket(GenericWebsocket):
|
||||
async def _order_closed_handler(self, data):
|
||||
await self.orderManager.confirm_order_closed(data)
|
||||
|
||||
async def _order_error_handler(self, data):
|
||||
await self.orderManager.confirm_order_error(data)
|
||||
|
||||
async def _order_update_handler(self, data):
|
||||
await self.orderManager.confirm_order_update(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user