Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console
Market Data API

Stocks

Delayed and historical price data for equities and ETFs across supported African exchanges — quotes, charts, news pulse, company fundamentals, canonical tickers, and curated market intelligence. All read-only and data-key safe.

Delayed and historical price data for equities and ETFs across all supported African exchanges. GET /stocks returns equity data; GET /etfs mirrors the same shape for ETFs. All price endpoints accept exchange-qualified symbols (SCOM.KE) and bare tickers (SCOM) when unambiguous.

Examples use the production base. Swap /api/v1/partner for /api/sandbox/v1/partner (and an sk_sandbox_ key) to run any of them against the sandbox. Both environments read the same exchange-supplied, 15-minute-delayed feed. The API refresh target is 900 seconds; inspect asOf and stale on every quote and never label the price real-time.

List stocks

Returns a cursor-paginated catalogue of tradeable equities. Follow nextCursor while hasMore is true; narrow the catalogue with the filters below.

GET

/stocks

List stocks (NSE, NGX, JSE, GSE, BRVM, etc.)

Full endpoint documentation
Sandbox availablelistStocks

Returns the full tradeable stock and ETF universe across all supported African exchanges. Provides exchange-supplied, 15-minute-delayed stock price data. The API refresh target is 900 seconds during the published coverage window. These are not real-time prices. MyStocks holds full data rights for every supported exchange. - Nairobi Stock Exchange (NSE) in Kenya (KES) - Nigerian Exchange Group (NGX) in Nigeria (NGN) - Johannesburg Stock Exchange (JSE) in South Africa (ZAR) - Ghana Stock Exchange (GSE) in Ghana (GHS) - BRVM serving 8 West African French-speaking countries (XOF) - LuSE (Zambia), USE (Uganda), BSE (Botswana), DSE (Tanzania), ZSE (Zimbabwe), EGX (Egypt), MSE (Malawi), CSE (Morocco), and SEM (Mauritius). Filter by exchange, sector, asset type, or free-text search. Results are cursor-paginated to keep catalogue responses fast as market coverage grows. Use nextCursor while hasMore is true.

Parameters

exchangestringquery

Filter by exchange code. One of: NSE, NGX, JSE, GSE, BRVM, ZSE, BSE, LUSE, EGX, DSE, USE, MSE, CSE, SEM.

Example: NSE

sectorstringquery

Filter by GICS sector name.

Example: Telecommunications

assetTypeSTOCK | ETFquery

Filter to stocks or ETFs.

searchstringquery

Free-text match against symbol or company name.

Example: safaricom

limitintegerquery

Page size. Defaults to 50 and is capped at 200.

Example: 50

cursorstringquery

Continuation cursor returned as nextCursor by the previous page.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

stocksobject[]
stocks[].idstring

Unique stock identifier.

Example: "SCOM.KE"

stocks[].symbolstring

Exchange-qualified ticker symbol.

Example: "SCOM.KE"

stocks[].namestring

Full company name.

Example: "Safaricom PLC"

stocks[].slugstring | null

URL-safe identifier. Interchangeable with symbol.

Example: "safaricom"

stocks[].exchangestring

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

Example: "NSE"

stocks[].exchangeMicstring | null

ISO 10383 operating Market Identifier Code for the listing exchange.

Example: "XNAI"

stocks[].currencystring

Local trading currency.

Example: "KES"

stocks[].sectorstring | null

Example: "Telecommunications"

stocks[].assetTypeSTOCK | ETF
stocks[].listingStatusACTIVE | SUSPENDED | DELISTED
stocks[].pricenumber | null

Latest price in local currency.

Example: 16.5

stocks[].usdPricenumber | null

Latest price converted to USD at live spot rate.

Example: 0.1274

stocks[].changenumber | null

Absolute price change from previous close.

Example: 0.25

stocks[].changePctnumber | null

Percentage price change from previous close.

Example: 1.54

stocks[].opennumber | null

Session opening price in local currency.

stocks[].dayHighnumber | null

Intraday high in local currency.

stocks[].dayLownumber | null

Intraday low in local currency.

stocks[].volumeinteger | null

Current session trading volume.

stocks[].previousClosenumber | null

Prior session closing price.

stocks[].logoUrlstring | null

Self-hosted SVG logo. Safe to use as img src.

