Markets Historical Data

The historical endpoint contains a time series with fields such as symbol, date, open, high, low, close, and observed value. It allows one to check the evolution of key indicators over time.

To find the symbol you need, you can use:

  • Quotes by Category — browse available symbols by market category (e.g., stocks, bonds, commodities).
  • Quotes by Country — look up symbols filtered by country.
  • Search — search for symbols by name or keyword.

By symbol

Note: The number of rows returned depends on the market and your subscription plan. For predictable results, use the date parameters to specify the exact range you need.

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/historical/aapl:us?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.getHistorical(symbol='aapl:us')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getHistoricalMarkets(symbol = 'aapl:us').then(function(data){
  console.log(data)     
});

With multi symbols:

data = te.getHistoricalMarkets(symbol = ['aapl:us','gac:com']).then(function(data){
  console.log(data)     
});

Using Requests:

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us?c=your_api_key"))
    {
        request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        var response = await httpClient.SendAsync(request);
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync(); 
            Console.WriteLine(content);
        }
    }
}

With multi symbols:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=your_api_key");

The response data format can be configured by appending the &f= parameter to the URL request.

/markets/historical/{symbol}

SymbolDateOpenHighLowClose
AAPL:US14/04/2026259.2450261.8901257.1901258.8300
AAPL:US13/04/2026259.7300260.1800256.6600259.2000
AAPL:US10/04/2026259.9800262.1900259.0231260.4800

/markets/historical/{symbol}?f=json

[
  {
    "Symbol": "AAPL:US",
    "Date": "14/04/2026",
    "Open": 259.245,
    "High": 261.8901,
    "Low": 257.1901,
    "Close": 258.83
  },
  {
    "Symbol": "AAPL:US",
    "Date": "13/04/2026",
    "Open": 259.73,
    "High": 260.18,
    "Low": 256.66,
    "Close": 259.2
  },
  {
    "Symbol": "AAPL:US",
    "Date": "10/04/2026",
    "Open": 259.98,
    "High": 262.19,
    "Low": 259.0231,
    "Close": 260.48
  }
]

/markets/historical/{symbol}?f=csv

Symbol,Date,Open,High,Low,Close
AAPL:US,14/04/2026,259.2450,261.8901,257.1901,258.8300
AAPL:US,13/04/2026,259.7300,260.1800,256.6600,259.2000
AAPL:US,10/04/2026,259.9800,262.1900,259.0231,260.4800

/markets/historical/{symbol}?f=xml

<ArrayOfMarkets.HistoricalMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.HistoricalMarketsItem>
<Close>258.8300</Close>
<Date>14/04/2026</Date>
<High>261.8901</High>
<Low>257.1901</Low>
<Open>259.2450</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>259.2000</Close>
<Date>13/04/2026</Date>
<High>260.1800</High>
<Low>256.6600</Low>
<Open>259.7300</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>260.4800</Close>
<Date>10/04/2026</Date>
<High>262.1900</High>
<Low>259.0231</Low>
<Open>259.9800</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
</ArrayOfMarkets.HistoricalMarketsItem>

