Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Historical stock candles

Pan-African Market Data & Intelligence

GET

/stocks/{symbol}/candles

Historical stock candles

Sandbox availablegetStockCandles

Returns chart-ready OHLCV candles in the listing currency, sorted oldest-first. from and to define an inclusive date window; interval selects intraday bucket sizes or daily/weekly/monthly aggregation. African equity observations are exchange-supplied and 15-minute delayed. The API refresh target is 900 seconds during the published coverage window. This is pull-based market data—not a real-time or tick feed. Every listed African equity has EOD data for a line chart; complete reported OHLCV is instrument-dependent. Intraday candles are built only from observations captured after the intraday rollout; missing observations are never interpolated. The current delayed capture can be materially coarser than the requested 15m or 1h bucket, so inspect SPARSE_INTRADAY_COVERAGE, samplingCadenceSeconds, and intradayObservationCount before rendering an intraday chart. Older daily source rows may contain only close, or omit volume. Use each candle's volumeAvailable and the series coverage metadata before enabling volume-dependent indicators. Prices are raw and unadjusted for splits and dividends. MyStocks holds market-data rights for every supported exchange, so endpoint availability is not gated by missing exchange licences. Authenticated partners may display these candles to their end-users under their Partner Agreement. Raw-feed redistribution, bulk export, and standalone data products remain governed by that agreement and applicable downstream-use terms.

Parameters

symbolstringpathRequired

Exchange-qualified ticker (recommended) or an unambiguous bare ticker.

Example: SCOM.KE

interval15m | 1h | 1d | 1w | 1moquery

Candle bucket interval. 15m and 1h never interpolate missing observations and may be sparse on the delayed capture; 1mo means one calendar month. 1m is not supported.

Example: 1d

fromstringquery

Inclusive start date. Defaults to 30 calendar days ago.

Example: 2026-01-01

tostringquery

Inclusive end date. Defaults to today.

Example: 2026-08-10

adjustmentrawquery

Price-adjustment mode. Only raw, unadjusted exchange prices are currently available.

Example: raw

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

symbolstringRequired

Example: "SCOM.KE"

namestring | nullRequired

Example: "Safaricom PLC"

exchangestring | nullRequired

Example: "NSE"

currencystringRequired

Example: "KES"

interval15m | 1h | 1d | 1w | 1moRequired
adjustmentrawRequired
candlesobject[]Required
candles[].timestampstringRequired

UTC start of the 15-minute, hourly, daily, ISO-week, or calendar-month bucket.

Example: "2026-08-03T00:00:00.000Z"

candles[].opennumberRequired

Example: 16.2

candles[].highnumberRequired

Example: 16.75

candles[].lownumberRequired

Example: 16.1

candles[].closenumberRequired

Example: 16.5

candles[].volumeintegerRequired

Reported or sampled volume in the candle bucket. Check volumeAvailable before using it.

Example: 2450000

candles[].ohlcAvailablebooleanRequired

True when OHLC was reported or sampled; false when open/high/low are close-derived fallbacks.

candles[].volumeAvailablebooleanRequired

True when the source supplied volume for every observation in this candle.

metaobjectRequired
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.fromstringRequired
meta.tostringRequired
meta.countintegerRequired
meta.sourcedelayed_eod | delayed_intradayRequired
meta.asOfstring | nullRequired

Timestamp of the latest returned candle, or null when the range is empty.

meta.ohlcQualityreported | mixed | close_derived | sampledRequired
meta.ohlcAvailablebooleanRequired
meta.ohlcCoveragePctnumberRequired
meta.flatCandlePctnumberRequired
meta.volumeAvailablebooleanRequired
meta.volumeCoveragePctnumberRequired
meta.volumeStatusunavailable | partial | completeRequired
meta.zeroVolumePctnumberRequired
meta.qualityStatuscomplete | partial | degraded | unavailableRequired
meta.qualityIssuesstring[]Required
meta.recommendedChartTypecandlestick | line | noneRequired

Server recommendation derived from price quality. Any missing OHLC, a flat-candle rate of 25% or more, or sparse intraday observations produces line; incomplete volume alone does not prevent candlesticks.

meta.samplingCadenceSecondsinteger | null

Median observed same-session gap between source snapshots, not a promised target cadence.

Example: 14400

meta.intradayObservationCountinteger | null

Source observations available for the requested intraday window before bucketing.

meta.coverageStartsAtstring | null
meta.adjustedfalseRequired
meta.sandboxboolean

Response codes

200Historical candles and data-quality metadata.
400Invalid date, interval, adjustment, or interval-specific date range.
401Unauthorized.
404Symbol not found or ambiguous.