Example: "https://mystocks.africa/logos/scom-ke.svg"

stocks[].lastPriceUpdatestring | null
stocks[].marketStatusstring

Exchange state at quote time: OPEN or CLOSED. Present on /market/quotes and /market/movers responses.

stocks[].bidnumber | null

Best bid. Currently always null (no order-book depth in the data source).

stocks[].asknumber | null

Best ask. Currently always null (no order-book depth in the data source).

stocks[].dataFreshnessSecondsinteger | null

Seconds since the last price update. Present on /market/quotes and /market/movers responses.

stocks[].asOfstring | null

Timestamp of the exchange observation — NOT when the API answered. African equity data is 15-minute delayed and the API refresh target is 900 seconds, so display and evaluate freshness against this value.

stocks[].staleboolean

True when the price is older than two refresh intervals (30 minutes). The feed for this symbol is genuinely behind — do not trust the price for pricing a trade.

stocks[].dataQualityobject

The published market-data freshness contract. African equity quotes are supplied by the exchanges on a 15-minute-delayed basis, not in real time. MyStocks holds full exchange data rights. The API refresh target is 900 seconds during the published coverage window, with an end-of-day pass after market close.

countinteger

Number of stocks in this page.

totalCountinteger | null

Exact matching count when known; null for bounded cursor scans.

hasMoreboolean
nextCursorstring

Response codes

200List of stocks.

Single quote

Delayed quote for a single stock. Returns the full StockSummary shape plus open, dayHigh, dayLow, previousClose, volume, and a self-hosted logoUrl. The symbol path accepts exchange-qualified (SCOM.KE), slug (safaricom), or bare ticker (SCOM).

GET

/stocks/{symbol}

Get stock detail (NSE, NGX, JSE, etc.)

Full endpoint documentation
Sandbox availablegetStocks

Returns full delayed price and detail data for a single stock. Accepts exchange-qualified symbols (e.g. SCOM.KE for Safaricom PLC on the Nairobi Stock Exchange, DANGCEM.NG for Dangote Cement on the Nigerian Exchange Group, MTN.ZA on the Johannesburg Stock Exchange) or bare tickers (SCOM) when unambiguous.

Parameters

symbolstringpathRequired

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

Example: SCOM.KE

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

idstring

Unique stock identifier.

Example: "SCOM.KE"

symbolstring

Exchange-qualified ticker symbol.

Example: "SCOM.KE"

namestring

Full company name.

Example: "Safaricom PLC"

slugstring | null

URL-safe identifier. Interchangeable with symbol.

Example: "safaricom"

exchangestring

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

Example: "NSE"

exchangeMicstring | null

ISO 10383 operating Market Identifier Code for the listing exchange.

Example: "XNAI"

currencystring

Local trading currency.

Example: "KES"

sectorstring | null

Example: "Telecommunications"

assetTypeSTOCK | ETF
listingStatusACTIVE | SUSPENDED | DELISTED
pricenumber | null

Latest price in local currency.

Example: 16.5

usdPricenumber | null

Latest price converted to USD at live spot rate.

Example: 0.1274

changenumber | null

Absolute price change from previous close.

Example: 0.25

changePctnumber | null

Percentage price change from previous close.

Example: 1.54

opennumber | null

Session opening price in local currency.

dayHighnumber | null

Intraday high in local currency.

dayLownumber | null

Intraday low in local currency.

volumeinteger | null

Current session trading volume.

previousClosenumber | null

Prior session closing price.

logoUrlstring | null

Self-hosted SVG logo. Safe to use as img src.

Example: "https://mystocks.africa/logos/scom-ke.svg"

lastPriceUpdatestring | null
marketStatusstring

Exchange state at quote time: OPEN or CLOSED. Present on /market/quotes and /market/movers responses.

bidnumber | null

Best bid. Currently always null (no order-book depth in the data source).

asknumber | null

Best ask. Currently always null (no order-book depth in the data source).

dataFreshnessSecondsinteger | null

Seconds since the last price update. Present on /market/quotes and /market/movers responses.

asOfstring | null

Timestamp of the exchange observation — NOT when the API answered. African equity data is 15-minute delayed and the API refresh target is 900 seconds, so display and evaluate freshness against this value.

staleboolean

True when the price is older than two refresh intervals (30 minutes). The feed for this symbol is genuinely behind — do not trust the price for pricing a trade.

