tqsdk-python icon indicating copy to clipboard operation
tqsdk-python copied to clipboard

[email protected]的主力合约错误

Open baoshuang opened this issue 5 years ago • 1 comments

In [3]: q=api.get_quote("[email protected]")

In [4]: q Out[4]: <tqsdk.objs.Quote object at 0x0000025122AC7CC8>, D({'datetime': '2020-09-14 14:59:59.000002', 'ask_price1': nan, 'ask_volume1': 0, 'bid_price1': nan, 'bid_volume1': 0, 'ask_price2': nan, 'ask_volume2': 0, 'bid_price2': nan, 'bid_volume2': 0, 'ask_price3': nan, 'ask_volume3': 0, 'bid_price3': nan, 'bid_volume3': 0, 'ask_price4': nan, 'ask_volume4': 0, 'bid_price4': nan, 'bid_volume4': 0, 'ask_price5': nan, 'ask_volume5': 0, 'bid_price5': nan, 'bid_volume5': 0, 'last_price': nan, 'highest': nan, 'lowest': nan, 'open': nan, 'close': nan, 'average': nan, 'volume': 0, 'amount': 0.0, 'open_interest': 0, 'settlement': 2902.0, 'upper_limit': 3048.0, 'lower_limit': 2756.0, 'pre_open_interest': 0, 'pre_settlement': 2902.0, 'pre_close': 2902.0, 'price_tick': 1, 'price_decs': 0, 'volume_multiple': 20, 'max_limit_order_volume': 0, 'max_market_order_volume': 0, 'min_limit_order_volume': 0, 'min_market_order_volume': 0, 'underlying_symbol': 'CZCE.RI009', 'strike_price': nan, 'ins_class': 'FUTURE_CONT', 'instrument_id': '[email protected]', 'expired': False, 'trading_time': <tqsdk.objs.TradingTime object at 0x0000025122AC77C8>, D({'day': [], 'night': []}), 'expire_datetime': nan, 'delivery_month': 0, 'delivery_year': 0, 'option_class': '', 'product_id': ''})

In [5]: q.underlying_symbol Out[5]: 'CZCE.RI009'

In [6]: ri009=api.get_quote("CZCE.RI009") In [8]: ri009.expired Out[8]: True

baoshuang avatar Sep 15 '20 02:09 baoshuang

文华当前RI主力是RI2011

baoshuang avatar Sep 15 '20 02:09 baoshuang