Markets Intraday
The movement of companies within a single trading day, including real-time observation of stock prices
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.
Symbol | Date | Open | High | Low | Close |
---|---|---|---|---|---|
AAPL:US | 7/12/2023 5:47:00 PM | 189.8200 | 189.8200 | 189.7900 | 189.7900 |
STX:US | 7/12/2023 5:47:00 PM | 60.8900 | 60.8900 | 60.8650 | 60.8700 |
AAPL:US | 7/12/2023 5:46:00 PM | 189.9500 | 189.9700 | 189.8200 | 189.8300 |
/markets/intraday/{symbols}?f=json
[{"Symbol":"AAPL:US","Date":"2023-10-10T19:58:00","Open":178.2800,"High":178.3700,"Low":178.2600,"Close":178.3600},{"Symbol":"STX:US","Date":"2023-10-10T19:58:00","Open":66.54500,"High":66.5700,"Low":66.5400,"Close":66.5700},{"Symbol":"AAPL:US","Date":"2023-10-10T19:57:00","Open":178.2800,"High":178.3100,"Low":178.2400,"Close":178.2900},{"Symbol":"STX:US","Date":"2023-10-10T19:57:00","Open":66.5600,"High":66.5600,"Low":66.54500,"Close":66.54500},{"Symbol":"AAPL:US","Date":"2023-10-10T19:56:00","Open":178.2900,"High":178.3300,"Low":178.2600,"Close":178.2900},{"Symbol":"STX:US","Date":"2023-10-10T19:56:00","Open":66.59500,"High":66.6000,"Low":66.5500,"Close":66.56500},{"Symbol":"AAPL:US","Date":"2023-10-10T19:55:00","Open":178.3100,"High":178.4500,"Low":178.3000,"Close":178.3000},{"Symbol":"STX:US","Date":"2023-10-10T19:55:00","Open":66.6400,"High":66.6400,"Low":66.6100,"Close":66.6100},{"Symbol":"AAPL:US","Date":"2023-10-10T19:54:00","Open":178.2500,"High":178.4000,"Low":178.1500,"Close":178.2200},{"Symbol":"STX:US","Date":"2023-10-10T19:54:00","Open":66.5900,"High":66.5900,"Low":66.5700,"Close":66.5800}]
/markets/intraday/{symbols}?f=csv
Symbol,Date,Open,High,Low,Close
AAPL:US,10/10/2023 7:58:00 PM,178.2800,178.3700,178.2600,178.3600
STX:US,10/10/2023 7:58:00 PM,66.54500,66.5700,66.5400,66.5700
AAPL:US,10/10/2023 7:57:00 PM,178.2800,178.3100,178.2400,178.2900
/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.3600</Close>
<Date>2023-10-10T19:58:00</Date>
<High>178.3700</High>
<Low>178.2600</Low>
<Open>178.2800</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>66.5700</Close>
<Date>2023-10-10T19:58:00</Date>
<High>66.5700</High>
<Low>66.5400</Low>
<Open>66.54500</Open>
<Symbol>STX:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.2900</Close>
<Date>2023-10-10T19:57:00</Date>
<High>178.3100</High>
<Low>178.2400</Low>
<Open>178.2800</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%200: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%200: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%200:00&d2=2020-12-01%2015:30&client=your_api_key");
/markets/intraday/{symbol}?agr={interval}&d1=yyyy-mm-dd&d2=yyyy-mm-dd
Symbol | Date | Open | High | Low | Close |
---|---|---|---|---|---|
AAPL:US | 7/12/2023 5:50:00 PM | 189.8600 | 189.8600 | 189.8600 | 189.8600 |
AAPL:US | 7/12/2023 5:49:00 PM | 189.800 | 189.8900 | 189.800 | 189.8700 |
AAPL:US | 7/12/2023 5:48:00 PM | 189.7800 | 189.8200 | 189.7600 | 189.8100 |
/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.2800,"High":178.3700,"Low":178.2600,"Close":178.3600},{"Symbol":"AAPL:US","Date":"2023-10-10T19:57:00","Open":178.2800,"High":178.3100,"Low":178.2400,"Close":178.2900},{"Symbol":"AAPL:US","Date":"2023-10-10T19:56:00","Open":178.2900,"High":178.3300,"Low":178.2600,"Close":178.2900},{"Symbol":"AAPL:US","Date":"2023-10-10T19:55:00","Open":178.3100,"High":178.4500,"Low":178.3000,"Close":178.3000},{"Symbol":"AAPL:US","Date":"2023-10-10T19:54:00","Open":178.2500,"High":178.4000,"Low":178.1500,"Close":178.2200},{"Symbol":"AAPL:US","Date":"2023-10-10T19:53:00","Open":178.3400,"High":178.3500,"Low":178.2200,"Close":178.2300},{"Symbol":"AAPL:US","Date":"2023-10-10T19:52:00","Open":178.4500,"High":178.5100,"Low":178.3100,"Close":178.3300},{"Symbol":"AAPL:US","Date":"2023-10-10T19:51:00","Open":178.4800,"High":178.5500,"Low":178.4500,"Close":178.4600},{"Symbol":"AAPL:US","Date":"2023-10-10T19:50:00","Open":178.6100,"High":178.6100,"Low":178.4700,"Close":178.4700}]
/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.2800,178.3700,178.2600,178.3600
AAPL:US,10/10/2023 7:57:00 PM,178.2800,178.3100,178.2400,178.2900
AAPL:US,10/10/2023 7:56:00 PM,178.2900,178.3300,178.2600,178.2900
/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.3600</Close>
<Date>2023-10-10T19:58:00</Date>
<High>178.3700</High>
<Low>178.2600</Low>
<Open>178.2800</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.2900</Close>
<Date>2023-10-10T19:57:00</Date>
<High>178.3100</High>
<Low>178.2400</Low>
<Open>178.2800</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
<Markets.IntradayMarketsItem>
<Close>178.2900</Close>
<Date>2023-10-10T19:56:00</Date>
<High>178.3300</High>
<Low>178.2600</Low>
<Open>178.2900</Open>
<Symbol>AAPL:US</Symbol>
</Markets.IntradayMarketsItem>
</ArrayOfMarkets.IntradayMarketsItem>
Response fields
Field | Type | Description | Example |
---|---|---|---|
Symbol | string | Unique symbol used by Trading Economics | “AAPL:US” |
Date | string | Release time and date in UTC | “2023-04-13T19:58:00” |
Open | number | Open value | 165.4200 |
High | number | High value | 165.5500 |
Low | number | Low value | 165.3999 |
Close | number | Close value | 165.5399 |