dataQualityobject

The published market-data freshness contract. African equity quotes are supplied by the exchanges on a 15-minute-delayed basis, not in real time. MyStocks holds full exchange data rights. The API refresh target is 900 seconds during the published coverage window, with an end-of-day pass after market close.

dataQuality.asOfstring | nullRequired

Timestamp of the exchange observation, not the time the API response was generated.

dataQuality.ageSecondsinteger | nullRequired

Age of the price in seconds (now − asOf).

dataQuality.stalebooleanRequired

True when the price is older than two refresh intervals.

dataQuality.delayModeDELAYED | END_OF_DAYRequired

DELAYED — exchange-supplied data in the 15-minute-delayed latency class. END_OF_DAY — outside the window; this is the most recent close, not a live quote.

dataQuality.delayMinutesintegerRequired

Exchange feed latency class in minutes. This is distinct from the API refresh target.

Example: 15

dataQuality.refreshIntervalSecondsintegerRequired

Target interval between API ingestion refreshes during the published coverage window.

Example: 900

dataQuality.providermstocks | mansaRequired

MyStocks ingestion connector for this exchange feed. This field does not describe exchange licensing or partner entitlement.

dataQuality.disclaimerstringRequired

Plain-English statement of what this price is and is not.

Response codes

200Stock detail.
404Symbol not found.

Price chart

The canonical stock-chart contract is GET /stocks/{symbol}/candles. Its response reports per-candle ohlcAvailable and series-level qualityStatus, qualityIssues, ohlcCoveragePct, volumeCoveragePct, and recommendedChartType. Use those fields to choose a candlestick, line, or unavailable state instead of assuming every listed symbol has complete OHLCV. It returns universal EOD closes plus OHLCV where available, in the listing currency with instrument and quality metadata. Intraday bucket requests can be sparse; inspect SPARSE_INTRADAY_COVERAGE and observed cadence.

The /stocks/{symbol}/chart and /history routes are deprecated compatibility shapes scheduled for removal on 2026-10-01. New integrations should not depend on their parallel-array schemas.

GET

/stocks/{symbol}/candles

Historical stock candles

Full endpoint documentation
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.

News pulse

Recent news headlines, corporate announcements, and analyst sentiment for a stock. Use it to populate a "News" tab or price-movement explanation in your UI.

GET

/stocks/{symbol}/pulse

Stock Pulse (news)

Full endpoint documentation
Sandbox availablelistPulse

Returns recent news articles and exchange announcements for a specific stock. Sourced from African financial news networks and official exchange feeds.

Parameters

symbolstringpathRequired

Example: SCOM.KE

limitintegerquery

Example: 10

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

articlesobject[]
articles[].titlestring
articles[].summarystring
articles[].urlstring
articles[].sourcestring
articles[].publishedAtstring
articles[].imageUrlstring | null

Response codes

200News articles for this stock.

Company profiles

Company fundamentals: description, sector, market cap, P/E ratio, EPS, 52-week high/low, and financial highlights. Also available as a list via GET /companies with ?exchange= and ?sector= filters.

GET /companies/{symbol}/news returns curated news and regulatory announcements (same shape as /pulse, sourced from exchange filings and newswires; supports ?limit= and ?cursor=).

Cursor-paginated canonical ticker list containing each symbol, slug, display name, and exchange. Use it to build a local symbol-resolution map or search index, following nextCursor until hasMore is false.

GET

/companies/{symbol}

Company profile

Full endpoint documentation
Sandbox availablegetCompanies

Returns detailed company profile including description, headquarters, sector, key financials, and links.

Parameters

symbolstringpathRequired

Example: SCOM.KE

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

symbolstring
namestring
exchangestring
sectorstring | null
countrystring
descriptionstring | null
websitestring | null
logoUrlstring | null
marketCapnumber | null
peRationumber | null

Response codes

200Company profile.
404Company not found.
GET

/companies

List companies

Full endpoint documentation
Sandbox availablelistCompanies

Returns company profiles with fundamental data (description, sector, country, financials). Supports exchange and sector filtering.

Parameters

exchangestringquery

Example: JSE

sectorstringquery
cursorstringquery

Opaque cursor returned by the previous page.

limitintegerquery

Example: 50

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

