From 8b624df2483b24f9aa6a3f706d43f28a352b54f8 Mon Sep 17 00:00:00 2001 From: 1122455801 Date: Fri, 14 Jun 2019 13:15:57 +0800 Subject: [PATCH] Update bitmex_gateway.py --- vnpy/gateway/bitmex/bitmex_gateway.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vnpy/gateway/bitmex/bitmex_gateway.py b/vnpy/gateway/bitmex/bitmex_gateway.py index 72988f56..4de3a33b 100644 --- a/vnpy/gateway/bitmex/bitmex_gateway.py +++ b/vnpy/gateway/bitmex/bitmex_gateway.py @@ -661,6 +661,9 @@ class BitmexWebsocketApi(WebsocketClient): def on_position(self, d): """""" + if not d["currentQty"]: + return + position = PositionData( symbol=d["symbol"], exchange=Exchange.BITMEX,