Remove callback by cid

This commit is contained in:
Jacob Plaster
2018-12-18 15:09:40 +00:00
parent 35c0cdc440
commit 0bcbe5bc1f

View File

@@ -176,8 +176,7 @@ class OrderManager:
@param onClose: function called when the bitfinex websocket receives signal that the order
was closed due to being filled or cancelled
"""
order = self.open_orders[orderId]
self._create_callback(order.cId, onConfirm=onConfirm, onClose=onClose)
self._create_callback(orderId, onConfirm=onConfirm, onClose=onClose)
payload = {"id": orderId}
if price is not None:
payload['price'] = str(price)