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
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");
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
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “AAPL:US” |
Date | string | Release time and date in UTC | “13/04/2023” |
Open | number | Open value | 161.63000 |
High | number | High value | 165.61860 |
Low | number | Low value | 161.42000 |
Close | number | Close value | 165.50999 |