From fd60b4db4bf4104bbf280fd81fb379021639ec6c Mon Sep 17 00:00:00 2001 From: qqqlyx Date: Wed, 10 Apr 2019 10:16:37 +0800 Subject: [PATCH 1/2] up --- vnpy/gateway/okex/okex_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/gateway/okex/okex_gateway.py b/vnpy/gateway/okex/okex_gateway.py index 9ca18217..bc5f2dfb 100644 --- a/vnpy/gateway/okex/okex_gateway.py +++ b/vnpy/gateway/okex/okex_gateway.py @@ -682,7 +682,7 @@ class OkexWebsocketApi(WebsocketClient): self.gateway.on_order(copy(order)) trade_volume = d.get("last_fill_qty", 0) - if not trade_volume: + if float(trade_volume) == 0: return self.trade_count += 1 From ee93bf709b847ef3a5531669a1355d9c4193ef5e Mon Sep 17 00:00:00 2001 From: qqqlyx Date: Wed, 10 Apr 2019 10:20:45 +0800 Subject: [PATCH 2/2] up --- vnpy/gateway/okex/okex_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/gateway/okex/okex_gateway.py b/vnpy/gateway/okex/okex_gateway.py index bc5f2dfb..10087748 100644 --- a/vnpy/gateway/okex/okex_gateway.py +++ b/vnpy/gateway/okex/okex_gateway.py @@ -682,7 +682,7 @@ class OkexWebsocketApi(WebsocketClient): self.gateway.on_order(copy(order)) trade_volume = d.get("last_fill_qty", 0) - if float(trade_volume) == 0: + if not trade_volume or float(trade_volume) == 0: return self.trade_count += 1