Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

OHLCV price history (end-of-day candles)

Pan-African Market Data & Intelligence

GET

/market/ohlcv

OHLCV price history (end-of-day candles)

Sandbox availablegetMarketOhlcv

Returns end-of-day OHLCV (Open, High, Low, Close, Volume) candles for a stock over a date range. Formerly GET /market-data/ohlcv, which remains a supported (deprecated) alias. Current limitations: - Only interval=1d (end-of-day) is supported. Intraday intervals are not yet available. - open, high, and low fields are null until intraday data is ingested — only close and volume are populated. - Maximum date range per request: 365 days. Split larger requests. Candles are sorted oldest-first and filtered to the [from, to] window inclusive.

Parameters

symbolstringqueryRequired

Exchange-qualified ticker (e.g. SCOM.KE) or bare ticker.

Example: SCOM.KE

exchangestringqueryRequired

Exchange code (NSE, NGX, JSE, GSE, BRVM, ZSE, BSE, LUSE, EGX, DSE, USE, MSE, CSE, SEM).

Example: NSE

timeframe1D | sessionquery

Candle timeframe. 1D (default, end-of-day, always available) or session (coarse intraday — open/mid/close samples captured 3×/day; accumulates from when capture was enabled, see meta.coverageStartsAt). Finer intervals (1Min/5Min/15Min/1H) are not available on the delayed feed. The legacy interval=1d param remains a supported alias for 1D.

Example: 1D

interval1dquery

Legacy alias for timeframe. 1d maps to timeframe=1D. Prefer timeframe.

Example: 1d

fromstringquery

Start date inclusive (YYYY-MM-DD). Defaults to 30 days ago.

Example: 2026-01-01

tostringquery

End date inclusive (YYYY-MM-DD). Defaults to today.

Example: 2026-06-04

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

dataobject[]

Candles sorted oldest-first. One entry per trading day with available price data.

data[].timestampstring

ISO 8601 start-of-day UTC timestamp for the candle period.

Example: "2026-01-02T00:00:00.000Z"

data[].opennumber | null

Session open price (local currency). null until intraday data is available.

data[].highnumber | null

Session high price (local currency). null until intraday data is available.

data[].lownumber | null

Session low price (local currency). null until intraday data is available.

data[].closenumber | null

End-of-day closing price in local currency.

Example: 16.5

data[].volumeinteger

Trading volume for the session. 0 if not recorded.

Example: 4200000

metaobject
meta.request_idstring

Unique identifier for this request. Include in support tickets for tracing.

Example: "4f6e1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b"

meta.timestampstring

ISO 8601 UTC timestamp of when the response was generated.

Example: "2026-06-04T10:23:45.123Z"

meta.exchangestring | null

Exchange code the request was scoped to, when applicable.

Example: "NSE"

meta.symbolstring | null

Ticker symbol the request was scoped to, when applicable.

Example: "SCOM.KE"

meta.timeframestring

The resolved timeframe (1D or session).

Example: "1D"

meta.intervalstring

Legacy alias field. 1d for 1D, else the timeframe.

Example: "1d"

meta.coverageStartsAtstring | null

Session timeframe only — earliest date intraday samples exist for this symbol. Absent for 1D.

Example: "2026-07-15"

meta.fromstring

Example: "2026-01-01"

meta.tostring

Example: "2026-06-04"

meta.countinteger

Number of candles returned.

Example: 107

meta.ohlc_availableboolean

false until intraday OHLC data is ingested. When false, open/high/low are null.

Example: false

Response codes

200OHLCV candles for the requested symbol and date range.
400Validation error (missing params, invalid date format, range > 365 days).
401Unauthorized.
404Symbol not found on the specified exchange.