From e68afab9095d2c31286ad75ae0125613a6e82d93 Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Tue, 26 Apr 2016 21:41:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dvn.trader=E9=87=8CCTP?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E4=B8=8A=E6=9C=9F=E6=89=80=E5=93=81?= =?UTF-8?q?=E7=A7=8D=E7=9A=84=E6=98=A8=E4=BB=93=E8=AE=A1=E7=AE=97=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E6=98=BE=E7=A4=BA=E7=9A=84=E6=98=A8?= =?UTF-8?q?=E4=BB=93=E4=BB=A3=E8=A1=A8=E7=9A=84=E6=98=AF=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E5=B0=9A=E6=9C=AA=E5=B9=B3=E6=8E=89=E7=9A=84=E6=98=A8=E6=97=A5?= =?UTF-8?q?=E4=BB=93=E4=BD=8D=EF=BC=8C=E6=84=9F=E8=B0=A2=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?andrew361x=E7=9A=84=E8=B4=A1=E7=8C=AE!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctpGateway/ctpGateway.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vn.trader/ctpGateway/ctpGateway.py b/vn.trader/ctpGateway/ctpGateway.py index bb9aad29..afe959c2 100644 --- a/vn.trader/ctpGateway/ctpGateway.py +++ b/vn.trader/ctpGateway/ctpGateway.py @@ -655,11 +655,8 @@ class CtpTdApi(TdApi): pos.frozen = data['ShortFrozen'] # 持仓量 - if data['Position']: - pos.position = data['Position'] - - if data['YdPosition']: - pos.ydPosition = data['YdPosition'] + pos.position = data['Position'] + pos.ydPosition = data['Position'] - data['TodayPosition'] # 持仓均价 if pos.position: