From 397c10e219febf445a2ef4fea098ca452e7f57fe Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 1 Aug 2019 14:47:14 +0800 Subject: [PATCH] [Fix] position query pnl and price data switch --- vnpy/gateway/futu/futu_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/gateway/futu/futu_gateway.py b/vnpy/gateway/futu/futu_gateway.py index 895be70a..d692c8f2 100644 --- a/vnpy/gateway/futu/futu_gateway.py +++ b/vnpy/gateway/futu/futu_gateway.py @@ -347,8 +347,8 @@ class FutuGateway(BaseGateway): direction=Direction.LONG, volume=row["qty"], frozen=(float(row["qty"]) - float(row["can_sell_qty"])), - price=float(row["pl_val"]), - pnl=float(row["cost_price"]), + price=float(row["cost_price"]), + pnl=float(row["pl_val"]), gateway_name=self.gateway_name, )