Data Licensing
Terms governing market data accessed via the Partner API — permitted vs. restricted use, exchange attribution requirements, the data-accuracy disclaimer, intellectual-property terms, and how to arrange bulk historical or research data licensing.
Explore endpoints
1 of 1/stocks/{symbol}/candles
Historical stock candles
Full endpoint documentationgetStockCandlesReturns 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
symbolstringpathRequiredExchange-qualified ticker (recommended) or an unambiguous bare ticker.
Example: SCOM.KE
interval15m | 1h | 1d | 1w | 1moqueryCandle 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
fromstringqueryInclusive start date. Defaults to 30 calendar days ago.
Example: 2026-01-01
tostringqueryInclusive end date. Defaults to today.
Example: 2026-08-10
adjustmentrawqueryPrice-adjustment mode. Only raw, unadjusted exchange prices are currently available.
Example: raw
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Response fields
symbolstringRequiredExample: "SCOM.KE"
namestring | nullRequiredExample: "Safaricom PLC"
exchangestring | nullRequiredExample: "NSE"
currencystringRequiredExample: "KES"
interval15m | 1h | 1d | 1w | 1moRequiredadjustmentrawRequiredcandlesobject[]Requiredcandles[].timestampstringRequiredUTC start of the 15-minute, hourly, daily, ISO-week, or calendar-month bucket.
Example: "2026-08-03T00:00:00.000Z"
candles[].opennumberRequiredExample: 16.2
candles[].highnumberRequiredExample: 16.75
candles[].lownumberRequiredExample: 16.1
candles[].closenumberRequiredExample: 16.5
candles[].volumeintegerRequiredReported or sampled volume in the candle bucket. Check volumeAvailable before using it.
Example: 2450000
candles[].ohlcAvailablebooleanRequiredTrue when OHLC was reported or sampled; false when open/high/low are close-derived fallbacks.
candles[].volumeAvailablebooleanRequiredTrue when the source supplied volume for every observation in this candle.
metaobjectRequiredmeta.request_idstringUnique identifier for this request. Include in support tickets for tracing.
Example: "4f6e1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b"
meta.timestampstringISO 8601 UTC timestamp of when the response was generated.
Example: "2026-06-04T10:23:45.123Z"
meta.exchangestring | nullExchange code the request was scoped to, when applicable.
Example: "NSE"
meta.symbolstring | nullTicker symbol the request was scoped to, when applicable.
Example: "SCOM.KE"
meta.fromstringRequiredmeta.tostringRequiredmeta.countintegerRequiredmeta.sourcedelayed_eod | delayed_intradayRequiredmeta.asOfstring | nullRequiredTimestamp of the latest returned candle, or null when the range is empty.
meta.ohlcQualityreported | mixed | close_derived | sampledRequiredmeta.ohlcAvailablebooleanRequiredmeta.ohlcCoveragePctnumberRequiredmeta.flatCandlePctnumberRequiredmeta.volumeAvailablebooleanRequiredmeta.volumeCoveragePctnumberRequiredmeta.volumeStatusunavailable | partial | completeRequiredmeta.zeroVolumePctnumberRequiredmeta.qualityStatuscomplete | partial | degraded | unavailableRequiredmeta.qualityIssuesstring[]Requiredmeta.recommendedChartTypecandlestick | line | noneRequiredServer 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 | nullMedian observed same-session gap between source snapshots, not a promised target cadence.
Example: 14400
meta.intradayObservationCountinteger | nullSource observations available for the requested intraday window before bucketing.
meta.coverageStartsAtstring | nullmeta.adjustedfalseRequiredmeta.sandboxbooleanResponse codes
200Historical candles and data-quality metadata.400Invalid date, interval, adjustment, or interval-specific date range.401Unauthorized.404Symbol not found or ambiguous.Current price-tier policy: Sandbox and paid-license prices use the current 15-minute-delayed feed; real-time delivery is unavailable pending approved feed verification. The current shared quote implementation still reports delayMinutes: 15 and refreshIntervalSeconds: 900 without a license-specific distinction. The delayed-feed descriptions below document the current implementation for both Sandbox and paid licenses. See market-data implementation status; preserve actual freshness labels and timestamps.
MyStocks Africa holds market-data rights for every exchange supported by the Partner API. Endpoint availability and OHLCV quality are therefore not gated by missing exchange licences. Market data is sourced from those licensed exchange feeds and MyStocks Africa's own research; your downstream use of it is governed by your Partner Agreement and the terms below.
African equity quotes are delivered on the exchanges' 15-minute-delayed data tier. This is the
contracted feed latency, not evidence of missing or incomplete exchange rights. MyStocks targets a
15-minute API refresh cadence during the published coverage window and exposes asOf so partners
can show the observation time precisely.
What your API key includes
Authenticated sandbox and production keys can call quotes, chart, history, and candle endpoints. Displaying that data inside your application to your end-users is included under the standard Partner Agreement, subject to attribution and exchange-specific terms. A separate data agreement is needed only for raw-data redistribution, standalone feeds or data products, bulk exports, research datasets, index construction, or other uses listed as restricted below.
Provider account errors such as TIER_REQUIRED describe the configuration of a particular upstream
integration. They do not indicate that MyStocks lacks rights from the underlying exchange and should
be escalated as an ingestion/configuration incident.
Permitted use
- Display stock prices, quotes, and market data to your end-users within your application.
- Render historical OHLCV charts from
GET /stocks/{symbol}/candlesin that application. - Cache price data for up to 24 hours to reduce API calls.
- Display company profiles, logos, and descriptions as returned by the API.
- Run portfolio analytics and performance calculations using your sub-accounts' data.
- Use market intelligence articles as editorial content in your product.
- Build derived data products (e.g. portfolio value, gain/loss) for your users.
Restricted use
- Reselling or redistributing raw exchange data (prices, OHLCV, ticks) to third parties.
- Creating a data feed, data product, or market-data service using MyStocks data.
- Sublicensing API access — all end-users must flow through MyStocks sub-accounts.
- Bulk-exporting the full instrument catalogue beyond normal application use.
- Using data to train machine-learning models for resale without a separate data agreement.
- Displaying data in a way that removes or obscures required exchange attribution.
Attribution requirements
When displaying market data to end-users, include the following attribution in a reasonably visible location in your UI:
Market data provided by MyStocks Africa
Some exchanges (NSE, JSE) require their own attribution on data derived from their feeds. MyStocks will notify you if a specific exchange imposes additional requirements.
Data accuracy & disclaimer.
- African equity prices are exchange-supplied, 15-minute-delayed data. The API is pull-based and targets a 15-minute refresh cadence during the published coverage window.
- Sandbox reads from the same delayed price feed as production. Sandbox accounts, wallets, orders, and settlement are isolated and virtual.
- Use
asOf,ageSeconds,stale, anddelayModeon each response to decide whether a price is suitable for display or order pricing. - MyStocks Africa makes no warranty of accuracy, completeness, or fitness for any particular purpose.
- Partners are solely responsible for compliance with applicable securities laws in their jurisdictions.
- Market data must not be used as the sole basis for investment advice to end-users without appropriate regulatory authorisation.
Intellectual property
Editorial content — company descriptions, market intelligence articles, sector summaries, and data enrichments — is the intellectual property of MyStocks Africa Limited. Exchange price data is subject to each exchange's own data-license terms, which are incorporated into your Partner Agreement by reference.
Bulk data & research licensing. For bulk historical data exports, academic research, index construction, or commercial data partnerships, contact data@mystocks.africa. A separate data-license agreement is required.
Before enabling a new audience, geography, export, widget, or derived-data feature, complete the Market-data redistribution rights review.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on