Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alpha Vantage API: How do I get stock market indexes?

I'm trying to get data for these indexes SPX,COMP,DJIA,DJT,RUT,DJU using this Python library

I'm doing this

data, meta_data = ts.get_intraday(symbol='DJIA',interval='60min', outputsize='full')

but I get

ValueError: Error getting data from the api, no return was given.

If I change DJIA to AAPL I get a response.
How do I get data for the indexes mentioned above? Is there another API that I can use?
I tried Yahoo Finance API but could only retrieve data for DJIA,DJT, DJU

like image 894
MalcolmInTheCenter Avatar asked Sep 08 '25 18:09

MalcolmInTheCenter


1 Answers

I heard, Alpha vantage doesn't support indices.. but you can use ETFs that track same indices.

like image 69
Pica Avatar answered Sep 10 '25 09:09

Pica