Update futu_gateway.py

This commit is contained in:
1122455801 2019-03-08 17:25:52 +08:00
parent 63d88de2b3
commit 5e753f5003

View File

@ -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,
)