00638.HK这只股票是2025.10.22才上市的,但是拉取的数据是从20230531开始的。
不仅仅是这一直股票,还有不少类似的,比如06600.HK,拉取的数据是从2023-03-14开始但是他20251230才上市。
是拉取数据的选项有问题,还是QMT的数据库本上数据有问题呢?
代码示例:
from xtquant import xtdata
STOCK_LIST = ["00638.HK"]
xtdata.download_history_data(
stock_code=STOCK_LIST[0],
period="1d",
)
raw_data = xtdata.get_market_data_ex(
field_list=[],
stock_list=STOCK_LIST,
period="1d"
)
print(raw_data)
输出:
{'00638.HK': time open high low close volume amount settelementPrice openInterest preClose suspendFlag
20230531 1685462400000 0.44 0.47 0.42 0.47 5298000 2432150.0 0.00 15 0.46 0
20230601 1685548800000 0.46 0.48 0.46 0.48 4000 1870.0 0.00 15 0.47 0
20230602 1685635200000 0.48 0.48 0.48 0.48 0 0.0 0.00 15 0.48 0
20230605 1685894400000 0.48 0.48 0.48 0.48 0 0.0 0.00 15 0.48 0
20230606 1685980800000 0.48 0.48 0.48 0.48 1028000 493440.0 0.00 15 0.48 0
... ... ... ... ... ... ... ... ... ... ... ...
20260324 1774281600000 11.70 12.18 11.60 12.02 1073700 12729978.0 12.02 15 11.66 0
20260325 1774368000000 13.82 14.86 12.56 12.56 18574800 252644942.0 12.56 15 12.02 0
20260326 1774454400000 12.56 12.66 11.93 12.02 3424400 41778166.0 12.02 15 12.56 0
20260327 1774540800000 12.10 12.38 11.82 12.12 2425800 29579266.0 12.12 15 12.02 0
20260330 1774800000000 11.80 12.42 11.76 12.27 1819800 21843340.0 12.27 15 12.12 0
[668 rows x 11 columns]}
|