'How do I get list of all possible tickers (and also maybe their meanings) for various dataset libraries?

so the way I usually get some dataset (in this example, US Product Price Index) from econdb library is this:

import datetime
import pandas_datareader as pdr
import pylab as plt
start=datetime.datetime(2010,1,1)
end=datetime.datetime(2021,12,31)
df = pdr.DataReader('ticker=PPIUS','econdb',start,end)

Is there any way I could view all the possible tickers (ticker=) without going to econdb.com and just by viewing some list on Python? I have the same question for World Bank database.



Solution 1:[1]

For Econdb, there is a separate api call to get all sources, but pandas_datareader does not support it (at least I could not find it in the source). You may look into inquisitor, which has a specific call to get the sources.

For the World Bank, pandas_datareader has methods to get the sources. Use pandas_datareader.wb.get_indicators() or search().

Solution 2:[2]

Currently this option is not available (you would need to find the tickers on the web, for instance, on https://www.econdb.com/tree/sections/ or https://www.econdb.com/main-indicators or in the search form). We will add a parameter to list tickers by search string in the API, and hopefully it is ready in a couple of days.

Solution 3:[3]

@hkm

You can now use the search parameter to find series through the API.

import requests
query = 'united states'
requests.get('https://www.econdb.com/api/series/?search=%s&format=json&expand=meta' % query).json()['results']

At the moment, the pandas_datareader module is failing for such queries, we will soon submit a code revision to include this functionality.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 OriolAnd
Solution 3 OriolAnd