Search
The API provides search functionality for Markets. By Default, the search will look into the categories: Indexes, markets (stocks), bonds, and commodities. Please consider that all market-related methods are beta and under heavy development.
By country
Search for market data by a specific country
te.getMarketsSearch(country='united states', output_type='df')
data = te.getMarketSnap(search_term = 'united states').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/search/united%20states?c=guest:guest");
By country and category
Search for market data by a specific country and category (or categories)
Categories available: index, markets, forex, bond and commodity.
/markets/search/{country}?category={category}
te.getMarketsSearch(country='united states', category = 'index', output_type='df')
te.getMarketsSearch(country='united states', category = ['index', 'markets'],
output_type='df')
data = te.getMarketSnap(search_term = 'united states',
category = 'index').then(function(data){
console.log(data)
});
data = te.getMarketSnap(search_term = 'united states',
category = ['index', 'markets']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/search/united%20states?c=guest:guest&category=index");
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/search/united%20states?c=guest:guest&category=index,markets");
By term
Search for market data by a specific term.
By Default, the search will look into the categories: Indexes, markets (stocks), bonds, and commodities.
te.getMarketsSearch(country ='msft', output_type = 'df')
data = te.getMarketSnap(search_term = 'msft').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/search/msft:?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 | |
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” |