Set a 5-minute historical window with 14-digit dates, then chart each bar from its datetime and close.
The published sample is AAPL at a 5-minute interval. Both ends of that window are written as YYYYMMDDHHMMSS.
To access this endpoint, you must obtain an API key: Get your API key
Write both dates as 14 digits
GET /v3/markets/historical returns bars for one ticker. For 5min, startDate and endDate use YYYYMMDDHHMMSS. The sample window runs from 20250404000000 through 20250604000000. The same 14-digit width is what 1min, 10min, 15min, 30min, 60min, 120min, and 240min use.
Request the sample window
The script sends that AAPL window and prints the echoed ticker, interval, and dates, then datetime and close from the first bars.
import requests
url = "https://api.mboum.com/v3/markets/historical"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
"ticker": "AAPL",
"interval": "5min",
"startDate": "20250404000000",
"endDate": "20250604000000",
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
payload = response.json()
meta = payload["meta"]
print(meta["ticker"], meta["interval"], meta["startDate"], meta["endDate"])
for row in payload["body"][:3]:
print(row["datetime"], row["close"])
Read datetime and close
These are the window fields the script checks, and the first bar in the published sample.
{
"meta": {
"ticker": "AAPL",
"interval": "5min",
"startDate": "20250404000000",
"endDate": "20250604000000"
},
"body": [
{
"datetime": "2025-05-21 14:40",
"open": 201.9818,
"high": 202.3598,
"low": 201.9463,
"close": 202.18,
"volume": 282557
}
]
}
That bar's datetime is 2025-05-21 14:40 and its close is 202.18. The window stays on meta.startDate and meta.endDate. One limitation: those 14-digit dates belong to the minute intervals. A daily, weekly, monthly, or quarterly window uses YYYYMMDD on both dates.
Learn more or explore other endpoints: v3 historical