From 5e753f5003fad65b1a0cd17160de65b69cc2e062 Mon Sep 17 00:00:00 2001 From: 1122455801 Date: Fri, 8 Mar 2019 17:25:52 +0800 Subject: [PATCH] Update futu_gateway.py --- vnpy/gateway/futu/futu_gateway.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vnpy/gateway/futu/futu_gateway.py b/vnpy/gateway/futu/futu_gateway.py index 5a875236..c12f4266 100644 --- a/vnpy/gateway/futu/futu_gateway.py +++ b/vnpy/gateway/futu/futu_gateway.py @@ -343,7 +343,7 @@ class FutuGateway(BaseGateway): symbol=symbol, exchange=exchange, direction=Direction.LONG, - volume=float(row["qty"]), + volume=row["qty"], frozen=(float(row["qty"]) - float(row["can_sell_qty"])), price=float(row["pl_val"]), pnl=float(row["cost_price"]), @@ -463,8 +463,8 @@ class FutuGateway(BaseGateway): orderid=str(row["order_id"]), direction=DIRECTION_FUTU2VT[row["trd_side"]], price=float(row["price"]), - volume=float(row["qty"]), - traded=float(row["dealt_qty"]), + volume=row["qty"], + traded=row["dealt_qty"], status=STATUS_FUTU2VT[row["order_status"]], time=row["create_time"].split(" ")[-1], gateway_name=self.gateway_name, @@ -490,7 +490,7 @@ class FutuGateway(BaseGateway): tradeid=tradeid, orderid=row["order_id"], price=float(row["price"]), - volume=float(row["qty"]), + volume=row["qty"], time=row["create_time"].split(" ")[-1], gateway_name=self.gateway_name, )