Markets, Peers and Components
Here you can get a list of individual markets, stocks by country, peers and components. Please consider that all market-related methods are beta and under heavy development.
Markets
List all individual markets (stock, index, currency, crypto, commodity or bond) by a specific symbol or symbols
te.getMarketsBySymbol(symbols='aapl:us', output_type = 'df')
data = te.getMarketSnap(symbol = 'aapl:us').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/symbol/aapl:us?c=guest:guest");
te.getMarketsBySymbol(symbols=['aapl:us', 'gac:com'], output_type = 'df')
data = te.getMarketSnap(symbol = ['aapl:us', 'gac:com']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/symbol/aapl:us,gac:com?c=guest:guest");
Country stocks
List all stocks by a specific country
te.getStocksByCountry(country='united states', output_type='df')
data = te.getMarketSnap(country = 'united states').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/country/united%20states?client=guest:guest");
Peers
List all stock peers by a specific symbol
te.getMarketsPeers(symbols='aapl:us', output_type='df')
data = te.getMarketSnap(peers_symbol = 'aapl:us').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/peers/aapl:us?c=guest:guest");
Components
List all components by a specific index symbol
te.getMarketsComponents(symbols='psi20:ind', output_type='df')
te.getMarketsComponents(symbols=['indu:ind', 'psi20:ind'], output_type='df')
data = te.getMarketSnap(components_symbol = 'psi20:ind').then(function(data){
console.log(data)
});
data = te.getMarketSnap(components_symbol = ['indu:ind', 'psi20:ind']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/components/psi20:ind?c=guest:guest");
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/components/indu:ind,psi20:ind?c=guest:guest");
Response fields
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “6758:JP” |
Ticker | string | Unique ticker used by Trading Economics | “6758” |
Name | string | Indicator full name | “Sony” |
Country | string | Country name | Japan" |
Date | string | Release time and date in UTC | “2023-04-13T00:00:00” |
Type | string | Market type | “stocks” |
Decimals | number | Number of decimal places | 2.0 |
State | string | Market current state | “CLOSED” |
Last | number | Latest released value | 11900.000000000000 |
Close | number | Latest value before market close | 11900.000000000000 |
CloseDate | string | Date and time of the last close | “2023-04-13T00:00:00” |
MarketCap | number | Market Capitalization | 14684155308900.0 |
URL | string | Hyperlink at Trading Economics | “/commodity/eggs-ch” |
Importance | number | Indicator importance from 0 (lowest) to 1000 (highest) | 1000 |
DailyChange | number | Difference between last close and current price | -8.000000000000 |
DailyPercentualChange | number | Difference in percentage between last close and current price | -0.1801 |
WeeklyChange | number | Difference between last week close and current price price | 56.000000000000 |
WeeklyPercentualChange | number | Difference in percentage between last week close and current price | 1.2788 |
MonthlyChange | number | Difference between last month close and current price | -139.000000000000 |
MonthlyPercentualChange | number | Difference in percentage between last month close and current price | -3.0389 |
YearlyChange | number | Difference between last year close and current price | -15.000000000000 |
YearlyPercentualChange | number | Difference in percentage between last year close and current price | -0.3371 |
YTDChange | number | Difference between last year last close and current price | 525.000000000000 |
YTDPercentualChange | number | Difference in percentage between last year last close and current price | 13.4271 |
day_high | number | Highest value of the day | 4460.000000000000 |
day_low | number | Lowest value of the day | 4410.000000000000 |
Yesterday | number | Yesterday close | 4443.000000000000 |
LastWeek | number | Last week close | 4379.000000000000 |
LastMonth | number | Last month close | 4574.000000000000 |
LastYear | number | Last year close | 4450.000000000000 |
StartYear | number | Start year close | 3910.000000000000 |
ISIN | string | ISIN code | “US0378331005” |
Unit | string | Unit of the value | “CNY/T” |
Frequency | string | Market frequency | “Daily” |
LastUpdate | string | Time when new data was inserted or changed | “2023-04-13T18:24:00” |
Fields in ‘Country stocks’
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “6758:JP” |
Name | string | Indicator full name | “Sony” |
Country | string | Country name | Japan" |
Type | string | Market type | “stocks” |
URL | string | Hyperlink at Trading Economics | “/commodity/eggs-ch” |
Frequency | string | Market frequency | “Daily” |
Unit | string | Unit of the value | “CNY/T” |
Relationship field available only in ‘Peers’ and ‘Components’
Field | Type | Description | Example |
---|---|---|---|
Relationship | number | 0 - component, 1 - peer | 0 |