companiesobject[]
companies[].symbolstring
companies[].namestring
companies[].exchangestring
companies[].sectorstring | null
companies[].countrystring
companies[].descriptionstring | null
companies[].logoUrlstring | null
countinteger
hasMoreboolean
nextCursorstring | null

Response codes

200Company list.
GET

/companies/{symbol}/news

Company news & corporate actions

Full endpoint documentation
Sandbox availablelistNews

Returns a merged, reverse-chronological feed for a single company: MyStocks' curated market-intelligence items (source: MARKET_NEWS) plus corporate actions such as dividends, splits, and rights issues (source: CORPORATE_ACTION). This is the same curated editorial content shown in the MyStocks consumer app — not a high-volume third-party newswire. Filter to one kind with ?type=NEWS.

Parameters

symbolstringpathRequired

Example: SCOM.KE

typestringquery

Optional filter by item type, e.g. NEWS or a corporate-action type (DIVIDEND, SPLIT, ...).

Example: NEWS

limitintegerquery

Example: 50

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

symbolstring

Example: "SCOM.KE"

namestring

Example: "Safaricom PLC"

countinteger

Example: 5

itemsobject[]
items[].idstring
items[].sourceMARKET_NEWS | CORPORATE_ACTION
items[].typestring

NEWS for market intel; the action type (e.g. DIVIDEND) for corporate actions.

Example: "NEWS"

items[].titlestring
items[].descriptionstring
items[].urlstring
items[].exDatestring

Ex-date (corporate actions only).

items[].payDatestring

Pay-date (corporate actions only).

items[].amountnumber

Distribution amount (corporate actions only).

items[].currencystring
items[].createdAtstring

Response codes

200Merged company news and corporate-action feed.
GET

/companies/tickers

Ticker symbols

Full endpoint documentation
Sandbox availablelistTickers

Returns a cursor-paginated ticker catalogue across exchanges. Useful for symbol autocomplete or validation.

Parameters

exchangestringquery
assetTypestringquery
searchstringquery
limitintegerquery

Example: 50

cursorstringquery

Opaque cursor returned by the previous page.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

tickersstring[]

Example: ["SCOM.KE","EQTY.KE","DANGCEM.NG","NPN.ZA"]

countinteger
hasMoreboolean
nextCursorstring | null

Response codes

200All ticker symbols.

Market intelligence

Editorial market-intelligence articles and exchange announcements curated by the MyStocks research team. Filter the list by ?exchange=NGX or ?symbol=SCOM.KE (returns { articles, count }, newest first). The detail route resolves by document ID or URL slug and includes the full body field.

GET

/market-intel

Market Intel feed

Full endpoint documentation
Sandbox availablelistMarketIntel

Returns curated editorial articles across all African exchanges — macro analysis, sector reports, earnings commentary, and exchange announcements. Updated throughout the trading day.

Parameters

exchangestringquery
symbolstringquery
limitintegerquery

Example: 20

cursorstringquery

Last returned article ID; keep filters unchanged. Unknown cursors return 400.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

articlesobject[]Required
articles[].idstringRequired
articles[].titlestring | nullRequired
articles[].summarystring | nullRequired
articles[].categorystring | nullRequired
articles[].exchangestring | nullRequired
articles[].publishedAtstring | nullRequired
articles[].createdAtstring | nullRequired
countintegerRequired
hasMorebooleanRequired
nextCursorstring | nullRequired

Response codes

200Market intelligence articles.
400Invalid limit or cursor.
GET

/market-intel/{id}

Market intel article detail

Full endpoint documentation
Sandbox availablegetMarketIntelArticle

Returns full detail for a single market intelligence article, including the full body. Resolves by Firestore document ID or slug.

Parameters

idstringpathRequired

Article document ID or URL slug.

Example: nse-q1-2026-outlook

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

idstring
titlestring
summarystring | null
bodystring | null

Full article HTML or markdown content.

slugstring | null
categorystring | null
symbolsstring[]
exchangestring | null
imageUrlstring | null
sourcestring | null
sourceUrlstring | null
authorstring | null
tagsstring[]
publishedAtstring | null
createdAtstring | null

Response codes

200Article detail with full body.
404Article not found.

Was this page useful?

Your signal helps us tighten partner onboarding docs.

Send note

Last updated on

On this page