Peers
It’s also possible to get Indicators’ related peers with the API.
By ticker
Get peers data by specific ticker.
import tradingeconomics as te
te.login('your_api_key')
te.getPeers(ticker='CPI YOY')
const te = require('tradingeconomics');
te.login('your_api_key');
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");
Ticker | Peer | Relationship | Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CPI YOY | TEDSTACONPRIINDCP | 0 | United States | Consumer Price Index CPI | United States Consumer Price Index (CPI) | 5/31/2023 12:00:00 AM | 304.13 | U.S. Bureau of Labor Statistics | http://www.bls.gov | points | /united-states/consumer-price-index-cpi | Prices | “1982-1984=100, NSA” | Monthly | UNITEDSTACONPRIINDCP | 6/11/2014 9:44:00 AM | 1/31/1950 12:00:00 AM | 303.36 | 4/30/2023 12:00:00 AM |
CPI YOY | UNITEDSTACORCONPRI | 0 | United States | Core Consumer Prices | United States Core Consumer Prices | 5/31/2023 12:00:00 AM | 307.82 | U.S. Bureau of Labor Statistics | http://www.bls.gov | points | /united-states/core-consumer-prices | Prices | “1982-1984=100, SA” | Monthly | UNITEDSTACORCONPRI | 6/18/2013 4:46:00 PM | 1/31/1957 12:00:00 AM | 306.49 | 4/30/2023 12:00:00 AM |
CPI YOY | USACORECPIRATE | 1 | United States | Core Inflation Rate | United States Core Inflation Rate | 5/31/2023 12:00:00 AM | 5.30 | U.S. Bureau of Labor Statistics | https://www.bls.gov | percent | /united-states/core-inflation-rate | Prices | “1982-1984=100, NSA” | Monthly | USACORECPIRATE | 10/2/2012 2:16:00 PM | 2/28/1957 12:00:00 AM | 5.50 | 4/30/2023 12:00:00 AM |
By country and category
Get peers data by specific country and category
/peers/country/(country)/(category)
te.getPeers(country='mexico', category='money')
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");
Ticker | Peer | Relationship | Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MEXFRINRDPST | MEXFRINRDPST | -1 | Mexico | Deposit Interest Rate | Deposit Interest Rate in Mexico | 3/31/2023 12:00:00 AM | 4.57 | IMF | http://www.imf.org | percent | /mexico/deposit-interest-rate | Money | Monthly | MEXFRINRDPST | 12/3/2015 2:37:00 PM | 1/31/1976 12:00:00 AM | 4.43 | 2/28/2023 12:00:00 AM | |
MEXICOBANBALSHE | MEXICOBANBALSHE | -1 | Mexico | Banks Balance Sheet | Mexico Banks Balance Sheet | 4/30/2023 12:00:00 AM | 10335903.02 | Banco de México | http://www.banxico.org.mx | MXN Million | /mexico/banks-balance-sheet | Money | NSA | Monthly | MEXICOBANBALSHE | 9/8/2014 3:29:00 PM | 12/31/2000 12:00:00 AM | 10169075.64 | 3/31/2023 12:00:00 AM |
MEXICOBANBALSHE | MEXICOCENBANBALSHE | 0 | Mexico | Central Bank Balance Sheet | Mexico Central Bank Balance Sheet | 5/31/2023 12:00:00 AM | 4537124968.00 | Banco de México | http://www.banxico.org.mx/ | MXN Thousand | /mexico/central-bank-balance-sheet | Money | NSA | Monthly | MEXICOCENBANBALSHE | 8/14/2014 5:50:00 PM | 12/31/1985 12:00:00 AM | 4515771451.00 | 4/30/2023 12:00:00 AM |
Series by country
Get a list of all available series by a specific country
te.getPeers(country='mexico')
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");
Ticker | Peer | Relationship | Country | Category | Title | LatestValueDate | LatestValue | Source | SourceURL | Unit | URL | CategoryGroup | Adjustment | Frequency | HistoricalDataSymbol | CreateDate | FirstValueDate | PreviousValue | PreviousValueDate |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2738A38 | 2738A38 | -1 | Mexico | Government Budget | Mexico Government Budget | 12/31/2022 12:00:00 AM | -3.40 | Secretaria de Hacienda y Credito Publico | http://www.hacienda.gob.mx | percent of GDP | /mexico/government-budget | Government | Yearly | 2738A38 | 4/28/2014 3:47:00 PM | 12/31/1990 12:00:00 AM | -3.80 | 12/31/2021 12:00:00 AM | |
2738A38 | MEXDEBT2GDP | 0 | Mexico | Government Debt to GDP | Mexico Government Debt to GDP | 12/31/2021 12:00:00 AM | 49.60 | Secretaria de Hacienda y Credito Publico | http://www.gob.mx | percent of GDP | /mexico/government-debt-to-gdp | Government | Yearly | MEXDebt2GDP | 4/28/2014 3:47:00 PM | 12/31/1990 12:00:00 AM | 51.30 | 12/31/2020 12:00:00 AM | |
GMXN10YR | GMXN10YR | -1 | Mexico | Government Bond 10Y | Mexico Government Bond 10Y | 7/11/2023 12:00:00 AM | 8.97 | Secretaria de Hacienda y Credito Publico | percent | /mexico/government-bond-yield | Markets | Daily | GMXN10YR | 11/15/2012 11:38:00 AM | 7/31/2001 12:00:00 AM | 8.95 | 7/10/2023 12:00:00 AM |
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” |