Markets
Here you can get market forecast data from the API.
By category
Get market forecasts for major indexes by category
Index
te.getMarketsForecasts(category='index', output_type='df')
data = te.getMarketsForecast(category = 'index').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/index?c=guest:guest");
Currency
te.getMarketsForecasts(category='currency', output_type='df')
data = te.getMarketsForecast(category = 'currency').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/currency?c=guest:guest");
Crypto
te.getMarketsForecasts(category='crypto', output_type='df')
data = te.getMarketsForecast(category = 'crypto').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/crypto?c=guest:guest");
Commodity
te.getMarketsForecasts(category='commodity', output_type='df')
data = te.getMarketsForecast(category = 'commodity').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/commodity?c=guest:guest");
Bond
te.getMarketsForecasts(category='bond', output_type='df')
data = te.getMarketsForecast(category = 'bond').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/bond?c=guest:guest");
By symbol
Get market forecasts for major indexes by a specific symbol
/markets/forecasts/symbol/{symbols}
te.getMarketsForecasts(symbol=['BULGARIAGOVB10Y:GOV','LITHUANIAGOVBON10Y:GOV',
'GBGB10YR:GOV'], output_type='df')
te.getMarketsForecasts(symbol='aapl:us', output_type='df')
data = te.getMarketsForecast(symbol = ['BULGARIAGOVB10Y:GOV',
'LITHUANIAGOVBON10Y:GOV','GBGB10YR:GOV']).then(function(data){
console.log(data)
});
data = te.getMarketsForecast(symbol = 'aapl:us').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/symbol/BULGARIAGOVB10Y:GOV,LITHUANIAGOVBON10Y:GOV,GBGB10YR:GOV?c=guest:guest");
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/forecasts/symbol/aapl:us?c=guest:guest");
Response fields
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “AEX:IND” |
Country | string | Country name | “Netherlands” |
Date | string | Release time and date in UTC | “2023-04-17T12:02:51.543” |
Type | string | Market category | “index” |
Last | number | Latest released value | 760.330000000000 |
URL | string | Hyperlink at Trading Economics | “/netherlands/stock-market” |
Importance | number | Indicator importance from 0 (lowest) to 1000 (highest) | 190 |
Forecast1 | number | Forecast value for the next quarter | 737.415900000000 |
Forecast2 | number | Forecast value for the next quarter following Forecast1 | 714.193200000000 |
Forecast3 | number | Forecast value for the next quarter following Forecast2 | 691.655760000000 |
Forecast4 | number | Forecast value for the next quarter following Forecast3 | 669.879720000000 |