3

How can I download multiple symbols using Yahoo Finance API version >= 8? As you can see here I can download multiple stocks with version 7, but from version 8 onwards they changed something:

https://query2.finance.yahoo.com/v7/finance/quote?symbols=AAPL,KO

Specifically, with the latest version (11) I can add multiple modules with useful data, however I can only use one single stock for each request. How can I download multiple ones as I was able to do in the previous example?

https://query2.finance.yahoo.com/v11/finance/quoteSummary/KO?modules=summaryProfile,financialData,defaultKeyStatistics

I have tried:

https://query2.finance.yahoo.com/v11/finance/quoteSummary/AAPL,KO?modules=summaryProfile,financialData,defaultKeyStatistics

but it doesn't work.

Nerva
  • 329
  • 4
  • 13

1 Answers1

1

I haven't found anything that would indicate that downloading data for multiple tickers is still supported. However, see e.g. this "Python package whose goal is to fix the support for Yahoo! Finance for Pandas DataReader" (credit to this answer) which allows you to ask for data on multiple tickers and which then breaks it down into single-ticker requests for you.

Is there a specific reason why you need to retrieve the data on multiple tickers with one request / why using multiple requests is not acceptable?

Candamir
  • 586
  • 9
  • 22
  • 1
    Multiple tickers with one request allows me to pull around 9K stocks in a couple of seconds, whereas one ticker per request would take me a time of around 9K seconds by abiding to the usual politness limit of 1 request per second. – Nerva Nov 04 '18 at 22:23
  • That makes sense but unfortunately I'm not aware of any solution to your problem. Ps. I didn't realize that the "usual politeness limit" was 1 request / second, thanks for pointing that out to me. I had already been using a limit of 2 requests / second because imposing some limit seemed like the right thing to do but will be slowing down my code even further from now on. – Candamir Nov 04 '18 at 23:17