返回列表 发布新帖

xtdata.get_stock_list_in_sector不能获取到589开头的科创基金

12 0
发表于 2 小时前 | 显示全部楼层 阅读模式

验证代码如下:

    initialize_xtquant()

    xtdata.download_sector_data()

    possible_sectors = ["沪深ETF", "沪深基金"]

    populations = set()

    for sector in possible_sectors:
        this_sector_population = xtdata.get_stock_list_in_sector(sector)
        populations.update(this_sector_population)

    print(len(populations), "589070.SH" in populations)

    print(xtdata.get_instrument_detail("589070.SH"))

得到的输出:


Using server pool: ['115.231.218.73:55310', '115.231.218.79:55310', '42.228.16.211:55300', '42.228.16.210:55300', '36.99.48.20:55300', '36.99.48.21:55300']
***** xtdata连接成功 2026-09-07 14:30:51 *****
服务信息: {'tag': 'xtquant', 'version': '1.0'}
服务地址: 127.0.0.1:58609
数据路径: D:\Documents\GitHub\PythonScripts\scripts\data\datadir
设置xtdata.enable_hello = False可隐藏此消息

2189 False
{'ExchangeID': 'SH', 'InstrumentID': '589070', 'InstrumentName': '科创芯片设计ETF天弘', 'ProductID': '', 'ProductName': '', 'ProductType': -1, 'ExchangeCode': '589070', 'UniCode': '589070', 'CreateDate': '0', 'OpenDate': '20260123', 'ExpireDate': '99999999', 'TradingDay': '20260907', 'PreClose': 1.027, 'SettlementPrice': 1.027, 'UpStopPrice': 1.232, 'DownStopPrice': 0.822, 'FloatVolume': 2021293000.0, 'TotalVolume': 2021293000.0, 'LongMarginRatio': 1.7976931348623157e+308, 'ShortMarginRatio': 1.7976931348623157e+308, 'PriceTick': 0.001, 'VolumeMultiple': 1, 'MainContract': 2147483647, 'LastVolume': 2147483647, 'InstrumentStatus': 0, 'IsTrading': False, 'IsRecent': False, 'ProductTradeQuota': 0, 'ContractTradeQuota': 0, 'ProductOpenInterestQuota': 0, 'ContractOpenInterestQuota': 0}

可以看出,589070.SH不包括在用get_stock_list_in_sector获取"沪深ETF", "沪深基金"里面,但它应该算沪深的ETF。

回复

您需要登录后才可以回帖 登录 | 立即注册

客服专线

400-080-8112

用思考的速度交易,用真诚的态度合作,我们是认真的!
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2026 迅投QMT社区 版权所有 All Rights Reserved. 京ICP备2025122616号-3
关灯 快速发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表