By symbol and date

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/historical/aapl:us?c={api_key}&d1=2026-04-01&d2=2026-04-15'
data = requests.get(url).json()
print(data)

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.fetchMarkets(symbol='aapl:us', initDate='2026-04-01', endDate='2026-04-15')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/historical/aapl:us?c=${api_key}&d1=2026-04-01&d2=2026-04-15`)
    console.log(response.data)
})()

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getHistoricalMarkets(symbol = 'aapl:us', start_date = '2026-04-01',
 end_date = '2026-04-15').then(function(data){
  console.log(data)     
});

Using Requests:

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us?c=your_api_key&d1=2026-04-01&d2=2026-04-15"))
    {
        request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        var response = await httpClient.SendAsync(request);
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync(); 
            Console.WriteLine(content);
        }
    }
}

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

SymbolDateOpenHighLowClose
AAPL:US14/04/2026259.2450261.8901257.1901258.8300
AAPL:US13/04/2026259.7300260.1800256.6600259.2000
AAPL:US10/04/2026259.9800262.1900259.0231260.4800

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

[
  {
    "Symbol": "AAPL:US",
    "Date": "14/04/2026",
    "Open": 259.245,
    "High": 261.8901,
    "Low": 257.1901,
    "Close": 258.83
  },
  {
    "Symbol": "AAPL:US",
    "Date": "13/04/2026",
    "Open": 259.73,
    "High": 260.18,
    "Low": 256.66,
    "Close": 259.2
  },
  {
    "Symbol": "AAPL:US",
    "Date": "10/04/2026",
    "Open": 259.98,
    "High": 262.19,
    "Low": 259.0231,
    "Close": 260.48
  }
]

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

Symbol,Date,Open,High,Low,Close
AAPL:US,14/04/2026,259.2450,261.8901,257.1901,258.8300
AAPL:US,13/04/2026,259.7300,260.1800,256.6600,259.2000
AAPL:US,10/04/2026,259.9800,262.1900,259.0231,260.4800

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

<ArrayOfMarkets.HistoricalMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.HistoricalMarketsItem>
<Close>258.8300</Close>
<Date>14/04/2026</Date>
<High>261.8901</High>
<Low>257.1901</Low>
<Open>259.2450</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>259.2000</Close>
<Date>13/04/2026</Date>
<High>260.1800</High>
<Low>256.6600</Low>
<Open>259.7300</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>260.4800</Close>
<Date>10/04/2026</Date>
<High>262.1900</High>
<Low>259.0231</Low>
<Open>259.9800</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
</ArrayOfMarkets.HistoricalMarketsItem>

By multiple symbols

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.getHistorical(symbol='aapl:us')

With multi symbols:

te.getHistorical(symbol=['aapl:us','gac:com'])

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getHistoricalMarkets(symbol = 'aapl:us').then(function(data){
  console.log(data)     
});

With multi symbols:

data = te.getHistoricalMarkets(symbol = ['aapl:us','gac:com']).then(function(data){
  console.log(data)     
});

Using Requests:

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us?c=your_api_key"))
    {
        request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        var response = await httpClient.SendAsync(request);
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync(); 
            Console.WriteLine(content);
        }
    }
}

With multi symbols:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=your_api_key");

The response data format can be configured by appending the &f= parameter to the URL request.

/markets/historical/{symbols}

SymbolDateOpenHighLowClose
AAPL:US12/07/2023189.6800191.7000188.4700189.7600
GAC:COM11/07/20231675.00001675.00001675.00001675.0000
AAPL:US11/07/2023189.1600189.3000186.6000188.0800

/markets/historical/{symbols}?f=json

[
  {
    "Symbol": "AAPL:US",
    "Date": "10/10/2023",
    "Open": 178.1,
    "High": 179.72,
    "Low": 177.95,
    "Close": 178.39
  },
  {
    "Symbol": "GAC:COM",
    "Date": "10/10/2023",
    "Open": 1955.0,
    "High": 1980.0,
    "Low": 1930.0,
    "Close": 1955.0
  },
  {
    "Symbol": "GAC:COM",
    "Date": "09/10/2023",
    "Open": 1955.0,
    "High": 1980.0,
    "Low": 1930.0,
    "Close": 1955.0
  }
]

/markets/historical/{symbols}?f=csv

Symbol,Date,Open,High,Low,Close
AAPL:US,10/10/2023,178.1000,179.7200,177.9500,178.3900
GAC:COM,10/10/2023,1955.0000,1980.0000,1930.0000,1955.0000
GAC:COM,09/10/2023,1955.0000,1980.0000,1930.0000,1955.0000

/markets/historical/{symbols}?f=xml

<ArrayOfMarkets.HistoricalMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.HistoricalMarketsItem>
<Close>178.3900</Close>
<Date>10/10/2023</Date>
<High>179.7200</High>
<Low>177.9500</Low>
<Open>178.1000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>1955.0000</Close>
<Date>10/10/2023</Date>
<High>1980.0000</High>
<Low>1930.0000</Low>
<Open>1955.0000</Open>
<Symbol>GAC:COM</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>1955.0000</Close>
<Date>09/10/2023</Date>
<High>1980.0000</High>
<Low>1930.0000</Low>
<Open>1955.0000</Open>
<Symbol>GAC:COM</Symbol>
</Markets.HistoricalMarketsItem>
</ArrayOfMarkets.HistoricalMarketsItem>

By multiple symbols and date

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c={api_key}&d1=2017-08-01&d2=2017-08-08'
data = requests.get(url).json()
print(data)

Or using our package:

te.fetchMarkets(symbol= ['aapl:us','gac:com'], initDate='2017-08-01')

With end date:

te.fetchMarkets(symbol= ['aapl:us','gac:com'], initDate='2017-08-01',
 endDate='2017-08-08')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=${api_key}&d1=2017-08-01&d2=2017-08-08`)
    console.log(response.data)
})()

