Peers
It’s also possible to get Indicators’ related peers with the API.
By ticker
Get peers data by specific ticker.
te.getPeers(ticker='CPI YOY', output_type='df')
data = te.getPeers(ticker = 'CPI YOY').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/peers/CPI%20YOY?c=guest:guest");
By country and category
Get peers data by specific country and category
/peers/country/(country)/(category)
te.getPeers(country='mexico', category='money', output_type='df')
data = te.getPeers(country = 'mexico', category = 'money').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/peers/country/mexico/money?c=guest:guest");
Series by country
Get a list of all available series by a specific country
te.getPeers(country='mexico', output_type='df')
data = te.getPeers(country = 'mexico').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/peers/country/mexico?c=guest:guest");
Response fields
Field | Type | Description | Example |
---|---|---|---|
Ticker | string | Ticker code | “CPI YOY” |
Peer | string | Related ticker | “MEXFRINRDPST” |
Relationship | number | -1 - itself, 0 - related, 1 - component, 2 - parent, 3 - derivative | 0 |
Country | string | Country name | “Mexico” |
Category | string | Category name | “Deposit Interest Rate” |
Title | string | Combination of country/category | “Deposit Interest Rate in Mexico” |
LatestValueDate | string | Date of the last released value | “2023-01-31T00:00:00” |
LatestValue | number | Last released value | 4.19 |
Source | string | Source of the data | “IMF” |
SourceURL | string | URL link of the source | “https://www.imf.org” |
Unit | string | Unit of the value | “percent” |
URL | string | Hyperlink at Trading Economics | “/mexico/deposit-interest-rate” |
CategoryGroup | string | Category group name | “Money” |
Adjustment | string | Data description, for example: base period, price adjustment, seasonality | “1982-1984=100, NSA” |
Frequency | string | Frequency of the indicator | “Monthly” |
HistoricalDataSymbol | string | Unique symbol used by Trading Economics | “UNITEDSTACONPRIINDCP” |
CreateDate | string | Time when an indicator was inserted | “2014-06-11T09:44:00” |
FirstValueDate | string | Date of the first value in the historical series | “1950-01-31T00:00:00” |
PreviousValue | number | Previously released value | 300.84 |
PreviousValueDate | string | Date of the previously released value | “2023-02-28T00:00:00” |