Viewing: Historical Data

Realtime Event Engine overview →

Historical Data

Access historical OHLCV (Open, High, Low, Close, Volume) data for technical analysis and backtesting.

GET /historical/{symbol}/

Starter+

Get historical price data for a stock.

Endpoint

https://app.sahmk.sa/api/v1/historical/2222/?from=2026-01-01&to=2026-01-28&interval=1d

Parameters

(*) Required

ParameterTypeExample
symbol *string2222
from string2026-01-01
to string2026-01-28
interval string1d

from: default is ~30 days ago. to: default is today. interval: 1d, 1w, 1m, 30m, 60m (default 1d).

Data Available by Plan:

  • Free:No historical access
  • Starter:1d, 1w, 1m
  • Pro:Starter intervals + 60m up to 90 days
  • Business:Starter intervals + 30m up to 6 months + 60m up to 1 year
  • Enterprise:Business availability by default; custom retention, intervals, and delivery options are available by agreement

If the requested interval or date range exceeds your plan limits, the API returns 403 PLAN_LIMIT.

Need a practical intraday workflow? See Intraday Data with SAHMK (SDK + MCP).

200 OKapplication/json
{
  "symbol": "2222",
  "interval": "1d",
  "from": "2026-01-01",
  "to": "2026-01-28",
  "metadata": {
    "interval": "1d",
    "source": "daily_aggregate",
    "is_intraday": false,
    "is_final": true,
    "partial": false,
    "latest_bar_at": "2026-01-28"
  },
  "count": 20,
  "data": [
    {
      "date": "2026-01-28",
      "open": 25.3,
      "high": 25.68,
      "low": 25.3,
      "close": 25.64,
      "volume": 15738067,
      "adjusted_close": 25.64,
      "turnover": 402108076.72
    }
  ]
}

Candle Row Format

30m/60m return timestamped candles, while 1d/1w/1m return date-based candles.