Open AiryKX opened 6 months ago
df_main = pro.fut_mapping(ts_code='TLL.CFX', start_date='20230608', end_date='20230613') print(df_main)
df_main = pro.fut_mapping(ts_code='TLL.CFX', start_date='20230608', end_date='20230613')
print(df_main)
ts_code trade_date mapping_ts_code 0 TLL.CFX 20230613 TL2309.CFX 1 TLL.CFX 20230612 TL2309.CFX 2 TLL.CFX 20230609 TL2306.CFX 3 TLL.CFX 20230608 TL2306.CFX
ts_code trade_date mapping_ts_code
0 TLL.CFX 20230613 TL2309.CFX
1 TLL.CFX 20230612 TL2309.CFX
2 TLL.CFX 20230609 TL2306.CFX
3 TLL.CFX 20230608 TL2306.CFX
20230609合约TL2306已经是最后一天,此时的主力合约早就切换了,而接口返回还是TL2306
ID:126115
df_main = pro.fut_mapping(ts_code='TLL.CFX', start_date='20230608', end_date='20230613')
print(df_main)
ts_code trade_date mapping_ts_code
0 TLL.CFX 20230613 TL2309.CFX
1 TLL.CFX 20230612 TL2309.CFX
2 TLL.CFX 20230609 TL2306.CFX
3 TLL.CFX 20230608 TL2306.CFX
20230609合约TL2306已经是最后一天,此时的主力合约早就切换了,而接口返回还是TL2306
ID:126115