Markets Intraday

By symbol

Max of 5 symbols

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/intraday/aapl:us,stx: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.getMarketsIntraday(symbols='aapl:us')

With multi symbols:

te.getMarketsIntraday(symbols=['aapl:us','stx:us'])

Using Requests:

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

Or using our package:

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

With multi symbols:

data = te.getMarketsIntraday(symbol = ['aapl:us','stx:us']).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/intraday/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/intraday/aapl:us,stx:us?c=your_api_key");

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

/markets/intraday/{symbols}

SymbolDateOpenHighLowClose
AAPL:US7/12/2023 5:47:00 PM189.82000189.82000189.79000189.79000
STX:US7/12/2023 5:47:00 PM60.8900060.8900060.8650060.87000
AAPL:US7/12/2023 5:46:00 PM189.95000189.97000189.82000189.83000

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

[{"Symbol":"AAPL:US","Date":"2023-10-10T19:58:00","Open":178.28000,"High":178.37000,"Low":178.26000,"Close":178.36000},{"Symbol":"STX:US","Date":"2023-10-10T19:58:00","Open":66.54500,"High":66.57000,"Low":66.54000,"Close":66.57000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:57:00","Open":178.28000,"High":178.31000,"Low":178.24000,"Close":178.29000},{"Symbol":"STX:US","Date":"2023-10-10T19:57:00","Open":66.56000,"High":66.56000,"Low":66.54500,"Close":66.54500},{"Symbol":"AAPL:US","Date":"2023-10-10T19:56:00","Open":178.29000,"High":178.33000,"Low":178.26000,"Close":178.29000},{"Symbol":"STX:US","Date":"2023-10-10T19:56:00","Open":66.59500,"High":66.60000,"Low":66.55000,"Close":66.56500},{"Symbol":"AAPL:US","Date":"2023-10-10T19:55:00","Open":178.31000,"High":178.45000,"Low":178.30000,"Close":178.30000},{"Symbol":"STX:US","Date":"2023-10-10T19:55:00","Open":66.64000,"High":66.64000,"Low":66.61000,"Close":66.61000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:54:00","Open":178.25000,"High":178.40000,"Low":178.15000,"Close":178.22000},{"Symbol":"STX:US","Date":"2023-10-10T19:54:00","Open":66.59000,"High":66.59000,"Low":66.57000,"Close":66.58000}]

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

Symbol,Date,Open,High,Low,Close
AAPL:US,10/10/2023 7:58:00 PM,178.28000,178.37000,178.26000,178.36000
STX:US,10/10/2023 7:58:00 PM,66.54500,66.57000,66.54000,66.57000
AAPL:US,10/10/2023 7:57:00 PM,178.28000,178.31000,178.24000,178.29000

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

<ArrayOfMarkets.IntradayMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.IntradayMarketsItem>
<Close>178.36000</Close>
<Date>2023-10-10T19:58:00</Date>
<High>178.37000</High>
<Low>178.26000</Low>
<Open>178.28000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>66.57000</Close>
<Date>2023-10-10T19:58:00</Date>
<High>66.57000</High>
<Low>66.54000</Low>
<Open>66.54500</Open>
<Symbol>STX:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.29000</Close>
<Date>2023-10-10T19:57:00</Date>
<High>178.31000</High>
<Low>178.24000</Low>
<Open>178.28000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
</ArrayOfMarkets.IntradayMarketsItem>

By symbol and date

Returns only data from the last 30 days

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/intraday/aapl:us?agr=5d&d1=2020-01-01%2000:00&d2=2020-12-01%2015:30&c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getMarketsIntraday(symbols='aapl:us', initDate='2017-08-10 15:30')

With end date:

te.getMarketsIntraday(symbols='aapl:us', initDate='2017-08-01',
 endDate='2017-08-08')

With interval (1m, 5m, 10m, 15m, 30m, 1h, 2h, 4h)

te.getMarketsIntradayByInterval(symbol='aapl:us', initDate='2020-01-01',
 endDate='2020-12-01', interval='5d')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/intraday/aapl:us?agr=5d&d1=2020-01-01%2000:00&d2=2020-12-01%2015:30&c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

data = te.getMarketsIntraday(symbol = 'aapl:us', start_date = '2017-08-10 15:30').then(function(data){
  console.log(data)     
});

With end date:

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

With interval (1m, 5m, 10m, 15m, 30m, 1h, 2h, 4h)

data = te.getMarketsIntraday(symbol = 'aapl:us', start_date = '2020-01-01',
 end_date = '2020-12-01', agr = '5d').then(function(data){
  console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/intraday/aapl:us?c=your_api_key&d1=2017-08-10%2015:30");

With end date:

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

With interval (1m, 5m, 10m, 15m, 30m, 1h, 2h, 4h)

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/intraday/aapl:us?agr=5d&d1=2020-01-01%2000:00&d2=2020-12-01%2015:30&client=your_api_key");

/markets/intraday/{symbol}?agr={interval}&d1=yyyy-mm-dd&d2=yyyy-mm-dd

SymbolDateOpenHighLowClose
AAPL:US7/12/2023 5:50:00 PM189.86000189.86000189.86000189.86000
AAPL:US7/12/2023 5:49:00 PM189.80000189.89000189.80000189.87000
AAPL:US7/12/2023 5:48:00 PM189.78000189.82000189.76000189.81000

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

[{"Symbol":"AAPL:US","Date":"2023-10-10T19:58:00","Open":178.28000,"High":178.37000,"Low":178.26000,"Close":178.36000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:57:00","Open":178.28000,"High":178.31000,"Low":178.24000,"Close":178.29000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:56:00","Open":178.29000,"High":178.33000,"Low":178.26000,"Close":178.29000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:55:00","Open":178.31000,"High":178.45000,"Low":178.30000,"Close":178.30000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:54:00","Open":178.25000,"High":178.40000,"Low":178.15000,"Close":178.22000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:53:00","Open":178.34000,"High":178.35000,"Low":178.22000,"Close":178.23000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:52:00","Open":178.45000,"High":178.51000,"Low":178.31000,"Close":178.33000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:51:00","Open":178.48000,"High":178.55000,"Low":178.45000,"Close":178.46000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:50:00","Open":178.61000,"High":178.61000,"Low":178.47000,"Close":178.47000}]

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

Symbol,Date,Open,High,Low,Close
AAPL:US,10/10/2023 7:58:00 PM,178.28000,178.37000,178.26000,178.36000
AAPL:US,10/10/2023 7:57:00 PM,178.28000,178.31000,178.24000,178.29000
AAPL:US,10/10/2023 7:56:00 PM,178.29000,178.33000,178.26000,178.29000

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

<ArrayOfMarkets.IntradayMarketsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.IntradayMarketsItem>
<Close>178.36000</Close>
<Date>2023-10-10T19:58:00</Date>
<High>178.37000</High>
<Low>178.26000</Low>
<Open>178.28000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.29000</Close>
<Date>2023-10-10T19:57:00</Date>
<High>178.31000</High>
<Low>178.24000</Low>
<Open>178.28000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.29000</Close>
<Date>2023-10-10T19:56:00</Date>
<High>178.33000</High>
<Low>178.26000</Low>
<Open>178.29000</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
</ArrayOfMarkets.IntradayMarketsItem>

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“AAPL:US”
DatestringRelease time and date in UTC“2023-04-13T19:58:00”
OpennumberOpen value165.42000
HighnumberHigh value165.55000
LownumberLow value165.39999
ClosenumberClose value165.53999