The Intraday Historical Data API returns OHLCV bars within the trading day, at intervals from one minute to one hour. It is used to backtest strategies, study intraday volatility and volume, and analyse short-term price behaviour for stocks, forex, and cryptocurrencies on major exchanges worldwide.
The Endpoint
Retrieve intraday OHLCV bars for one symbol at a chosen interval. The ticker follows the CODE.EXCHANGE format, for example AAPL.US or EURUSD.FOREX. The time window is given with Unix timestamps.
https://eodhd.com/api/intraday/{ticker}?api_token=YOUR_TOKEN&interval=5m
https://eodhd.com/api/intraday/AAPL.US?api_token=demo&interval=5m&fmt=json&from=1627896900&to=1630575300
curl --location "https://eodhd.com/api/intraday/AAPL.US?api_token=demo&interval=5m&fmt=json&from=1627896900&to=1630575300"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eodhd.com/api/intraday/AAPL.US?api_token=demo&interval=5m&fmt=json&from=1627896900&to=1630575300',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$data = curl_exec($curl);
curl_close($curl);
try {
$data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
var_dump($data);
} catch (Exception $e) {
echo 'Error. '.$e->getMessage();
}
import requests
url = f'https://eodhd.com/api/intraday/AAPL.US?api_token=demo&interval=5m&fmt=json&from=1627896900&to=1630575300'
data = requests.get(url).json()
print(data)
library(httr)
library(jsonlite)
url <- 'https://eodhd.com/api/intraday/AAPL.US?api_token=demo&interval=5m&fmt=json&from=1627896900&to=1630575300'
response <- GET(url)
if (http_type(response) == "application/json") {
content <- content(response, "text", encoding = "UTF-8")
cat(content)
} else {
cat("Error while receiving data\n")
}
Try it now (it's free)!
How to use it (YouTube)
Parameters
api_token
string
required
interval
enum
optional
from
integer
optional
to
integer
optional
split-dt
integer
optional
fmt
enum
optional
Response Example
[
{
"timestamp": 1700058600,
"gmtoffset": 0,
"datetime": "2023-11-15 14:30:00",
"open": 187.845001,
"high": 188.699996,
"low": 187.800003,
"close": 188.149993,
"volume": 11861855
},
{
"timestamp": 1700062200,
"gmtoffset": 0,
"datetime": "2023-11-15 15:30:00",
"open": 188.149993,
"high": 188.559997,
"low": 187.660003,
"close": 187.889999,
"volume": 6482122
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
| timestamp | integer | Bar start time as a Unix timestamp (UTC) |
| gmtoffset | integer | GMT offset in seconds, usually 0 (UTC) |
| datetime | string | Bar start time, YYYY-MM-DD HH:MM:SS in UTC. With split-dt=1 this is replaced by separate date and time fields |
| open | number | Opening price of the interval |
| high | number | Highest price of the interval |
| low | number | Lowest price of the interval |
| close | number | Closing price of the interval |
| volume | integer | Traded volume in the interval |
Data Availability
US Stocks (NYSE and NASDAQ)
- 1-minute data available since 2004, including pre-market and after-hours trading.
- 5-minute and 1-hour intervals available from October 2020.
Other Exchanges
- 5-minute and 1-hour intervals available from October 2020.
- 1-minute data may be available depending on the ticker and exchange; it is not guaranteed and varies.
Forex and Cryptocurrencies
- 1-minute data available since 2009.
- 5-minute and 1-hour intervals available from October 2020.
Time Range Limitations
Each interval allows a maximum from-to window per request. If no from and to are given, the last 120 days are returned.
| Interval | Maximum range (from to to) |
|---|---|
| 1m | 120 days |
| 5m | 600 days |
| 1h | 7200 days |
Data Updates
- Intraday data is delayed and finalized about 2-3 hours after the market close.
- For US tickers, 1-minute data is updated 2-3 hours after the end of after-hours trading.
Intraday bars are raw OHLCV values only – the response has no adjusted_close field. EODHD does not retroactively adjust historical intraday prices for later stock splits or dividends: once published, an intraday bar keeps its original price even after a subsequent split, unlike the End-of-Day API’s adjusted_close. Historical intraday records can still be corrected for feed or data-quality errors, but that is separate from split/dividend adjustment. For split- and dividend-adjusted history, use the End-of-Day Historical Data API.