Historical Market Data
Build stock charts with canonical, date-bounded intraday and daily OHLCV candles plus explicit data-quality metadata.
Use the candles endpoint for new stock-chart integrations:
GET /stocks/{symbol}/candles
curl "https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/candles?interval=1d&from=2026-01-01&to=2026-08-10" \ -H "Authorization: Bearer $MYSTOCKS_API_KEY"
Parameters and range limits
| Parameter | Values | Limit |
|---|---|---|
interval | 15m, 1h, 1d, 1w, 1mo | 15-minute: 31 days; hourly: 90 days; daily: 366 days; weekly: 1,826 days; monthly: 3,653 days |
from | YYYY-MM-DD | Inclusive; defaults to 30 days ago |
to | YYYY-MM-DD | Inclusive; defaults to today |
adjustment | raw | Raw exchange prices only |
15m and 1h are bucket sizes, not a promise that every bucket contains an observation. The current
delayed capture can be materially coarser (the August 2026 partner test observed roughly three
snapshots per trading day), so these intervals are not yet suitable for a continuous intraday chart.
Coverage begins when capture was deployed, the API never interpolates gaps, and
SPARSE_INTRADAY_COVERAGE tells clients to use a line chart or suppress the intraday option. Inspect
samplingCadenceSeconds (the median observed same-session gap) and intradayObservationCount.
1mo means one calendar month; 1m is not supported. Weekly buckets start on Monday;
monthly buckets start on the first calendar day. Candles are returned oldest-first.
Data quality
African equity observations are supplied by the exchanges on a 15-minute-delayed basis. The API
is pull-based and targets a 15-minute refresh cadence during the published coverage window; it is not
a real-time or tick-by-tick feed, and there is no WebSocket candle stream. Inspect meta.asOf rather
than treating response time as market time. MyStocks has full exchange data rights—the delay is a
feed characteristic, not a licensing gap.
Some older history contains close and volume but no reported open, high, or low. The endpoint keeps the schema chart-safe by using close for those missing fields and makes that provenance explicit:
meta.ohlcQuality | Meaning |
|---|---|
reported | Every returned daily source row contains reported OHLC values. |
mixed | The range combines reported OHLC and close-derived legacy rows. |
close_derived | Open, high, and low were derived from close for all source rows. |
sampled | Intraday OHLC was calculated from delayed observations captured inside the bucket. |
Check each candle's ohlcAvailable before rendering it as a candlestick. meta.ohlcCoveragePct and
meta.flatCandlePct make symbol-level validation unnecessary: qualityStatus=degraded with
FLAT_SERIES means the source has no usable range variance for that requested window. Fall back to
a line chart or display an unavailable state; do not invent wicks.
Check each candle's volumeAvailable before using its volume. meta.volumeStatus is complete,
partial, or unavailable, while meta.volumeCoveragePct reports series coverage. A numeric zero is
not evidence that volume exists. Disable VWAP and volume-derived indicators for incomplete series.
Missing trading dates are not zero-price candles; exchanges close for weekends, holidays,
suspensions, and data gaps.
qualityStatus summarizes the requested symbol and window. Always inspect qualityIssues; a listed
instrument can legitimately have no chart history, and thinly traded instruments can have genuine
flat or zero-volume sessions. The API reports these conditions instead of silently presenting them
as complete OHLCV.
Use recommendedChartType (candlestick, line, or none) for a safe default without maintaining
your own symbol allow-list.
qualityStatus | Partner behavior |
|---|---|
complete | Candlestick and volume rendering is supported for the requested window. |
partial | Render only features whose availability and coverage checks pass. |
degraded | Prefer a line chart or an explicit unavailable state; inspect qualityIssues. |
unavailable | No candles exist for the requested symbol and date window. |
The API marks a series degraded when OHLC coverage is below 80%, volume coverage is below 50%, at least 25% of five or more candles are flat, or intraday observations are too sparse for the requested bucket. It recommends a line chart whenever any candle lacks reported OHLC, at least 25% are flat, or intraday coverage is sparse. Missing volume alone does not prevent candlesticks; hide the volume layer instead. A high flat-candle rate can reflect an illiquid security or a close-only source; it is a quality signal, not permission to manufacture intraday ranges.
Adjustments and indicators
Candles are currently unadjusted for splits, consolidations, rights issues, and dividends. The API
accepts only adjustment=raw and reports meta.adjusted=false; requesting another mode returns a
validation error. Use the Corporate Governance API to
retrieve corporate actions when you need to calculate an adjusted series.
SMA, EMA, RSI, MACD, drawing tools, and annotations are presentation or derived-analytics concerns and are not calculated by this endpoint. Calculate them from the returned candles in your client or analytics service, and retain the candle-quality flags with any derived output.
Endpoint guide
| Endpoint | Recommended use |
|---|---|
GET /stocks/{symbol}/candles | Canonical stock-chart endpoint; explicit dates, a stable OHLCV schema, intraday and daily intervals. |
GET /stocks/{symbol}/chart | Deprecated compatibility shape; migrate to /candles before 2026-10-01. |
GET /stocks/{symbol}/history | Deprecated period-based history; migrate to /candles before 2026-10-01. |
GET /market/ohlcv | Cross-market query form when symbol and exchange are separate inputs. |
GET /market-data/ohlcv | Deprecated alias of /market/ohlcv. |
/stocks/{symbol}/prices and /stocks/{symbol}/ohlc are not Partner API routes and have never been
part of the documented contract. Use /stocks/{symbol}/candles; do not probe guessed aliases.
Licensing
MyStocks holds market-data rights for every supported exchange. Missing or degraded candles are an ingestion/data-quality incident, not an exchange-licensing limitation.
Authenticated sandbox and production keys can call the candles endpoint. Displaying the returned candles inside your application for your end-users is included subject to your Partner Agreement and required attribution; it does not require a separate bulk-data agreement. Redistributing raw data, offering a standalone feed, bulk exporting history, or sublicensing it does require additional data rights. See Data Licensing.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on