Indicators Peers and Components
Peers describe the relationships between different economic indicator series. A peer can be a component of an aggregate indicator (e.g., Core Inflation Rate is a component of CPI), a related series in the same domain, or a parent/derivative measure. Use these endpoints to discover how indicators connect to each other for a given country and category, or by ticker.
By country and category
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/peers/CPI%20YOY?c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
import tradingeconomics as te
te.login('your_api_key')
te.getPeers(ticker='CPI YOY')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/peers/CPI%20YOY?c=${api_key}`)
console.log(response.data)
})()
Or using our package:
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getPeers(ticker = 'CPI YOY').then(function(data){
console.log(data)
});
Using Requests:
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/peers/CPI%20YOY?c=guest:guest"))
{
request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
var response = await httpClient.SendAsync(request);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
}
The response data format can be configured by appending the &f= parameter to the URL request.
| 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 |
[
{
"Ticker": "CPI YOY",
"Peer": "UNITEDSTACONPRIINDCP",
"Relationship": 0,
"Country": "United States",
"Category": "Consumer Price Index CPI",
"Title": "United States Consumer Price Index (CPI)",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": 307.03,
"Source": "U.S. Bureau of Labor Statistics",
"SourceURL": "http://www.bls.gov",
"Unit": "points",
"URL": "/united-states/consumer-price-index-cpi",
"CategoryGroup": "Prices",
"Adjustment": "1982-1984=100, NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "UNITEDSTACONPRIINDCP",
"CreateDate": "2014-06-11T09:44:00",
"FirstValueDate": "1950-01-31T00:00:00",
"PreviousValue": 305.69,
"PreviousValueDate": "2023-07-31T00:00:00"
},
{
"Ticker": "CPI YOY",
"Peer": "UNITEDSTACORCONPRI",
"Relationship": 0,
"Country": "United States",
"Category": "Core Consumer Prices",
"Title": "United States Core Consumer Prices",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": 309.66,
"Source": "U.S. Bureau of Labor Statistics",
"SourceURL": "http://www.bls.gov",
"Unit": "points",
"URL": "/united-states/core-consumer-prices",
"CategoryGroup": "Prices",
"Adjustment": "1982-1984=100, SA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "UNITEDSTACORCONPRI",
"CreateDate": "2013-06-18T16:46:00",
"FirstValueDate": "1957-01-31T00:00:00",
"PreviousValue": 308.80,
"PreviousValueDate": "2023-07-31T00:00:00"
},
{
"Ticker": "CPI YOY",
"Peer": "USACORECPIRATE",
"Relationship": 1,
"Country": "United States",
"Category": "Core Inflation Rate",
"Title": "United States Core Inflation Rate",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": 4.30,
"Source": "U.S. Bureau of Labor Statistics",
"SourceURL": "https://www.bls.gov",
"Unit": "percent",
"URL": "/united-states/core-inflation-rate",
"CategoryGroup": "Prices",
"Adjustment": "1982-1984=100, NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "USACORECPIRATE",
"CreateDate": "2012-10-02T14:16:00",
"FirstValueDate": "1957-02-28T00:00:00",
"PreviousValue": 4.70,
"PreviousValueDate": "2023-07-31T00:00:00"
}
]
Ticker,Peer,Relationship,Country,Category,Title,LatestValueDate,LatestValue,Source,SourceURL,Unit,URL,CategoryGroup,Adjustment,Frequency,HistoricalDataSymbol,CreateDate,FirstValueDate,PreviousValue,PreviousValueDate
CPI YOY,UNITEDSTACONPRIINDCP,0,United States,Consumer Price Index CPI,United States Consumer Price Index (CPI),8/31/2023 12:00:00 AM,307.03,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,305.69,7/31/2023 12:00:00 AM
CPI YOY,UNITEDSTACORCONPRI,0,United States,Core Consumer Prices,United States Core Consumer Prices,8/31/2023 12:00:00 AM,309.66,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,308.80,7/31/2023 12:00:00 AM
CPI YOY,USACORECPIRATE,1,United States,Core Inflation Rate,United States Core Inflation Rate,8/31/2023 12:00:00 AM,4.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,4.70,7/31/2023 12:00:00 AM
<ArrayOfCountryIndicatorPeers xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CountryIndicatorPeers>
<Adjustment>1982-1984=100, NSA</Adjustment>
<Category>Consumer Price Index CPI</Category>
<CategoryGroup>Prices</CategoryGroup>
<Country>United States</Country>
<CreateDate>2014-06-11T09:44:00</CreateDate>
<FirstValueDate>1950-01-31T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>UNITEDSTACONPRIINDCP</HistoricalDataSymbol>
<LatestValue>307.03</LatestValue>
<LatestValueDate>2023-08-31T00:00:00</LatestValueDate>
<Peer>UNITEDSTACONPRIINDCP</Peer>
<PreviousValue>305.69</PreviousValue>
<PreviousValueDate>2023-07-31T00:00:00</PreviousValueDate>
<Relationship>0</Relationship>
<Source>U.S. Bureau of Labor Statistics</Source>
<SourceURL>http://www.bls.gov</SourceURL>
<Ticker>CPI YOY</Ticker>
<Title>United States Consumer Price Index (CPI)</Title>
<URL>/united-states/consumer-price-index-cpi</URL>
<Unit>points</Unit>
</CountryIndicatorPeers>
<CountryIndicatorPeers>
<Adjustment>1982-1984=100, SA</Adjustment>
<Category>Core Consumer Prices</Category>
<CategoryGroup>Prices</CategoryGroup>
<Country>United States</Country>
<CreateDate>2013-06-18T16:46:00</CreateDate>
<FirstValueDate>1957-01-31T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>UNITEDSTACORCONPRI</HistoricalDataSymbol>
<LatestValue>309.66</LatestValue>
<LatestValueDate>2023-08-31T00:00:00</LatestValueDate>
<Peer>UNITEDSTACORCONPRI</Peer>
<PreviousValue>308.80</PreviousValue>
<PreviousValueDate>2023-07-31T00:00:00</PreviousValueDate>
<Relationship>0</Relationship>
<Source>U.S. Bureau of Labor Statistics</Source>
<SourceURL>http://www.bls.gov</SourceURL>
<Ticker>CPI YOY</Ticker>
<Title>United States Core Consumer Prices</Title>
<URL>/united-states/core-consumer-prices</URL>
<Unit>points</Unit>
</CountryIndicatorPeers>
<CountryIndicatorPeers>
<Adjustment>1982-1984=100, NSA</Adjustment>
<Category>Core Inflation Rate</Category>
<CategoryGroup>Prices</CategoryGroup>
<Country>United States</Country>
<CreateDate>2012-10-02T14:16:00</CreateDate>
<FirstValueDate>1957-02-28T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>USACORECPIRATE</HistoricalDataSymbol>
<LatestValue>4.30</LatestValue>
<LatestValueDate>2023-08-31T00:00:00</LatestValueDate>
<Peer>USACORECPIRATE</Peer>
<PreviousValue>4.70</PreviousValue>
<PreviousValueDate>2023-07-31T00:00:00</PreviousValueDate>
<Relationship>1</Relationship>
<Source>U.S. Bureau of Labor Statistics</Source>
<SourceURL>https://www.bls.gov</SourceURL>
<Ticker>CPI YOY</Ticker>
<Title>United States Core Inflation Rate</Title>
<URL>/united-states/core-inflation-rate</URL>
<Unit>percent</Unit>
</CountryIndicatorPeers>
</ArrayOfCountryIndicatorPeers>
/peers/country/(country)/(category)
| 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 | inflation rate | 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 | inflation rate | 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 | inflation rate | 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 |
/peers/country/(country)/(category)?f=json
[
{
"Ticker": "MEXFRINRDPST",
"Peer": "MEXFRINRDPST",
"Relationship": -1,
"Country": "Mexico",
"Category": "Deposit Interest Rate",
"Title": "Deposit Interest Rate in Mexico",
"LatestValueDate": "2023-07-31T00:00:00",
"LatestValue": 4.95,
"Source": "IMF",
"SourceURL": "https://www.imf.org",
"Unit": "percent",
"URL": "/mexico/deposit-interest-rate",
"CategoryGroup": "inflation rate",
"Adjustment": "",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MEXFRINRDPST",
"CreateDate": "2015-12-03T14:37:00",
"FirstValueDate": "1976-01-31T00:00:00",
"PreviousValue": 4.63,
"PreviousValueDate": "2023-06-30T00:00:00"
},
{
"Ticker": "MEXICOBANBALSHE",
"Peer": "MEXICOBANBALSHE",
"Relationship": -1,
"Country": "Mexico",
"Category": "Banks Balance Sheet",
"Title": "Mexico Banks Balance Sheet",
"LatestValueDate": "2023-08-31T00:00:00",
"LatestValue": 10702998.84,
"Source": "Banco de México",
"SourceURL": "http://www.banxico.org.mx",
"Unit": "MXN Million",
"URL": "/mexico/banks-balance-sheet",
"CategoryGroup": "inflation rate",
"Adjustment": "NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MEXICOBANBALSHE",
"CreateDate": "2014-09-08T15:29:00",
"FirstValueDate": "2000-12-31T00:00:00",
"PreviousValue": 10608854.67,
"PreviousValueDate": "2023-07-31T00:00:00"
},
{
"Ticker": "MEXICOBANBALSHE",
"Peer": "MEXICOCENBANBALSHE",
"Relationship": 0,
"Country": "Mexico",
"Category": "Central Bank Balance Sheet",
"Title": "Mexico Central Bank Balance Sheet",
"LatestValueDate": "2023-09-30T00:00:00",
"LatestValue": 4204904816.00,
"Source": "Banco de México",
"SourceURL": "https://www.banxico.org.mx/",
"Unit": "MXN Thousand",
"URL": "/mexico/central-bank-balance-sheet",
"CategoryGroup": "inflation rate",
"Adjustment": "NSA",
"Frequency": "Monthly",
"HistoricalDataSymbol": "MEXICOCENBANBALSHE",
"CreateDate": "2014-08-14T17:50:00",
"FirstValueDate": "1985-12-31T00:00:00",
"PreviousValue": 4001809952.00,
"PreviousValueDate": "2023-08-31T00:00:00"
}
]
/peers/country/(country)/(category)?f=csv
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,7/31/2023 12:00:00 AM,4.95,IMF,https://www.imf.org,percent,/mexico/deposit-interest-rate,inflation rate,,Monthly,MEXFRINRDPST,12/3/2015 2:37:00 PM,1/31/1976 12:00:00 AM,4.63,6/30/2023 12:00:00 AM
MEXICOBANBALSHE,MEXICOBANBALSHE,-1,Mexico,Banks Balance Sheet,Mexico Banks Balance Sheet,8/31/2023 12:00:00 AM,10702998.84,Banco de México,http://www.banxico.org.mx,MXN Million,/mexico/banks-balance-sheet,inflation rate,NSA,Monthly,MEXICOBANBALSHE,9/8/2014 3:29:00 PM,12/31/2000 12:00:00 AM,10608854.67,7/31/2023 12:00:00 AM
MEXICOBANBALSHE,MEXICOCENBANBALSHE,0,Mexico,Central Bank Balance Sheet,Mexico Central Bank Balance Sheet,9/30/2023 12:00:00 AM,4204904816.00,Banco de México,https://www.banxico.org.mx/,MXN Thousand,/mexico/central-bank-balance-sheet,inflation rate,NSA,Monthly,MEXICOCENBANBALSHE,8/14/2014 5:50:00 PM,12/31/1985 12:00:00 AM,4001809952.00,8/31/2023 12:00:00 AM
/peers/country/(country)/(category)?f=xml
<ArrayOfCountryIndicatorPeers xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<CountryIndicatorPeers>
<Adjustment/>
<Category>Deposit Interest Rate</Category>
<CategoryGroup>inflation rate</CategoryGroup>
<Country>Mexico</Country>
<CreateDate>2015-12-03T14:37:00</CreateDate>
<FirstValueDate>1976-01-31T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>MEXFRINRDPST</HistoricalDataSymbol>
<LatestValue>4.95</LatestValue>
<LatestValueDate>2023-07-31T00:00:00</LatestValueDate>
<Peer>MEXFRINRDPST</Peer>
<PreviousValue>4.63</PreviousValue>
<PreviousValueDate>2023-06-30T00:00:00</PreviousValueDate>
<Relationship>-1</Relationship>
<Source>IMF</Source>
<SourceURL>https://www.imf.org</SourceURL>
<Ticker>MEXFRINRDPST</Ticker>
<Title>Deposit Interest Rate in Mexico</Title>
<URL>/mexico/deposit-interest-rate</URL>
<Unit>percent</Unit>
</CountryIndicatorPeers>
<CountryIndicatorPeers>
<Adjustment>NSA</Adjustment>
<Category>Banks Balance Sheet</Category>
<CategoryGroup>inflation rate</CategoryGroup>
<Country>Mexico</Country>
<CreateDate>2014-09-08T15:29:00</CreateDate>
<FirstValueDate>2000-12-31T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>MEXICOBANBALSHE</HistoricalDataSymbol>
<LatestValue>10702998.84</LatestValue>
<LatestValueDate>2023-08-31T00:00:00</LatestValueDate>
<Peer>MEXICOBANBALSHE</Peer>
<PreviousValue>10608854.67</PreviousValue>
<PreviousValueDate>2023-07-31T00:00:00</PreviousValueDate>
<Relationship>-1</Relationship>
<Source>Banco de México</Source>
<SourceURL>http://www.banxico.org.mx</SourceURL>
<Ticker>MEXICOBANBALSHE</Ticker>
<Title>Mexico Banks Balance Sheet</Title>
<URL>/mexico/banks-balance-sheet</URL>
<Unit>MXN Million</Unit>
</CountryIndicatorPeers>
<CountryIndicatorPeers>
<Adjustment>NSA</Adjustment>
<Category>Central Bank Balance Sheet</Category>
<CategoryGroup>inflation rate</CategoryGroup>
<Country>Mexico</Country>
<CreateDate>2014-08-14T17:50:00</CreateDate>
<FirstValueDate>1985-12-31T00:00:00</FirstValueDate>
<Frequency>Monthly</Frequency>
<HistoricalDataSymbol>MEXICOCENBANBALSHE</HistoricalDataSymbol>
<LatestValue>4204904816.00</LatestValue>
<LatestValueDate>2023-09-30T00:00:00</LatestValueDate>
<Peer>MEXICOCENBANBALSHE</Peer>
<PreviousValue>4001809952.00</PreviousValue>
<PreviousValueDate>2023-08-31T00:00:00</PreviousValueDate>
<Relationship>0</Relationship>
<Source>Banco de México</Source>
<SourceURL>https://www.banxico.org.mx/</SourceURL>
<Ticker>MEXICOBANBALSHE</Ticker>
<Title>Mexico Central Bank Balance Sheet</Title>
<URL>/mexico/central-bank-balance-sheet</URL>
<Unit>MXN Thousand</Unit>
</CountryIndicatorPeers>
</ArrayOfCountryIndicatorPeers>
Relationship types
The Relationship field describes what the peer is relative to the queried indicator (not the opposite direction).
| Value | Type | Description | Example |
|---|---|---|---|
| 0 | Related | The peer is a related indicator in the same domain. | US Unemployment Rate is related with US Non Farm Payrolls. |
| 1 | Component | The peer is a component of the queried indicator. | Private Unemployment Rate is a component of Unemployment Rate. |
| 2 | Parent | The peer is a parent (broader aggregate) of the queried indicator. | Unemployment Rate is a parent of Unemployment Rate among Females. |
| 3 | Derivative | The peer is a derived transformation of the queried indicator. | Unemployment Rate MoM is a derivative of Unemployment Rate YoY. |
| 4 | Underlying | The peer is the underlying base series for the queried indicator. | Unemployment Rate is the underlying of Unemployment Rate MoM. |
Response fields
| Field | Type | Description | Example |
|---|---|---|---|
| Ticker | string | Unique ticker code used by Trading Economics to identify the indicator. | “CPI YOY” |
| Peer | string | Related or comparable ticker code. | “MEXFRINRDPST” |
| Relationship | number | Numeric code indicating the peer’s relationship to the ticker (see Relationship types above). | 0 |
| Country | string | Name of the country associated with the indicator. | “Mexico” |
| Category | string | Name of the economic or financial category. | “Deposit Interest Rate” |
| Title | string | Readable title combining country and category. | “Deposit Interest Rate in Mexico” |
| LatestValueDate | string | Date of the most recently released value, in UTC. | “2023-01-31T00:00:00” |
| LatestValue | number | Most recent published value for the indicator. | 4.19 |
| Source | string | Organization or institution providing the data. | “IMF” |
| SourceURL | string | Direct URL link to the original data source (if available). | “https://www.imf.org” |
| Unit | string | Unit of measurement for the value. | “percent” |
| URL | string | Hyperlink to the indicator page on Trading Economics. | “/mexico/deposit-interest-rate” |
| CategoryGroup | string | Broad classification group for the indicator. | “Inflation Rate” |
| Adjustment | string | Description of any adjustments. | “1982-1984=100, NSA” |
| Frequency | string | Frequency at which the data is reported. | “Monthly” |
| HistoricalDataSymbol | string | Unique identifier used by Trading Economics for the data series. | “UNITEDSTACONPRIINDCP” |
| CreateDate | string | Date and time when the indicator was added to the database. | “2014-06-11T09:44:00” |
| FirstValueDate | string | Date of the first available historical observation (ISO 8601 format). | “1950-01-31T00:00:00” |
| PreviousValue | number | Value released prior to the latest one. | 300.84 |
| PreviousValueDate | string | Release date of the previous value. | “2023-02-28T00:00:00” |