问题
today I tried to find an API or a possibility to get data for specific securities (stocks, ETFs, etc.). Unfortunately the package 'yfinance' only allows you get data based on the securitie's name (e. g. MSFT for Microsoft's shares).
回答1:
After quite a lot of research I found the package investpy which allows you to first find a security, for example an ETF:
investpy.search_etfs(by="isin", value="my_isin")
After that, using the name of your ETF you can also get / download its daily data:
investpy.get_etf_recent_data(etf="etf_name", country="my_country")
来源:https://stackoverflow.com/questions/60799442/using-python-get-download-daily-finance-market-data-stocks-etfs-etc-by-t