[Fix] bug in on_order of BitmexGateway

This commit is contained in:
vn.py 2019-11-13 09:52:46 +08:00
parent 4c00d191eb
commit 553c4ac858

View File

@ -707,14 +707,15 @@ class BitmexWebsocketApi(WebsocketClient):
if "ordStatus" not in d:
return
side = d.get("side", "")
if not side:
return
# Update local order data
sysid = d["orderID"]
order = self.orders.get(sysid, None)
if not order:
# Filter data with no trading side info
side = d.get("side", "")
if not side:
return
if d["clOrdID"]:
orderid = d["clOrdID"]
else: