vnpy / vnpy_ib

VeighNa框架的InteractiveBrokers交易接口
https://www.vnpy.com
MIT License
34 stars 31 forks source link

generate_symbol always uses numeric code #26

Closed tbradlo closed 9 months ago

tbradlo commented 11 months ago

generate_symbol seems to be misimplemented now:

if symbol not in self.contracts: symbol = str(ib_contract.conId)

this condition is always true because self.contracts keys contains Exchange, e.g. 'BAS-EUR-STK.SMART'. while symbol does not have exchange information

qdztxc commented 10 months ago

find same issue. certainly a bug. At least not consistent with descripton: 委托、成交、持仓信息中的合约代码,默认采用数字代码。如果用户使用字符串代码订阅过行情,则使用字符串代码。

vnpy commented 9 months ago

已经修复,非常感谢