From c563afd8b57a8e6b15e0286c1ed3d0170c2992b0 Mon Sep 17 00:00:00 2001 From: 1122455801 Date: Sun, 5 May 2019 10:18:00 +0800 Subject: [PATCH] Update okexf_gateway.py --- vnpy/gateway/okexf/okexf_gateway.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vnpy/gateway/okexf/okexf_gateway.py b/vnpy/gateway/okexf/okexf_gateway.py index 24aea8f5..26c1c87a 100644 --- a/vnpy/gateway/okexf/okexf_gateway.py +++ b/vnpy/gateway/okexf/okexf_gateway.py @@ -700,10 +700,10 @@ class OkexfWebsocketApi(WebsocketClient): if not tick: return - tick.last_price = d["last"] - tick.high_price = d["high_24h"] - tick.low_price = d["low_24h"] - tick.volume = d["volume_24h"] + tick.last_price = float(d["last"]) + tick.high_price = float(d["high_24h"]) + tick.low_price = float(d["low_24h"]) + tick.volume = float(d["volume_24h"]) tick.datetime = utc_to_local(d["timestamp"]) self.gateway.on_tick(copy(tick))