Skip to content
Docs
Get API key
Markets

Markets Historical Data

Use the following API endpoints to obtain historical data for markets.

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:

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

Or using our package:

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

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

Text
https://api.tradingeconomics.com/markets/historical/{symbol}?c={your_api_key}&f=json
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
  }
]

By symbol and date

Using Requests:

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

Or using our package:

Python
import tradingeconomics as te
te.login('your_api_key')
te.fetchMarkets(symbol='aapl:us', initDate='2026-04-01', endDate='2026-04-15')
Text
https://api.tradingeconomics.com/markets/historical/{symbol}?c={your_api_key}&d1=yyyy-mm-dd&d2=yyyy-mm-dd&f=json
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
  }
]

By multiple symbols

Using Requests:

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

Or using our package:

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

With multi symbols:

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

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

Text
https://api.tradingeconomics.com/markets/historical/{symbols}?c={your_api_key}&f=json
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
  }
]

By multiple symbols and date

Using Requests:

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

Or using our package:

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

With end date:

Python
te.fetchMarkets(symbol= ['aapl:us','gac:com'], initDate='2017-08-01',
 endDate='2017-08-08')
Text
https://api.tradingeconomics.com/markets/historical/{symbols}?c={your_api_key}&d1=yyyy-mm-dd&d2=yyyy-mm-dd&f=json
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
  }
]

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