Historical

Markets historical is also provided by the API. Please consider that all market-related methods are beta and under heavy development.

By symbol

Get market historical data by a specific symbol

/markets/historical/{symbol}

te.getHistorical(symbol='aapl:us', output_type='df')
data = te.getHistoricalMarkets(symbol = 'aapl:us').then(function(data){
  console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/historical/aapl:us?c=guest:guest");

/markets/historical/{symbols}

te.getHistorical(symbol=['aapl:us','gac:com'], output_type='df')
data = te.getHistoricalMarkets(symbol = ['aapl:us','gac:com']).then(function(data){
  console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=guest:guest");

By symbol and date

Get market historical data by a specific symbol and date interval.

/markets/historical/{symbol}?d1=yyyy-mm-dd

te.fetchMarkets(symbol='aapl:us', initDate='2017-08-01', output_type='df')
data = te.getHistoricalMarkets(symbol = 'aapl:us', start_date = '2017-08-01').then(function(data){
  console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/historical/aapl:us?c=guest:guest&d1=2017-08-01");

/markets/historical/{symbol}?d1=yyyy-mm-dd&d2=yyyy-mm-dd

te.fetchMarkets(symbol='aapl:us', initDate='2017-08-01',
 endDate='2017-08-08', output_type='df')
data = te.getHistoricalMarkets(symbol = 'aapl:us', start_date = '2017-08-01',
 end_date = '2017-08-08').then(function(data){
  console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/historical/aapl:us?c=guest:guest&d1=2017-08-01&d2=2017-08-08");

/markets/historical/{symbols}?d1=yyyy-mm-dd&d2=yyyy-mm-dd

te.fetchMarkets(symbol= ['aapl:us','gac:com'], initDate='2017-08-01',
 endDate='2017-08-08', output_type='df')
data = te.getHistoricalMarkets(symbol = ['aapl:us','gac:com'],
 start_date = '2017-08-01', end_date = '2017-08-08').then(function(data){
  console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=guest:guest&d1=2017-08-01&d2=2017-08-08");

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“AAPL:US”
DatestringRelease time and date in UTC“13/04/2023”
OpennumberOpen value161.63000
HighnumberHigh value165.61860
LownumberLow value161.42000
ClosenumberClose value165.50999