From 34544bb2f3d89017310fb4ed7053fc170d2b57e0 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sat, 12 Oct 2019 11:01:40 +0800 Subject: [PATCH] [Mod] add INE yd position support --- vnpy/gateway/ctp/ctp_gateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index c69bb1d5..b3a55b15 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -500,8 +500,8 @@ class CtpTdApi(TdApi): ) self.positions[key] = position - # For SHFE position data update - if position.exchange == Exchange.SHFE: + # For SHFE and INE position data update + if position.exchange in [Exchange.SHFE, Exchange.INE]: if data["YdPosition"] and not data["TodayPosition"]: position.yd_volume = data["Position"] # For other exchange position data update