akfamily / akshare

AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
https://akshare.akfamily.xyz
MIT License
8.98k stars 1.85k forks source link

ak.get_futures_daily not working well with DCE for long historical data retrieval #3976

Closed grryaaa closed 1 year ago

grryaaa commented 1 year ago

Describe the bug When querying futures data using ak.get_futures_daily for DCE, it has such errors: ValueError: Excel file format cannot be determined, you must specify an engine manually. this error started a few weeks ago. It looks like DCE has some thing against this function.

To Reproduce

you can simply query DCE with this get_futures_daily for a whole year data, you will see this error.

Expected behavior

expected the function call will return the whole year data like with SHFE etc.

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

albertandking commented 1 year ago

get_futures_daily

you can fetch data from DCE interface, just like here: image

grryaaa commented 1 year ago

My code is as below:

import akshare as ak

get_futures_daily_df = ak.get_futures_daily(start_date="20220713", end_date="20230713", market="DCE") print(get_futures_daily_df)


it looks like if I query a long time history, it will generate the error like

image

I suspect it could be some anti-bot mechanism?

Even if I query a history like one month, it sometime will have the same error.