Skip to content

Commit fed071c

Browse files
committed
Update sec_gateway.py
1 parent f9d209d commit fed071c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vnpy/gateway/sec/sec_gateway.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ def onRspStockQryStockStaticInfo(self, data: dict, error: dict, last: bool) -> N
849849
size=data["tradeUnit"],
850850
pricetick=0.001,
851851
product=Product.EQUITY,
852+
net_position=True,
852853
gateway_name=self.gateway_name
853854
)
854855
self.gateway.on_contract(contract)
@@ -921,7 +922,7 @@ def onRspStockQryPosition(self, data: dict, error: dict, last: bool) -> None:
921922
pos = PositionData(
922923
symbol=data["securityID"],
923924
exchange=EXCHANGE_SEC2VT[data["exchangeID"]],
924-
direction=Direction.NEt,
925+
direction=Direction.NET,
925926
volume=data["totalQty"],
926927
price=data["avgPositionPrice"],
927928
gateway_name=self.gateway_name

0 commit comments

Comments
 (0)