A day trader and a swing trader can look at the same stock and need different data. One wants the last hour in five-minute steps. The other wants months of daily candles. Mboum's history endpoint covers both with a single parameter, interval, but each interval returns a fixed window of history and a few quirks you should know before you build on it. This guide lists what each interval returns, using real counts from a live request, and ends with a script that checks them all.
The history endpoint
GET https://api.mboum.com/v1/markets/stock/history costs 1 per call. It takes a ticker (or symbol), an interval and an optional diffandsplits=true, which adds dividend and split events. You cannot choose a start or end date. Each interval returns a fixed window ending now:
1m: 1-minute candles, last 1 day5m,15m,30m,1h: last 1 month1dand1wk: last 5 years1moand3mo: last 10 years
One call returns the whole window. The response has a meta object and a body object keyed by Unix timestamp. Each candle has date, date_utc, open, high, low, close and volume, and daily or longer candles add adjclose. Despite its name, date_utc holds the Unix timestamp in seconds, so use it for anything that needs the exact time. This is the last daily candle for AAPL:
"1795185000": {
"date": "2026-11-20",
"date_utc": 1795185000,
"open": 352.87,
"high": 354.34,
"low": 340.56,
"close": 342.56,
"volume": 80464200,
"adjclose": 342.56
}
What you get at each interval
These counts are from AAPL on November 22, 2026:
- 5m: 1,639 candles from Oct 23 to Nov 20.
- 15m: 547 candles. 30m: 274 candles.
- 1h: 148 candles.
- 1d: 1,255 candles from Nov 22, 2021.
- 1wk: 262 candles.
- 1mo: 121 candles from Dec 2016.
- 3mo: 42 candles from Nov 2016.
Intraday: 5m to 1h
Day traders work in the 1-minute to 1-hour range. The 5-, 15-, 30- and 60-minute series each cover the last month, so they suit intraday patterns and short backtests, not long ones. The 1-minute series is limited to the last day. If the market was closed for that whole day, such as on a weekend, the request returns HTTP 200 with "success": false and "No data available". My 1-minute request on a Sunday did exactly that.
Swing trading: 1h, 1d and 1wk
Swing traders hold for days to weeks and usually read daily and weekly candles. Five years of daily candles is enough for 50- and 200-day averages and for a multi-year chart. Weekly candles cover the same five years in 262 bars, which is handy for spotting the larger trend before you look at a daily chart.
Position trading: 1mo and 3mo
Monthly candles go back about ten years in 121 bars, and quarterly candles cover the same ten years in 42 bars. They are useful for long-term context, not for timing entries.
Check every interval
This script requests all nine intervals for one symbol, sorts the candles by timestamp and prints a count with the first and last candle times in Eastern Time. It skips the events key that diffandsplits=true adds, and has a helper that drops the empty bar some intraday series end with.
import time
from datetime import datetime
from zoneinfo import ZoneInfo
import requests
URL = "https://api.mboum.com/v1/markets/stock/history"
HEADERS = {"Authorization": "Bearer YOUR_MBOUM_API_KEY"}
NY = ZoneInfo("America/New_York")
SYMBOL = "AAPL"
INTERVALS = ["1m", "5m", "15m", "30m", "1h", "1d", "1wk", "1mo", "3mo"]
def fetch_candles(symbol, interval):
params = {"ticker": symbol, "interval": interval}
resp = requests.get(URL, headers=HEADERS, params=params, timeout=30)
resp.raise_for_status()
data = resp.json()
body = data.get("body")
if data.get("success") is False or not body:
return []
# With diffandsplits=true the body also has an "events" key. Skip it.
candles = [c for key, c in body.items() if key != "events"]
return sorted(candles, key=lambda c: c["date_utc"])
def drop_empty(candles):
# Intraday series can end with a flat bar that has zero volume.
return [c for c in candles if c["volume"] > 0]
def stamp(candle):
return datetime.fromtimestamp(candle["date_utc"], NY).strftime("%Y-%m-%d %H:%M")
def main():
print(f"{SYMBOL} {'candles':>7} {'first candle (ET)':<17} last candle (ET)")
for interval in INTERVALS:
candles = fetch_candles(SYMBOL, interval)
if not candles:
print(f"{interval:<5} {'none':>7} (no data returned)")
else:
print(f"{interval:<5} {len(candles):>7} {stamp(candles[0]):<17} {stamp(candles[-1])}")
time.sleep(0.2)
if __name__ == "__main__":
main()
Output for AAPL on November 22, 2026, a Sunday:
AAPL candles first candle (ET) last candle (ET)
1m none (no data returned)
5m 1639 2026-10-23 09:30 2026-11-20 16:00
15m 547 2026-10-23 09:30 2026-11-20 16:00
30m 274 2026-10-23 09:30 2026-11-20 16:00
1h 148 2026-10-23 09:30 2026-11-20 16:00
1d 1255 2021-11-22 09:30 2026-11-20 09:30
1wk 262 2021-11-22 00:00 2026-11-20 16:00
1mo 121 2016-12-01 00:00 2026-11-20 16:00
3mo 42 2016-11-01 00:00 2026-11-20 16:00
The run costs 9 requests, one per interval.
Best practices
- Read the timestamps, not the date. Daily candles are stamped at the 9:30 AM Eastern open. Weekly and longer candles start at midnight Eastern. Crypto symbols such as BTC-USD follow a different clock, with daily candles at midnight UTC.
- Expect an unfinished last candle. The newest weekly, monthly and quarterly candle carries the time of the latest quote, not a period boundary. It is still forming.
- Drop the empty bar. In our check, the 5m to 1h series each ended with a flat candle at 4:00 PM with zero volume. Use
drop_emptybefore you compute volume-based indicators. - Cache what does not change. A daily series changes once a day and a monthly series changes slowly. Fetch each one once after the close and reuse it.
Next steps
Pick the interval that matches how long you hold, run the script on your own symbol and plot the closes. For the full parameter list, see the API documentation, and get a free key at mboum.com/pages/api.
The data is for information only. It is not investment advice.