[Mod] add INE yd position support

This commit is contained in:
vn.py 2019-10-12 11:01:40 +08:00
parent a267f63732
commit 34544bb2f3

View File

@ -500,8 +500,8 @@ class CtpTdApi(TdApi):
) )
self.positions[key] = position self.positions[key] = position
# For SHFE position data update # For SHFE and INE position data update
if position.exchange == Exchange.SHFE: if position.exchange in [Exchange.SHFE, Exchange.INE]:
if data["YdPosition"] and not data["TodayPosition"]: if data["YdPosition"] and not data["TodayPosition"]:
position.yd_volume = data["Position"] position.yd_volume = data["Position"]
# For other exchange position data update # For other exchange position data update