Ticker codes for all stocks in S&P 500 and Nasdaq 100 from API?

Hey EODHD team. Kinda stuck here. Where can I find the ticker codes for all stocks in S&P 500 and Nasdaq 100₽

1 Like

Hey, I can help ya, use index constituents api:

hey @Jason

say i want to know the constituents for the s&p500
how do i know what code to use on https://eodhd.com/api/fundamentals/GSPC.INDX?api_token=&fmt=json
i can tell that for s&p500 it would be “GSPC.INDX” as that is what’s used for the example in the docs, but how would one go about learning (fetching) a list of codes for the indices?
i have been looking for them on the “exchange symbols list” (Exchanges API. Get List of Tickers | EODHD APIs Documentation) and although i can see etfs, i cannot identify indices

Hi @medecau,

The correct code is GSPC.INDX, and your request works well. I recommend hiding the API key since we’re now in a public forum.

For fetching a list of tickers, you can use the Exchanges API with a request like this:
https://eodhd.com/api/exchange-symbol-list/INDX?api_token=YOUR-API-TOKEN&fmt=json

1 Like

thanks for the quick reply
in retrospect i should have guessed that INDX would be the “exchange” where these get listed

sorry about the api key

You’re welcome! Feel free to reach out to the support team for quick assistance via web chat or email at support@eodhistoricaldata.com.