Or using our package:

data = te.getHistoricalMarkets(symbol= ['aapl:us','gac:com'], start_date = '2017-08-01').then(function(data){
  console.log(data)     
});

With end date:

data = te.getHistoricalMarkets(symbol= ['aapl:us','gac:com'], start_date = '2017-08-01',
 end_date = '2017-08-08').then(function(data){
  console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=your_api_key&d1=2017-08-01");

With end date:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/historical/aapl:us,gac:com?c=your_api_key&d1=2017-08-01&d2=2017-08-08");

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

SymbolDateOpenHighLowClose
AAPL:US12/07/2023189.6800191.7000188.4700189.8200
GAC:COM11/07/20231675.00001675.00001675.00001675.0000
AAPL:US11/07/2023189.1600189.3000186.6000188.0800

/markets/historical/{symbols}?c=Your_api_key&d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=json

[
  {
    "Symbol": "AAPL:US",
    "Date": "10/10/2023",
    "Open": 178.1,
    "High": 179.72,
    "Low": 177.95,
    "Close": 178.39
  },
  {
    "Symbol": "GAC:COM",
    "Date": "10/10/2023",
    "Open": 1955.0,
    "High": 1980.0,
    "Low": 1930.0,
    "Close": 1955.0
  },
  {
    "Symbol": "GAC:COM",
    "Date": "09/10/2023",
    "Open": 1955.0,
    "High": 1980.0,
    "Low": 1930.0,
    "Close": 1955.0
  }
]

/markets/historical/{symbols}?c=Your_api_key&d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=csv

Symbol,Date,Open,High,Low,Close
AAPL:US,10/10/2023,178.1000,179.7200,177.9500,178.3900
GAC:COM,10/10/2023,1955.0000,1980.0000,1930.0000,1955.0000
GAC:COM,09/10/2023,1955.0000,1980.0000,1930.0000,1955.0000

/markets/historical/{symbols}?c=Your_api_key&d1=yyyy-mm-dd&d2=yyyy-mm-dd?f=xml

<ArrayOfMarkets.HistoricalMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.HistoricalMarketsItem>
<Close>178.3900</Close>
<Date>10/10/2023</Date>
<High>179.7200</High>
<Low>177.9500</Low>
<Open>178.1000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>1955.0000</Close>
<Date>10/10/2023</Date>
<High>1980.0000</High>
<Low>1930.0000</Low>
<Open>1955.0000</Open>
<Symbol>GAC:COM</Symbol>
</Markets.HistoricalMarketsItem>
<Markets.HistoricalMarketsItem>
<Close>1955.0000</Close>
<Date>09/10/2023</Date>
<High>1980.0000</High>
<Low>1930.0000</Low>
<Open>1955.0000</Open>
<Symbol>GAC:COM</Symbol>
</Markets.HistoricalMarketsItem>
</ArrayOfMarkets.HistoricalMarketsItem>

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“AAPL:US”
DatestringDate of the trading session in UTC“13/04/2023”
OpennumberOpening price of the trading session161.6300
HighnumberHighest price reached during the trading session165.6186
LownumberLowest price reached during the trading session161.4200
ClosenumberClosing price of the trading session165.5099