Embed African stock trading across 14 supported exchanges via Broker API, Trading API, and Market Data API surfaces. Sub-accounts, orders, wallets, KYC, bonds, funds, webhooks, and free sandbox.
This page requires JavaScript to render the interactive API explorer. Machine-readable resources are available without JavaScript:
The Partner API is organized by how an integration team works: onboard and manage users through the Broker API, place and supervise orders through the Trading API, and power discovery or quote screens through the Market Data API.
The TypeScript and Python clients are source previews for approved controlled-pilot partners; neither package is currently published to a public registry. Use the raw HTTP examples below until registry availability is announced in the changelog. See SDKs and Tools for current status.
import { MyStocksClient } from '@mystocks-africa/partner-sdk'; const client = new MyStocksClient({ apiKey: process.env.MYSTOCKS_SANDBOX_KEY!, environment: 'sandbox', }); const stocks = await client.market.listStocks({ exchange: 'NSE' }); const quote = await client.market.getQuotes({ symbol: 'SCOM.KE', exchange: 'NSE' }); const user = await client.subAccounts.create({ externalId: 'user_123', email: 'investor@example.com', displayName: 'Amina Otieno', });
More source-preview examples and raw HTTP equivalents live in the SDKs and Tools guide and in the OpenAPI code samples below.
The following fallback is generated from the same OpenAPI spec used by the interactive explorer, including methods, paths, parameters, request bodies, response schemas, and examples.
Creates a sandbox account and returns a **sandbox API key** (`sk_sandbox_…`). **Authentication:** Pass your Firebase ID token as `Authorization: Bearer <token>`. Obtain this token by signing in at the [partner dashboard](https://mystocks.africa/partners/login), then copying it from the API settings tab. The token identifies your Firebase account and is used to link the sandbox key to your partner profile. - Your master wallet is seeded with a virtual **00,000** on first registration. - Calling this endpoint again with the same Firebase token returns your existing key. - The sandbox is fully isolated — no real money moves. To go live, complete KYB verification via the partner dashboard and request a production key.
No request parameters.
201
401
403
curl -X POST https://mystocks.africa/api/sandbox/v1/register \ -H "Authorization: Bearer FIREBASE_ID_TOKEN"
const res = await fetch('https://mystocks.africa/api/sandbox/v1/register', { method: 'POST', headers: { Authorization: 'Bearer FIREBASE_ID_TOKEN' }, }); const { apiKey, walletBalance } = await res.json(); // apiKey starts with sk_sandbox_ — use it for all sandbox calls
import requests r = requests.post( 'https://mystocks.africa/api/sandbox/v1/register', headers={'Authorization': 'Bearer FIREBASE_ID_TOKEN'}, ) api_key = r.json()['apiKey']
Returns your partner profile — tier, wallet balance, API key metadata, and feature flags.
200
curl https://mystocks.africa/api/v1/partner/account \ -H "Authorization: Bearer pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/account', { headers: { Authorization: 'Bearer pk_live_KEY' }, }); const account = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/account', headers={'Authorization': 'Bearer pk_live_KEY'}) account = r.json()
Returns the current partner account status. **Authentication:** This endpoint requires a **Firebase ID token** (`Authorization: Bearer <firebase-token>`), not a partner API key. It is used by the partner portal dashboard on login. Response varies by account state: - Active live key → returns `status: active`, `maskedKey`, `businessName`, `email` **`maskedKey` is for display only — it is not a usable credential.** API keys are stored as SHA-256 hashes, so the raw key is shown exactly once (at issue or rotation) and cannot be retrieved afterwards. To call the API from a signed-in portal session, exchange the Firebase ID token for a short-lived access token via `POST /api/v1/partner/session`. - Suspended key → returns `status: suspended`, `businessName` - Pending/rejected application (no live key yet) → returns `status`, `businessName`, `applicationSubmittedAt`, `applicationRejectionReason` - No application → returns `status: not_found`
TOKEN=$(firebase-auth-token) curl https://mystocks.africa/api/v1/partner/me \ -H "Authorization: Bearer $TOKEN"
const token = await firebaseUser.getIdToken(); const res = await fetch('https://mystocks.africa/api/v1/partner/me', { headers: { Authorization: `Bearer ${token}` }, }); const { status, maskedKey, businessName } = await res.json();
Exchanges a **Firebase ID token** (the partner's portal login) for a short-lived `ms_oauth_` access token that can be sent as `Authorization: Bearer <token>` to any partner endpoint. This exists because partner API keys are stored only as SHA-256 hashes: the raw `pk_live_` key is displayed once, at issue or rotation, and is unrecoverable afterwards. `GET /me` can therefore only return a mask. A signed-in portal session uses this endpoint to obtain a credential it can actually call with. The token carries the active organization member and mirrors the underlying key's scopes and type. Effective access is the intersection of member permissions, key scopes, organization security policy, and environment policy. It expires after 1 hour and can be revoked earlier. Server-to-server integrations should keep using their `pk_live_` key directly, or the OAuth client-credentials flow (`POST /partner/oauth/token`) — not this endpoint.
const idToken = await firebaseUser.getIdToken(); const res = await fetch('https://mystocks.africa/api/v1/partner/session', { method: 'POST', headers: { Authorization: `Bearer ${idToken}` }, }); const { accessToken, expiresIn } = await res.json(); // Now call the partner API as the partner await fetch('https://mystocks.africa/api/v1/partner/account', { headers: { Authorization: `Bearer ${accessToken}` }, });
**Sandbox only.** Wipes all sub-accounts, orders, wallet balances, and webhooks for your partner key. Useful when you want a clean slate for a new test run. This action is **irreversible** within a session — there is no undo.
curl -X POST https://mystocks.africa/api/sandbox/v1/reset \ -H "Authorization: Bearer sk_sandbox_KEY"
await fetch('https://mystocks.africa/api/sandbox/v1/reset', { method: 'POST', headers: { Authorization: 'Bearer sk_sandbox_KEY' }, });
import requests requests.post('https://mystocks.africa/api/sandbox/v1/reset', headers={'Authorization': 'Bearer sk_sandbox_KEY'})
Returns the status of the caller's most recent upgrade request. **Authentication:** Firebase ID token required (`Authorization: Bearer <firebase-token>`). Pass `?type=tier_upgrade` to check a tier upgrade request specifically.
type
No inline examples. See the linked OpenAPI spec.
Submits an upgrade request to the MyStocks partnerships team. **Authentication:** Firebase ID token required (`Authorization: Bearer <firebase-token>`). **Two modes:** - **Sandbox → live key** (default, no `targetTier`): for partners without a live key yet. Triggers KYB review; live `pk_live_` key issued within 1–2 business days. - **Tier upgrade** (`targetTier` required): for partners with an active live key who want to move from starter → growth or enterprise.
object
400
TOKEN=$(firebase-auth-token) # Request live key curl -X POST https://mystocks.africa/api/v1/partner/upgrade-request \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"message":"Integration complete, ready for live clients."}' # Request tier upgrade curl -X POST https://mystocks.africa/api/v1/partner/upgrade-request \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"targetTier":"growth","message":"Expecting 300 req/min at launch."}'
const token = await firebaseUser.getIdToken(); await fetch('https://mystocks.africa/api/v1/partner/upgrade-request', { method: 'POST', headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ targetTier: 'growth', message: 'Need higher rate limit.' }), });
Submits a new B2B partner application to the MyStocks team. No authentication required. On success, a sandbox API key (`sk_sandbox_…`) is automatically provisioned so you can start building immediately — it is returned in the response. Your live production key (`pk_live_…`) is issued after the team reviews your application (typically 1–2 business days). Calling again with the same email returns an idempotent message if an application is already pending or approved.
curl -X POST https://mystocks.africa/api/v1/partner/apply \ -H "Content-Type: application/json" \ -d '{"businessName":"Acme Fintech","email":"dev@acme.com","useCase":"Embed stock trading into our neobank app","website":"https://acme.com"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/apply', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ businessName: 'Acme Fintech', email: 'dev@acme.com', useCase: 'Embed stock trading into our neobank app', website: 'https://acme.com', }), }); const { sandboxKey } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/apply', json={ 'businessName': 'Acme Fintech', 'email': 'dev@acme.com', 'useCase': 'Embed stock trading into our neobank app', }) sandbox_key = r.json().get('sandboxKey')
Returns stocks, ETFs, bonds, and funds in one normalized catalog. Instruments that exist but cannot currently be transacted remain discoverable with `tradable: false`, a status, and capability flags. Unknown exchange order constraints are returned as null rather than inferred.
assetClass
exchange
status
tradable
search
limit
cursor
Returns the full list of tradeable ETFs across all supported African exchanges. Prices are updated periodically during market hours. Filter by exchange or perform a text search on the ticker or name.
curl "https://mystocks.africa/api/v1/partner/etfs?exchange=JSE" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/etfs?exchange=JSE', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { etfs, count } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/etfs', params={'exchange': 'JSE'}, headers={'x-api-key': 'pk_live_KEY'}) etfs = r.json()['etfs']
Returns full price data, historical range chart data, and rich fund-specific metadata for a single ETF. Accepts exchange-qualified symbols (e.g., `GLD.ZA`) or bare tickers (e.g., `GLD`). Gated strictly to ETFs; querying standard stocks returns 404.
symbol
range
404
curl "https://mystocks.africa/api/v1/partner/etfs/GLD.ZA?range=3M" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/etfs/GLD.ZA?range=3M', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const etf = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/etfs/GLD.ZA', params={'range': '3M'}, headers={'x-api-key': 'pk_live_KEY'}) etf = r.json()
Returns OHLCV candles for the given ETF symbol. Gated strictly to ETFs; querying standard stocks returns 404. Supported periods: `1d`, `1w`, `1m`, `3m`, `6m`, `1y`, `3y`, `5y`, `max`. Candle interval is auto-selected based on period.
period
curl "https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/history?period=3m" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/history?period=3m', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { candles } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/history', params={'period': '3m'}, headers={'x-api-key': 'pk_live_KEY'}) candles = r.json()['candles']
Returns pre-computed chart data for rendering price charts. Equivalent to `/etfs/{symbol}/history` but shaped for direct chart rendering with primary prices in local currency. Gated strictly to ETFs; querying standard stocks returns 404.
curl "https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/chart?period=1y" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/chart?period=1y', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { labels, prices } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/etfs/GLD.ZA/chart', params={'period': '1y'}, headers={'x-api-key': 'pk_live_KEY'})
Returns delayed price quotes for one or many stock/ETF symbols. Operates in two modes: **Single-symbol mode** (`?symbol=X&exchange=Y`) Both `symbol` and `exchange` are required. Returns a single `data` object. **Batch mode** (`?symbols=X,Y,Z`) Comma-separated list of exchange-qualified tickers (up to 50). `exchange` is optional as a filter. Returns `data` array and a `not_found` array for any symbols that could not be resolved. Also available at `GET /market-data/quotes` (identical handler).
symbols
429
# Single-symbol curl "https://mystocks.africa/api/v1/partner/market/quotes?symbol=SCOM.KE&exchange=NSE" \ -H "x-api-key: pk_live_KEY" # Batch curl "https://mystocks.africa/api/v1/partner/market/quotes?symbols=SCOM.KE,GLD.ZA" \ -H "x-api-key: pk_live_KEY"
// Single-symbol const res = await fetch( 'https://mystocks.africa/api/v1/partner/market/quotes?symbol=SCOM.KE&exchange=NSE', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data, meta } = await res.json(); // Batch const batchRes = await fetch( 'https://mystocks.africa/api/v1/partner/market/quotes?symbols=SCOM.KE,GLD.ZA', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data: quotes, not_found, meta: batchMeta } = await batchRes.json();
import requests # Single-symbol r = requests.get('https://mystocks.africa/api/v1/partner/market/quotes', params={'symbol': 'SCOM.KE', 'exchange': 'NSE'}, headers={'x-api-key': 'pk_live_KEY'}) stock = r.json()['data'] # Batch r = requests.get('https://mystocks.africa/api/v1/partner/market/quotes', params={'symbols': 'SCOM.KE,GLD.ZA'}, headers={'x-api-key': 'pk_live_KEY'}) quotes = r.json()['data']
Returns the full tradeable stock and ETF universe across all supported African exchanges. Provides delayed stock price data (refreshed approximately every 15 minutes during trading hours) for key markets: - 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`. The response is the **full filtered list** (`{stocks, count}`) — this endpoint is not paginated; narrow it with filters. Excellent for populating stock search screens and building live tickers.
sector
assetType
curl "https://mystocks.africa/api/v1/partner/stocks?exchange=NSE" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/stocks?exchange=NSE', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { stocks, count } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/stocks', params={'exchange': 'NSE'}, headers={'x-api-key': 'pk_live_KEY'}) stocks = r.json()['stocks']
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.
curl https://mystocks.africa/api/v1/partner/stocks/SCOM.KE \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/stocks/SCOM.KE', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const stock = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/stocks/SCOM.KE', headers={'x-api-key': 'pk_live_KEY'}) stock = r.json()
Returns OHLCV candles for the given symbol. Supported periods: `1d`, `1w`, `1m`, `3m`, `6m`, `1y`, `3y`, `5y`, `max`. Candle interval is auto-selected based on period (daily for ≤3 m, weekly for ≤1 y, monthly beyond).
curl "https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/history?period=3m" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/history?period=3m', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { candles } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/history', params={'period': '3m'}, headers={'x-api-key': 'pk_live_KEY'}) candles = r.json()['candles']
Returns pre-computed chart data for rendering price charts. Equivalent to `/stocks/{symbol}/history` but shaped for direct chart rendering.
curl "https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/chart?period=1y" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/chart?period=1y', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { labels, prices } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/chart', params={'period': '1y'}, headers={'x-api-key': 'pk_live_KEY'})
Returns recent news articles and exchange announcements for a specific stock. Sourced from African financial news networks and official exchange feeds.
curl "https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/pulse?limit=5" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/pulse?limit=5', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { articles } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/stocks/SCOM.KE/pulse', params={'limit': 5}, headers={'x-api-key': 'pk_live_KEY'})
Returns company profiles with fundamental data (description, sector, country, financials). Supports exchange and sector filtering.
page
curl "https://mystocks.africa/api/v1/partner/companies?exchange=JSE&limit=10" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/companies?exchange=JSE', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { companies } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/companies', params={'exchange': 'JSE'}, headers={'x-api-key': 'pk_live_KEY'})
Returns a flat list of all ticker symbols across all exchanges. Useful for symbol autocomplete or validation.
curl https://mystocks.africa/api/v1/partner/companies/tickers \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/companies/tickers', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { tickers } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/companies/tickers', headers={'x-api-key': 'pk_live_KEY'}) tickers = r.json()['tickers']
Returns detailed company profile including description, headquarters, sector, key financials, and links.
curl https://mystocks.africa/api/v1/partner/companies/SCOM.KE \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/companies/SCOM.KE', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const company = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/companies/SCOM.KE', headers={'x-api-key': 'pk_live_KEY'})
curl "https://mystocks.africa/api/v1/partner/companies/SCOM.KE/chart?period=1y" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/companies/SCOM.KE/chart?period=1y', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { labels, prices } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/companies/SCOM.KE/chart', params={'period': '1y'}, headers={'x-api-key': 'pk_live_KEY'})
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`.
curl "https://mystocks.africa/api/v1/partner/companies/SCOM.KE/news?limit=5" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/companies/SCOM.KE/news?limit=5', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { items } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/companies/SCOM.KE/news', params={'limit': 5}, headers={'x-api-key': 'pk_live_KEY'})
Returns full detail for a single market intelligence article, including the full body. Resolves by Firestore document ID or slug.
id
curl https://mystocks.africa/api/v1/partner/market-intel/nse-q1-2026-outlook \ -H "x-api-key: pk_live_KEY"
Returns exchange closure dates for a given date range. Use this to: - Show users when a specific exchange is closed before they try to trade. - Build "next trading day" schedulers (skip weekends and holidays). - Display an in-app holiday calendar alongside market status. Defaults: `from` = today, `to` = 12 months from today. Maximum range is 2 years. All African exchanges (UTC+0 to UTC+3) use ISO 8601 dates in UTC.
from
to
# All NSE holidays for the next 6 months curl "https://mystocks.africa/api/v1/partner/market/holidays?exchange=NSE&from=2026-06-06&to=2026-12-31" \ -H "x-api-key: pk_live_KEY" # All exchanges, full upcoming year (default range) curl "https://mystocks.africa/api/v1/partner/market/holidays" \ -H "x-api-key: pk_live_KEY"
// NSE holidays — next 6 months const res = await fetch( 'https://mystocks.africa/api/v1/partner/market/holidays?exchange=NSE&from=2026-06-06&to=2026-12-31', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data } = await res.json(); // data: [{ exchange: 'NSE', date: '2026-06-01', reason: 'Madaraka Day' }, ...]
import requests r = requests.get( 'https://mystocks.africa/api/v1/partner/market/holidays', params={'exchange': 'NSE', 'from': '2026-06-06', 'to': '2026-12-31'}, headers={'x-api-key': 'pk_live_KEY'} )
Returns the MyStocks-managed FX table used to convert local market currencies and partner local funding instructions into the USD ledger. Rates use the convention "local currency units per USD".
curl https://mystocks.africa/api/v1/partner/fx/rates \ -H "x-api-key: pk_live_KEY"
Returns the price alerts registered by this partner.
state
Registers a price alert. When the latest delayed price observation crosses the threshold while the exchange is open, a `price.alert` webhook fires and the event is streamed on GET /stream. `threshold` is in the instrument's LOCAL trading currency — the same basis as a quote's `price`. Alerts are evaluated on the same ~15-minute polling cycle as quotes, so an alert fires on the first poll after the crossing, not at the instant of the tick. Do not use a price alert as an execution trigger — place a resting LIMIT or STOP order instead. Maximum 200 active alerts per partner. Requires a full key (pk_live_).
curl -X POST https://mystocks.africa/api/v1/partner/price-alerts \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: 8f14e45f-ceea-467a-9575-9f0c0b6f1f2a" \ -H "Content-Type: application/json" \ -d '{"symbol": "SCOM.KE", "exchange": "NSE", "condition": "above", "threshold": 20.00}'
const res = await fetch('https://mystocks.africa/api/v1/partner/price-alerts', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ symbol: 'SCOM.KE', exchange: 'NSE', condition: 'above', threshold: 20 }), }); const alert = await res.json();
import requests, uuid r = requests.post('https://mystocks.africa/api/v1/partner/price-alerts', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': str(uuid.uuid4())}, json={'symbol': 'SCOM.KE', 'exchange': 'NSE', 'condition': 'above', 'threshold': 20.00})
alertId
Removes a price alert. Requires a full key (pk_live_).
Returns the top price movers (gainers or losers) for a given exchange, sorted by percentage change. Results are paginated (meta uses camelCase `totalCount`/`perPage`/`hasNext`; the snake_case aliases are deprecated, removal 2026-10-01). Also available at `GET /market-data/movers` (deprecated alias, identical handler).
direction
curl "https://mystocks.africa/api/v1/partner/market/movers?exchange=NSE&direction=gainers&limit=10" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/market/movers?exchange=NSE&direction=gainers', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data, meta } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/movers', params={'exchange': 'NSE', 'direction': 'gainers', 'limit': 10}, headers={'x-api-key': 'pk_live_KEY'}) movers = r.json()['data']
Deprecated alias of `GET /market/movers`. Identical handler and response shape. Existing integrations keep working; use `/market/movers` in new code.
Deprecated alias of `GET /market/quotes`. Identical handler and response shape. Existing integrations keep working; use `/market/quotes` in new code.
Returns metadata for all supported exchanges — exchange code, name, country, currency, timezone, local trading hours, and real-time market status (OPEN/CLOSED). No parameters required. Response reflects the current server time. Formerly `GET /market-data/exchanges`, which remains a supported (deprecated) alias.
curl https://mystocks.africa/api/v1/partner/market/exchanges \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/market/exchanges', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { data, meta } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/exchanges', headers={'x-api-key': 'pk_live_KEY'}) exchanges = r.json()['data']
Deprecated alias of `GET /market/exchanges` — same handler and response shape. Existing integrations keep working; use `/market/exchanges` in new code.
Returns a one-call bundle for one or many symbols: the delayed `quote` (same shape as `/market/quotes`, carrying `asOf`, `stale`, and `dataQuality`), today's `dailyBar`, the `prevDailyBar`, and the latest coarse `intradayBar` sample. Replaces the 3–4 round-trips a dashboard would otherwise make. Single mode requires both `symbol` and `exchange`; batch mode takes `symbols` (comma-separated, ≤50), returning a map of symbol → snapshot plus `not_found`. `dailyBar` is derived from the live quote until the end-of-day pass writes today's candle. `intradayBar` is `null` until the 3×/day intraday capture has run for the symbol.
curl "https://mystocks.africa/api/v1/partner/market/snapshot?symbols=SCOM.KE,MTN.ZA" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/market/snapshot?symbols=SCOM.KE,MTN.ZA', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data, not_found } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/snapshot', params={'symbols': 'SCOM.KE,MTN.ZA'}, headers={'x-api-key': 'pk_live_KEY'}) snapshots = r.json()['data']
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.
timeframe
interval
curl "https://mystocks.africa/api/v1/partner/market/ohlcv?symbol=SCOM.KE&exchange=NSE&from=2026-01-01&to=2026-06-04" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/market/ohlcv?symbol=SCOM.KE&exchange=NSE&from=2026-01-01&to=2026-06-04', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data, meta } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/ohlcv', params={'symbol': 'SCOM.KE', 'exchange': 'NSE', 'from': '2026-01-01', 'to': '2026-06-04'}, headers={'x-api-key': 'pk_live_KEY'}) candles = r.json()['data']
Deprecated alias of `GET /market/ohlcv` — same handler, parameters, and response shape. Existing integrations keep working; use `/market/ohlcv` in new code.
Returns curated editorial articles across all African exchanges — macro analysis, sector reports, earnings commentary, and exchange announcements. Updated throughout the trading day.
curl "https://mystocks.africa/api/v1/partner/market-intel?exchange=NGX&limit=10" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/market-intel?exchange=NGX', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { articles } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market-intel', params={'exchange': 'NGX', 'limit': 10}, headers={'x-api-key': 'pk_live_KEY'})
Returns the real-time open/closed status for each supported African stock exchange (NSE, NGX, JSE, GSE, BRVM, ZSE, BSE, LUSE, EGX, DSE, USE, MSE, CSE, SEM), next session boundaries, server time, and local trading hours. Pass `?exchange=NSE` to get status for a single exchange. Without the filter the response includes all exchanges plus an `anyOpen` boolean.
curl https://mystocks.africa/api/v1/partner/market/status \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/market/status', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { anyOpen, exchanges } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/status', headers={'x-api-key': 'pk_live_KEY'})
Alias of `/market/status`. Returns the identical payload and uses the same holiday-aware session calculation.
Returns the official T+N settlement cycle for each supported exchange (i.e. when title and beneficial ownership transfer after trade execution), plus the MyStocks live fill SLA for market orders submitted during exchange hours. **Important distinction** - **MyStocks live fill SLA** — the time before a PENDING live order moves to COMPLETED or REJECTED. Execution window: 1 to 5 minutes during market hours. - **Exchange settlement cycle** — the standard T+N cycle mandated by the exchange and its CSD. This governs when the underlying shares clear through the depository (T+2 for EGX, T+3 for all other supported exchanges). Use `?exchange=NSE` to filter to a single exchange.
curl https://mystocks.africa/api/v1/partner/market/settlement \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/market/settlement', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { processingWindow, exchanges } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/market/settlement', headers={'x-api-key': 'pk_live_KEY'})
Returns a pre-trade fee quote using the latest delayed price observation. Includes the local and USD price, gross order cost, base fee, partner markup fee, and total cost for BUY or estimated proceeds for SELL. Also returns whether the partner wallet has sufficient balance/holdings. Size the quote with **either** `quantity` (share mode) **or** `cashValue` (cash mode) — they are mutually exclusive, and the subsequent trade must use the **same mode and value**. Cash-mode quotes return an indicative fractional `quantity`; the order is sized at execution price and validated against the quoted `cashValue`. Always fetch a quote immediately before placing a trade to confirm the current cost.
quantity
cashValue
subAccountId
curl "https://mystocks.africa/api/v1/partner/quote/SCOM.KE?type=BUY&quantity=500" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/quote/SCOM.KE?type=BUY&quantity=500', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { totalCost, fee, sufficientFunds } = await res.json();
import requests r = requests.get( 'https://mystocks.africa/api/v1/partner/quote/SCOM.KE', params={'type': 'BUY', 'quantity': 500}, headers={'x-api-key': 'pk_live_KEY'}) quote = r.json()
Places a BUY or SELL order on your own partner account (not a sub-account — use `/users/{userId}/trade` for those). **BUY** — escrows USD from your master wallet. Settlement is T+3 for most African exchanges. **SELL** — requires you to hold the shares. Proceeds are credited on settlement. Pass `Idempotency-Key` to make retries safe. The same key returns the cached order within 24 h.
TradeRequest
409
422
curl -X POST https://mystocks.africa/api/v1/partner/trade \ -H "Authorization: Bearer pk_live_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: trade_$(date +%s)" \ -d '{"symbol":"SCOM.KE","type":"BUY","quantity":500}'
const res = await fetch('https://mystocks.africa/api/v1/partner/trade', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Content-Type': 'application/json', 'Idempotency-Key': `trade_${Date.now()}`, }, body: JSON.stringify({ symbol: 'SCOM.KE', type: 'BUY', quantity: 500 }), }); const { orderId, status } = await res.json();
import requests, time r = requests.post('https://mystocks.africa/api/v1/partner/trade', headers={ 'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': f'trade_{int(time.time())}', }, json={'symbol': 'SCOM.KE', 'type': 'BUY', 'quantity': 500}) order = r.json()
Returns all open equity positions on your partner account — current holdings, average cost, unrealised P&L, and market value in USD.
curl https://mystocks.africa/api/v1/partner/portfolio \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/portfolio', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { holdings, summary } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/portfolio', headers={'x-api-key': 'pk_live_KEY'})
Daily raw-equity history for the partner master trading account only. This endpoint does not consolidate sub-accounts and is not cash-flow adjusted; deposits and withdrawals therefore affect changes in equity.
Returns your partner order history. Filter by status, symbol, or date range.
curl "https://mystocks.africa/api/v1/partner/orders?status=FILLED&limit=20" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/orders?status=FILLED', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { orders, total } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/orders', params={'status': 'FILLED', 'limit': 20}, headers={'x-api-key': 'pk_live_KEY'})
Returns a single order by ID.
orderId
curl https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const order = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', headers={'x-api-key': 'pk_live_KEY'})
Replaces a resting LIMIT/STOP/STOP_LIMIT order on the master account in place, keeping the same orderId. Only WORKING orders can be modified — a MARKET order is already PENDING at the dealing desk and can only be cancelled. Check `replaceable` on the order. Supply any combination of limitPrice, stopPrice, and quantity. The replace is repriced on the same FX basis and fee rates captured when the order was placed. A BUY re-escrows the difference (400 INSUFFICIENT_FUNDS if the wallet cannot cover an increase); a SELL adjusts reserved units. An Idempotency-Key is required because this moves money. The sub-account equivalent is PATCH /users/{userId}/orders/{orderId}.
curl -X PATCH https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: 8f14e45f-ceea-467a-9575-9f0c0b6f1f2a" \ -H "Content-Type: application/json" \ -d '{"limitPrice": 18.50, "quantity": 200}'
const res = await fetch('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', { method: 'PATCH', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ limitPrice: 18.5, quantity: 200 }), }); const order = await res.json();
import requests, uuid r = requests.patch('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': str(uuid.uuid4())}, json={'limitPrice': 18.50, 'quantity': 200})
Cancels a PENDING order. Returns 422 if the order has already been settled or rejected.
curl -X DELETE https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: cancel_order_001"
await fetch('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', { method: 'DELETE', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'cancel_order_001' }, });
import requests requests.delete('https://mystocks.africa/api/v1/partner/orders/ord_abc123xyz', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'cancel_order_001'})
Returns OMS execution reports for a partner master-account order, including receipt, fill, rejection, and cancellation reports.
Settlement-aware balance for the partner master account. See /users/{userId}/buying-power for field semantics.
Returns all available bonds, treasury bills, and fixed-income instruments. Includes coupon rate, maturity date, minimum investment, and current yield.
country
curl "https://mystocks.africa/api/v1/partner/bonds?country=KE" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/bonds?country=KE', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { bonds } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/bonds', params={'country': 'KE'}, headers={'x-api-key': 'pk_live_KEY'})
Returns full detail for a specific bond or fixed-income instrument.
curl https://mystocks.africa/api/v1/partner/bonds/ke_tbill_91d_2026 \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/bonds/ke_tbill_91d_2026', { headers: { 'x-api-key': 'pk_live_KEY' }, });
import requests r = requests.get('https://mystocks.africa/api/v1/partner/bonds/ke_tbill_91d_2026', headers={'x-api-key': 'pk_live_KEY'})
Returns all available money market funds, unit trusts, and ETFs. Includes NAV, annualised return, and minimum investment.
curl "https://mystocks.africa/api/v1/partner/funds?type=MMF" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/funds?type=MMF', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { funds } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/funds', params={'type': 'MMF'}, headers={'x-api-key': 'pk_live_KEY'})
Returns full details for a specific fund or ETF.
curl https://mystocks.africa/api/v1/partner/funds/fund_mmf_africa \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/funds/fund_mmf_africa', { headers: { 'x-api-key': 'pk_live_KEY' }, });
import requests r = requests.get('https://mystocks.africa/api/v1/partner/funds/fund_mmf_africa', headers={'x-api-key': 'pk_live_KEY'})
Returns open private credit deals and pre-IPO opportunities available to your sub-accounts. Each deal has a minimum ticket size, close date, and target return.
curl https://mystocks.africa/api/v1/partner/opportunities \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/opportunities', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { opportunities } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/opportunities', headers={'x-api-key': 'pk_live_KEY'})
Returns full detail for a single private market deal or pre-IPO offering. Resolves from the opportunities collection first, then preIPOOfferings. Accepts document ID or slug.
curl https://mystocks.africa/api/v1/partner/opportunities/acme-series-b-2026 \ -H "x-api-key: pk_live_KEY"
Single-call convenience endpoint that creates a sub-account **and** returns an API token for it. Idempotent on `uid` — calling twice with the same uid returns the existing sub-account and a fresh token. Equivalent to POST /users but returns auth context in one round trip.
AutoRegisterRequest
curl -X POST https://mystocks.africa/api/v1/partner/auto-register \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: auto_register_user_42" \ -H "Content-Type: application/json" \ -d '{"uid":"user_42","email":"alice@yourapp.com","name":"Alice K.","country":"KE"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/auto-register', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'auto_register_user_42', 'Content-Type': 'application/json' }, body: JSON.stringify({ uid: 'user_42', email: 'alice@yourapp.com', name: 'Alice K.', country: 'KE' }), }); const { subAccountId, token } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/auto-register', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'auto_register_user_42'}, json={'uid': 'user_42', 'email': 'alice@yourapp.com', 'name': 'Alice K.', 'country': 'KE'}) data = r.json()
Returns all sub-accounts for your partner key. Supports pagination and status filtering.
curl "https://mystocks.africa/api/v1/partner/users?limit=20" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/users?limit=20', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { users, total } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users', params={'limit': 20}, headers={'x-api-key': 'pk_live_KEY'})
Creates a new sub-account. Each sub-account has an isolated USD wallet, portfolio, and order book. The `externalId` is your own reference — it must be unique per partner and is used in all subsequent calls. Sub-accounts start with a `walletBalance` of $0 — fund them via POST `/users/{userId}/deposit`.
CreateSubAccountRequest
curl -X POST https://mystocks.africa/api/v1/partner/users \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: create_user_8821" \ -H "Content-Type: application/json" \ -d '{"externalId":"usr_8821","displayName":"Alice K.","email":"alice@yourapp.com"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/users', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'create_user_8821', 'Content-Type': 'application/json' }, body: JSON.stringify({ externalId: 'usr_8821', displayName: 'Alice K.', email: 'alice@yourapp.com' }), }); const { subAccountId } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/users', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'create_user_8821'}, json={'externalId': 'usr_8821', 'displayName': 'Alice K.', 'email': 'alice@yourapp.com'})
Returns a single sub-account by its MyStocks `subAccountId`. Use this to check wallet balance, KYC status, and account state.
userId
curl https://mystocks.africa/api/v1/partner/users/usr_abc123 \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const user = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123', headers={'x-api-key': 'pk_live_KEY'})
Updates mutable fields on a sub-account. All fields are optional — only provided fields are changed. Set `status` to `frozen` to immediately suspend all trading, deposits, and withdrawals for a user. Set back to `active` to restore access.
UpdateSubAccountRequest
curl -X PATCH https://mystocks.africa/api/v1/partner/users/usr_abc123 \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: update_user_abc123_001" \ -H "Content-Type: application/json" \ -d '{"status":"frozen"}'
await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123', { method: 'PATCH', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'update_user_abc123_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ status: 'frozen' }), });
import requests requests.patch('https://mystocks.africa/api/v1/partner/users/usr_abc123', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'update_user_abc123_001'}, json={'status': 'frozen'})
Soft-closes/offboards a sub-account. This is a terminal state: closed sub-accounts cannot trade, receive deposits, or withdraw. The record is retained for audit, regulatory, and support purposes. Closure is blocked while the sub-account has open orders, positive holdings, or unsettled proceeds. If the USD wallet has residual cash, either withdraw it first or pass `residualCashHandling: "transfer_to_partner"` to atomically move the cash back to the partner master wallet during closure. Emits `account.closed` to registered webhooks. Requires `Idempotency-Key`.
CloseSubAccountRequest
curl -X DELETE https://mystocks.africa/api/v1/partner/users/usr_abc123 \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: close_usr_abc123_001" \ -H "Content-Type: application/json" \ -d '{"residualCashHandling":"transfer_to_partner","reason":"User requested closure"}'
await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123', { method: 'DELETE', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': crypto.randomUUID(), 'Content-Type': 'application/json', }, body: JSON.stringify({ residualCashHandling: 'transfer_to_partner' }), });
Credits USD from your **master wallet** into a sub-account's wallet. Your master wallet must have sufficient balance — check via GET /account. **Managed FX model** — pass a USD ledger amount (`amount` or `amountUsd`) or pass `amount` with a non-USD `currency` such as `KES`. MyStocks converts supported non-USD amounts into the USD ledger using the managed FX table from GET `/fx/rates`. Pass `Idempotency-Key` to make deposit retries safe on network failure.
DepositRequest
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/deposit \ -H "Authorization: Bearer pk_live_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: dep_usr_abc123_1743152580" \ -d '{"amount":65000,"currency":"KES","note":"Mpesa STK push ref KE2482"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/deposit', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Content-Type': 'application/json', 'Idempotency-Key': 'dep_usr_abc123_1743152580', }, body: JSON.stringify({ amount: 65000, currency: 'KES', note: 'Mpesa STK push' }), }); const { walletBalance } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/deposit', headers={ 'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'dep_usr_abc123_1743152580', }, json={'amount': 65000, 'currency': 'KES', 'note': 'Mpesa STK push'})
Moves USD from a sub-account's wallet back to your **master wallet**. Use this when your user requests a cash-out. The funds are immediately available in your master wallet. Pass a USD ledger amount or a supported local `amount` + `currency`; non-USD values are converted with MyStocks managed FX. Pass `Idempotency-Key` to make withdrawals safe to retry.
WithdrawRequest
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/withdraw \ -H "Authorization: Bearer pk_live_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: wd_usr_abc123_1743152999" \ -d '{"amount":26000,"currency":"KES","note":"User requested withdrawal"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/withdraw', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Content-Type': 'application/json', 'Idempotency-Key': `wd_${userId}_${Date.now()}`, }, body: JSON.stringify({ amount: 26000, currency: 'KES', note: 'User withdrawal' }), });
import requests, time requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/withdraw', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': f'wd_abc123_{int(time.time())}'}, json={'amount': 26000, 'currency': 'KES'})
Returns the current wallet balance and recent transaction history for a sub-account.
curl https://mystocks.africa/api/v1/partner/users/usr_abc123/wallet \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/wallet', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { balance, transactions } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123/wallet', headers={'x-api-key': 'pk_live_KEY'})
Settlement-aware balance for a sub-account. `buyingPowerUsd` is cash available to trade (unsettled SELL proceeds are usable for new buys, as is standard). `withdrawableUsd` excludes unsettled SELL proceeds, which remain locked until exchange settlement (T+N) — this is the free-riding guard. `settlements[]` lists each unsettled tranche and its settlement date.
Open tax lots for a sub-account — each remaining acquired quantity with per-unit cost basis and acquisition date, derived FIFO from settled orders. Pair with /gains for realized disposals.
Realized gains/losses for a sub-account — each disposal FIFO-matched to its acquiring lot, with acquisition + disposal dates, cost basis, proceeds, holding period, and gain. Feed a capital-gains tax statement.
Places a BUY or SELL order on behalf of a sub-account. The sub-account's wallet is escrowed for BUY orders; holdings are checked for SELL. The sub-account must have `kycStatus: VERIFIED` to trade. Pass `Idempotency-Key` to make trade retries safe.
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/trade \ -H "Authorization: Bearer pk_live_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: tr_usr_abc123_1743153100" \ -d '{"symbol":"SCOM.KE","type":"BUY","quantity":500}'
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/trade', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Content-Type': 'application/json', 'Idempotency-Key': `tr_usr_abc123_${Date.now()}`, }, body: JSON.stringify({ symbol: 'SCOM.KE', type: 'BUY', quantity: 500 }), }); const { orderId } = await res.json();
import requests, time r = requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/trade', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': f'tr_abc123_{int(time.time())}'}, json={'symbol': 'SCOM.KE', 'type': 'BUY', 'quantity': 500})
Returns all open equity positions held by a sub-account, with current market value and unrealised P&L in USD.
curl https://mystocks.africa/api/v1/partner/users/usr_abc123/portfolio \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/portfolio', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { holdings, summary } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123/portfolio', headers={'x-api-key': 'pk_live_KEY'})
Daily raw-equity history for one sub-account owned by the authenticated partner. Values include wallet cash and holdings but are not cash-flow adjusted, so they must not be presented as investment P&L.
Returns order history for a sub-account. Filter by status, symbol, or date range.
curl "https://mystocks.africa/api/v1/partner/users/usr_abc123/orders?status=FILLED" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders?status=FILLED', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { orders } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123/orders', params={'status': 'FILLED'}, headers={'x-api-key': 'pk_live_KEY'})
Returns a single order for a sub-account by order ID.
curl https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', { headers: { 'x-api-key': 'pk_live_KEY' } } );
import requests r = requests.get( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', headers={'x-api-key': 'pk_live_KEY'})
Modifies a **WORKING** resting order (LIMIT / STOP / STOP_LIMIT) in place, keeping the same `orderId`. Supply any of `limitPrice`, `stopPrice`, `quantity` — the BUY escrow or SELL unit reservation is adjusted by the delta atomically. Prices are in the stock's LOCAL trading currency. Only WORKING resting orders can be modified — market orders (PENDING at the dealing desk) and terminal orders return `409`. Increasing a BUY escrow beyond the available wallet balance returns `400 INSUFFICIENT_FUNDS`; increasing a SELL quantity beyond available units returns `409`. Fires the `order.replaced` webhook and writes a REPLACE execution report. A unique `Idempotency-Key` header is **required** (this moves escrow).
curl -X PATCH \ https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: replace_ord_abc123xyz_1" \ -H "Content-Type: application/json" \ -d '{"limitPrice": 21.5, "quantity": 150}'
await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', { method: 'PATCH', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'replace_ord_abc123xyz_1', 'Content-Type': 'application/json' }, body: JSON.stringify({ limitPrice: 21.5, quantity: 150 }) } );
import requests requests.patch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'replace_ord_abc123xyz_1'}, json={'limitPrice': 21.5, 'quantity': 150})
Cancels a PENDING order on a sub-account. Returns 422 if the order is already settled or rejected.
curl -X DELETE \ https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: cancel_user_order_001"
await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', { method: 'DELETE', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'cancel_user_order_001' } } );
import requests requests.delete( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/orders/ord_abc123xyz', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'cancel_user_order_001'})
Returns OMS execution reports for a sub-account order, including receipt, fill, rejection, and cancellation reports.
Returns the full ledger transaction history for a sub-account — deposits, withdrawals, trade escrows (INVEST), trade settlements (SELL), dividend distributions, fund redemptions, and fee entries. Cursor-paginated; use `nextCursor` from the previous response as the `cursor` query param to fetch the next page.
curl "https://mystocks.africa/api/v1/partner/users/usr_abc123/transactions?limit=20&type=DEPOSIT" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/transactions?limit=20&type=DEPOSIT', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { transactions, hasMore, nextCursor } = await res.json();
import requests r = requests.get( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/transactions', params={'limit': 20, 'type': 'DEPOSIT'}, headers={'x-api-key': 'pk_live_KEY'})
Asserts the KYC status of a sub-account. MyStocks defers identity verification to your platform — you send us the result of your own KYC process. `VERIFIED` + `BASIC` is sufficient to unlock trading and asset subscriptions. `FULL` is required for higher transaction limits and private credit deals. The `reference` field stores your internal KYC session ID for audit correlation. You may also attach an optional structured compliance profile (ID document type, date of birth, nationality, tax residency, PEP/sanctions screening result, risk rating, consent timestamp, evidence reference). Sensitive identifiers — `idNumber` and `taxId` — are stored as a sha256 fingerprint plus last-4 only and are never returned in full. All profile fields are optional and additive.
KycRequest
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/kyc \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: kyc_usr_abc123_1743152580" \ -H "Content-Type: application/json" \ -d '{"status":"VERIFIED","level":"BASIC","reference":"kyc_session_88721"}'
await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/kyc', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'kyc_usr_abc123_1743152580', 'Content-Type': 'application/json' }, body: JSON.stringify({ status: 'VERIFIED', level: 'BASIC', reference: 'kyc_session_88721' }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/kyc', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'kyc_usr_abc123_1743152580'}, json={'status': 'VERIFIED', 'level': 'BASIC', 'reference': 'kyc_session_88721'})
Lists mobile/web push devices registered for a sub-account. Tokens are never returned; only tokenLast4 is exposed for support correlation.
Registers or updates a push-token record for your mobile/web app. MyStocks stores only a token hash and last4. This endpoint gives partners a durable device-token model for mobile notification fanout. Webhooks remain the server-side event source of truth; your backend should receive webhooks or SSE events and fan out user-visible notifications through APNs, FCM, Expo, or Web Push using the device records you maintain.
DeviceRegistrationRequest
Soft-revokes a registered push device. The record is retained for audit and support correlation.
deviceId
Subscribes a sub-account to a bond, money market fund, or private credit/pre-IPO deal. Funds are escrowed from the sub-account wallet on submission. For **FUND** subscriptions: specify `units`. For **OPPORTUNITY** / **PRE_IPO**: specify `amount` in USD. The sub-account must be KYC-verified (`kycStatus: VERIFIED`).
SubscribeRequest
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/subscribe \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: sub_usr_abc123_1743152580" \ -H "Content-Type: application/json" \ -d '{"assetType":"FUND","assetId":"fund_mmf_africa","units":500}'
await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/subscribe', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'sub_usr_abc123_1743152580', 'Content-Type': 'application/json' }, body: JSON.stringify({ assetType: 'FUND', assetId: 'fund_mmf_africa', units: 500 }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/subscribe', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'sub_usr_abc123_1743152580'}, json={'assetType': 'FUND', 'assetId': 'fund_mmf_africa', 'units': 500})
Redeems fund units back to the sub-account wallet. Proceeds are credited at the current NAV once the redemption is processed by the fund manager (typically T+1 for MMFs).
RedeemRequest
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/redeem \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: red_usr_abc123_1743152580" \ -H "Content-Type: application/json" \ -d '{"holdingId":"fund_mmf_africa","unitsToRedeem":200}'
await fetch('https://mystocks.africa/api/v1/partner/users/usr_abc123/redeem', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'red_usr_abc123_1743152580', 'Content-Type': 'application/json' }, body: JSON.stringify({ holdingId: 'fund_mmf_africa', unitsToRedeem: 200 }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/redeem', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'red_usr_abc123_1743152580'}, json={'holdingId': 'fund_mmf_africa', 'unitsToRedeem': 200})
Returns dividend payments received by a sub-account, including declared date, pay date, and USD amount credited.
curl https://mystocks.africa/api/v1/partner/users/usr_abc123/dividends \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/dividends', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { dividends } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123/dividends', headers={'x-api-key': 'pk_live_KEY'})
Returns the watchlist for a sub-account, including delayed price and day-change for each stock where available.
curl https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { data } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist', headers={'x-api-key': 'pk_live_KEY'})
Adds a stock to a sub-account's watchlist. The symbol is resolved to its canonical exchange-qualified form (e.g. "SCOM" → "SCOM.KE"). Returns 409 if already present.
curl -X POST https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist \ -H "x-api-key: pk_live_KEY" \ -H "Idempotency-Key: watchlist_add_scom_001" \ -H "Content-Type: application/json" \ -d '{"symbol":"SCOM.KE"}'
const res = await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist', { method: 'POST', headers: { 'x-api-key': 'pk_live_KEY', 'Idempotency-Key': 'watchlist_add_scom_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ symbol: 'SCOM.KE' }), } ); const item = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist', headers={'x-api-key': 'pk_live_KEY', 'Idempotency-Key': 'watchlist_add_scom_001'}, json={'symbol': 'SCOM.KE'})
Removes a stock from a sub-account's watchlist. Returns 404 if the symbol is not on the watchlist.
204
curl -X DELETE https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist/SCOM.KE \ -H "x-api-key: pk_live_KEY" \ -H "Idempotency-Key: watchlist_remove_scom_001"
await fetch( 'https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist/SCOM.KE', { method: 'DELETE', headers: { 'x-api-key': 'pk_live_KEY', 'Idempotency-Key': 'watchlist_remove_scom_001' } } );
import requests requests.delete('https://mystocks.africa/api/v1/partner/users/usr_abc123/watchlist/SCOM.KE', headers={'x-api-key': 'pk_live_KEY', 'Idempotency-Key': 'watchlist_remove_scom_001'})
A Server-Sent Events (text/event-stream) feed of the partner's real-time events — order.filled/rejected/cancelled/triggered/pending, deposit/ withdraw/wallet, kyc.updated, topup.confirmed, float.low, dividend.paid, corporateaction.declared, quote.expired, market.status, and more. Every event that fires a webhook is also streamed here, so a partner can react in real time without registering a webhook. Auth: Authorization Bearer pk_live_ (server) or ?access_token= for browser EventSource (prefer a short-lived ms_oauth_ token). Each frame carries an id (ms cursor); reconnect with Last-Event-ID or ?since= to resume. Connections cap at ~110s then close with an event stream_timeout frame — reconnect to continue. Heartbeat comments (: ping) every 15s.
since
Returns a cursor-paginated list of API calls made with your live key, ordered newest first. Each entry includes the endpoint path, HTTP method, source IP, user-agent, and timestamp. Use `?limit=` and `?cursor=` for pagination (see the Pagination section).
before
curl "https://mystocks.africa/api/v1/partner/audit?limit=50" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/audit?limit=50', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { entries, hasMore, nextCursor } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/audit', params={'limit': 50}, headers={'x-api-key': 'pk_live_KEY'})
Returns daily API call totals for the last N days (default 30, max 90), aggregated from per-minute rate-limit windows. Also returns the current rate-limit window status so you can see remaining capacity in real time.
days
curl "https://mystocks.africa/api/v1/partner/usage?days=30" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/usage?days=30', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { totalCalls, daily, currentWindow, tier } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/usage', params={'days': 30}, headers={'x-api-key': 'pk_live_KEY'})
The partner's self-serve markup config — a default markup (bps) added on top of the MyStocks base fee, plus per-symbol / per-exchange / per-asset-class overrides and an optional promo window. Resolution for a trade is most-specific-wins: active promo → symbol → exchange → assetClass → default. Markup is capped at maxMarkupBps.
Full replacement of the markup config. Requires a full API key. Each markupBps is 0–maxMarkupBps.
Returns the current partner configuration — logo URL, custom email config, and notification preferences.
curl https://mystocks.africa/api/v1/partner/settings \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/settings', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const settings = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/settings', headers={'x-api-key': 'pk_live_KEY'})
Sends a test email via your custom SMTP configuration. Use this to verify that your email settings are correct before going live.
curl -X POST https://mystocks.africa/api/v1/partner/settings \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: settings_smtp_test_001" \ -H "Content-Type: application/json" \ -d '{"action":"test-smtp","recipient":"dev@acme.com"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/settings', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'settings_smtp_test_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'test-smtp', recipient: 'dev@acme.com' }), }); const { delivered } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/settings', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'settings_smtp_test_001'}, json={'action': 'test-smtp', 'recipient': 'dev@acme.com'})
Updates partner configuration. All fields are optional — only provided fields are changed. Set `emailConfig` to `null` to revert to MyStocks default transactional emails.
SettingsUpdateRequest
curl -X PATCH https://mystocks.africa/api/v1/partner/settings \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: settings_update_001" \ -H "Content-Type: application/json" \ -d '{"logoUrl":"https://cdn.yourapp.com/logo.png"}'
await fetch('https://mystocks.africa/api/v1/partner/settings', { method: 'PATCH', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'settings_update_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ logoUrl: 'https://cdn.yourapp.com/logo.png' }), });
import requests requests.patch('https://mystocks.africa/api/v1/partner/settings', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'settings_update_001'}, json={'logoUrl': 'https://cdn.yourapp.com/logo.png'})
The partner aggregates their end-users' deposits and remits to the master account (POST /topup); the master wallet funds sub-account deposits. This returns the funding headroom so the partner knows when to remit: masterBalanceUsd, pending top-ups, any credit line, availableToFundUsd, and a floatStatus of HEALTHY / LOW / DEPLETED / ON_CREDIT. Pair with the float.low and topup.confirmed webhooks.
Opens a MyStocks treasury review workflow for a partner credit-limit increase or decrease. Requires a full key and Idempotency-Key.
Sets lowBalanceThresholdUsd — the master balance below which a float.low webhook fires. creditLimitUsd is set by MyStocks only.
Returns all master wallet top-up requests and their approval status.
curl https://mystocks.africa/api/v1/partner/topup \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/topup', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { topups } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/topup', headers={'x-api-key': 'pk_live_KEY'})
Notifies MyStocks that you have sent a wire transfer to top up your master wallet. An admin confirms the wire receipt and credits your wallet (typically within 1 business day). Provide your wire transfer reference in `paymentReference` so we can match the incoming funds. `paymentReference` is unique per partner after normalization; duplicate references return 409. **Sandbox**: the request auto-approves instantly — the master wallet is credited in the same call and `topup.confirmed` fires, so the funding webhook path is fully testable. Production requests stay `PENDING` until the remittance is confirmed.
TopupRequest
curl -X POST https://mystocks.africa/api/v1/partner/topup \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: topup_wire_2026_05_001" \ -H "Content-Type: application/json" \ -d '{"amount":10000,"paymentReference":"WIRE-2026-05-001","paymentMethod":"SWIFT wire"}'
await fetch('https://mystocks.africa/api/v1/partner/topup', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'topup_wire_2026_05_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ amount: 10000, paymentReference: 'WIRE-2026-05-001', paymentMethod: 'SWIFT wire' }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/topup', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'topup_wire_2026_05_001'}, json={'amount': 10000, 'paymentReference': 'WIRE-2026-05-001', 'paymentMethod': 'SWIFT wire'})
Returns all payout requests from your master wallet.
curl https://mystocks.africa/api/v1/partner/payout \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/payout', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { payouts } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/payout', headers={'x-api-key': 'pk_live_KEY'})
Requests a cash withdrawal from your master wallet to a bank account. An admin reviews and processes payouts within 2 business days. The requested amount is reserved immediately from your wallet balance.
PayoutRequest
curl -X POST https://mystocks.africa/api/v1/partner/payout \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: payout_2026_001" \ -H "Content-Type: application/json" \ -d '{"amount":5000,"bankDetails":{"bankName":"Equity Bank Kenya","accountName":"ACME Fintech Ltd","accountNumber":"0123456789","swiftCode":"EQBLKENA"}}'
await fetch('https://mystocks.africa/api/v1/partner/payout', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'payout_2026_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ amount: 5000, bankDetails: { bankName: 'Equity Bank Kenya', accountName: 'ACME Fintech Ltd', accountNumber: '0123456789', swiftCode: 'EQBLKENA' }, }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/payout', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'payout_2026_001'}, json={ 'amount': 5000, 'bankDetails': {'bankName': 'Equity Bank Kenya', 'accountName': 'ACME Fintech Ltd', 'accountNumber': '0123456789', 'swiftCode': 'EQBLKENA'}, })
Returns a chronological feed of all sub-account activity — trades, deposits, withdrawals, KYC changes, and dividends. Useful for building an admin dashboard.
curl "https://mystocks.africa/api/v1/partner/client-activity?from=2026-01-01&limit=50" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/client-activity?from=2026-01-01', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { events } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/client-activity', params={'from': '2026-01-01', 'limit': 50}, headers={'x-api-key': 'pk_live_KEY'})
Returns assets under management across all sub-accounts, broken down by exchange, asset class, and currency.
asOf
curl "https://mystocks.africa/api/v1/partner/report/aum?asOf=2026-05-01" \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/report/aum', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { totalAumUsd, breakdown } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/aum', headers={'x-api-key': 'pk_live_KEY'})
Returns all open positions across all sub-accounts, aggregated by symbol. Useful for calculating exposure and hedging needs.
curl https://mystocks.africa/api/v1/partner/report/positions \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/report/positions', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { positions } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/positions', headers={'x-api-key': 'pk_live_KEY'})
Returns fees earned by MyStocks and your markup fees, broken down by period and sub-account.
curl "https://mystocks.africa/api/v1/partner/report/fees?from=2026-01-01&to=2026-03-31" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/report/fees?from=2026-01-01&to=2026-03-31', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { totalFeesUsd, breakdown } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/fees', params={'from': '2026-01-01', 'to': '2026-03-31'}, headers={'x-api-key': 'pk_live_KEY'})
Returns your net revenue (markup fees) across all sub-accounts for the given period.
curl "https://mystocks.africa/api/v1/partner/report/revenue?from=2026-01-01" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/report/revenue?from=2026-01-01', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { totalRevenueUsd } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/revenue', params={'from': '2026-01-01'}, headers={'x-api-key': 'pk_live_KEY'})
Returns invoiceable fee data for a billing period, formatted for your finance team. Includes base fees billed by MyStocks and markup collected by you.
month
curl "https://mystocks.africa/api/v1/partner/report/invoice?month=2026-04" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/report/invoice?month=2026-04', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const invoice = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/invoice', params={'month': '2026-04'}, headers={'x-api-key': 'pk_live_KEY'})
Daily reconciliation pack for B2B operations. Returns cash ledger, securities ledger, unsettled trades, fees, dividends, corporate actions, and custody position files for the partner master account and all sub-accounts. Add `format=csv§ion=...` to download a section as CSV for finance, SFTP mirroring, or data warehouse ingestion. JSON responses include an explicit cash roll-forward and beneficial-holdings-versus-custody proof. A status of `EXCEPTIONS` identifies unit differences; `INCOMPLETE` means no pooled custody positions were available for comparison.
format
section
Returns all registered webhook endpoints for your partner account.
curl https://mystocks.africa/api/v1/partner/webhooks \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/webhooks', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { webhooks } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/webhooks', headers={'x-api-key': 'pk_live_KEY'})
Registers a new HTTPS webhook endpoint. MyStocks sends a POST to your URL for each subscribed event. **Verification** — every delivery includes an `x-mystocks-signature` header: `HMAC-SHA256(secret, rawBody)` hex-encoded. Verify it before processing. **Retries** — failed deliveries are retried with exponential back-off: up to 6 attempts total (immediate, then 5 s, 30 s, 5 min, 30 min, 2 h). Your endpoint must respond `2xx` within 8 seconds or the delivery attempt is marked failed. **Delivery semantics** — at-least-once. The same event can be delivered more than once (e.g. your endpoint responded slowly and the delivery was retried), and events are not guaranteed to arrive in order. Deduplicate by event id and treat handlers as idempotent.
WebhookCreateRequest
curl -X POST https://mystocks.africa/api/v1/partner/webhooks \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: webhook_primary_001" \ -H "Content-Type: application/json" \ -d '{"url":"https://yourapp.com/webhooks/mystocks","events":["trade.settled","deposit.confirmed"],"secret":"my-signing-secret-min-16-chars"}'
const res = await fetch('https://mystocks.africa/api/v1/partner/webhooks', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_primary_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://yourapp.com/webhooks/mystocks', events: ['trade.settled', 'deposit.confirmed'], secret: 'my-signing-secret-min-16-chars', }), }); const { id } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/webhooks', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_primary_001'}, json={ 'url': 'https://yourapp.com/webhooks/mystocks', 'events': ['trade.settled', 'deposit.confirmed'], 'secret': 'my-signing-secret-min-16-chars', }) webhook_id = r.json()['id']
Permanently removes a webhook registration. In-flight deliveries will still complete.
curl -X DELETE https://mystocks.africa/api/v1/partner/webhooks/wh_abc123 \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: webhook_delete_001"
await fetch('https://mystocks.africa/api/v1/partner/webhooks/wh_abc123', { method: 'DELETE', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_delete_001' }, });
import requests requests.delete('https://mystocks.africa/api/v1/partner/webhooks/wh_abc123', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_delete_001'})
Sends a synthetic `ping` event to the registered webhook URL. Use this to verify connectivity and HMAC signature verification before going live.
curl -X POST https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/test \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: webhook_test_001"
const res = await fetch('https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/test', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_test_001' }, }); const { delivered, statusCode } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/test', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'webhook_test_001'})
Returns the delivery log for a webhook endpoint — each attempt, response code, and body.
curl "https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/deliveries?limit=20" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/deliveries', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { deliveries } = await res.json();
import requests r = requests.get( 'https://mystocks.africa/api/v1/partner/webhooks/wh_abc123/deliveries', headers={'x-api-key': 'pk_live_KEY'})
Returns the full dividend declaration history for a specific stock symbol, ordered by ex-dividend date descending (most recent first).
curl "https://mystocks.africa/api/v1/partner/dividends/SCOM.KE/history?limit=10" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/dividends/SCOM.KE/history?limit=10', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { history } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/dividends/SCOM.KE/history', params={'limit': 10}, headers={'x-api-key': 'pk_live_KEY'}) history = r.json()['history']
Returns dividend declarations for stocks held across the partner's sub-accounts. Pass all=true to include declarations for symbols that no sub-account currently holds.
all
curl "https://mystocks.africa/api/v1/partner/dividends/calendar?status=DECLARED" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/dividends/calendar?status=DECLARED', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { declarations } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/dividends/calendar', params={'status': 'DECLARED'}, headers={'x-api-key': 'pk_live_KEY'})
Aggregated dividend distributions paid to sub-accounts for a given period. Returns totals, a per-symbol breakdown, and a per-sub-account breakdown. Add `?format=csv` to download a spreadsheet of the by-symbol totals.
curl "https://mystocks.africa/api/v1/partner/report/dividends?from=2026-01-01" \ -H "x-api-key: pk_live_KEY"
const res = await fetch( 'https://mystocks.africa/api/v1/partner/report/dividends?from=2026-01-01', { headers: { 'x-api-key': 'pk_live_KEY' } } ); const { totalUsdReceived, bySymbol, bySubAccount } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/report/dividends', params={'from': '2026-01-01'}, headers={'x-api-key': 'pk_live_KEY'})
Returns the current read-only data API key (if issued). Data keys can access market data endpoints but cannot execute trades or move funds. ⚠️ **Prefer server-side use.** An embedded `pk_data_` key can be extracted from any client bundle, shares the parent full key's rate-limit bucket, and rotating it breaks every shipped install (only one is active per partner). For production apps, proxy market data through your backend or use short-lived tokens from `POST /oauth/token`; reserve embedded data keys for low-stakes surfaces such as public widgets.
curl https://mystocks.africa/api/v1/partner/api-keys/data-key \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/api-keys/data-key', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { dataKey } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/api-keys/data-key', headers={'x-api-key': 'pk_live_KEY'})
Issues a new read-only data API key. Only one data key can be active at a time — calling this again rotates the existing key. ⚠️ **Prefer server-side use.** An embedded `pk_data_` key can be extracted from any client bundle, shares the parent full key's rate-limit bucket, and rotating it (or calling this endpoint again) breaks every shipped install (only one is active per partner). For production apps, proxy market data through your backend or use short-lived tokens from `POST /oauth/token`; reserve embedded data keys for low-stakes surfaces such as public widgets.
curl -X POST https://mystocks.africa/api/v1/partner/api-keys/data-key \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: data_key_create_001"
const res = await fetch('https://mystocks.africa/api/v1/partner/api-keys/data-key', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'data_key_create_001' }, }); const { dataKey } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/api-keys/data-key', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'data_key_create_001'}) data_key = r.json()['dataKey']
Permanently revokes the data API key. Market data endpoints will return 401 until a new key is issued.
curl -X DELETE https://mystocks.africa/api/v1/partner/api-keys/data-key \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: data_key_delete_001"
await fetch('https://mystocks.africa/api/v1/partner/api-keys/data-key', { method: 'DELETE', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'data_key_delete_001' }, });
import requests requests.delete('https://mystocks.africa/api/v1/partner/api-keys/data-key', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'data_key_delete_001'})
Issues a new primary API key and **immediately invalidates** the current one. The new key is returned in the response — store it securely. There is a 60-second grace period during rotation where both keys are valid to allow a zero-downtime swap.
curl -X POST https://mystocks.africa/api/v1/partner/api-keys/rotate \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: api_key_rotate_001"
const res = await fetch('https://mystocks.africa/api/v1/partner/api-keys/rotate', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'api_key_rotate_001' }, }); const { newKey } = await res.json();
import requests r = requests.post('https://mystocks.africa/api/v1/partner/api-keys/rotate', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'api_key_rotate_001'}) new_key = r.json()['newKey']
Permanently revokes a specific API key. Use this to invalidate a compromised key immediately. If you revoke your only active key, you must contact support to restore access.
RevokeKeyRequest
curl -X POST https://mystocks.africa/api/v1/partner/api-keys/revoke \ -H "Authorization: Bearer pk_live_KEY" \ -H "Idempotency-Key: api_key_revoke_001" \ -H "Content-Type: application/json" \ -d '{"apiKey":"pk_live_a1b2c3..."}'
await fetch('https://mystocks.africa/api/v1/partner/api-keys/revoke', { method: 'POST', headers: { Authorization: 'Bearer pk_live_KEY', 'Idempotency-Key': 'api_key_revoke_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ apiKey: 'pk_live_a1b2c3...' }), });
import requests requests.post('https://mystocks.africa/api/v1/partner/api-keys/revoke', headers={'Authorization': 'Bearer pk_live_KEY', 'Idempotency-Key': 'api_key_revoke_001'}, json={'apiKey': 'pk_live_a1b2c3...'})
Returns real-time service health, active incidents, upcoming maintenance windows, and your SLA tier commitments. | Tier | Uptime SLO | Rate Limit | |------|-----------|------------| | Standard (starter) | 99.5% | 100 req/min | | Professional (growth) | 99.9% | 500 req/min | | Enterprise | 99.95% | 2,000 req/min |
curl https://mystocks.africa/api/v1/partner/sla \ -H "x-api-key: pk_live_KEY"
const res = await fetch('https://mystocks.africa/api/v1/partner/sla', { headers: { 'x-api-key': 'pk_live_KEY' }, }); const { overallStatus, services, activeIncidents, partner } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/v1/partner/sla', headers={'x-api-key': 'pk_live_KEY'})
Issues a short-lived Bearer token for partners that have OAuth client credentials enabled in their enterprise security policy. Provide the partner API key as the client secret via HTTP Basic auth, form body, or JSON body.
OAuthTokenRequest
Returns the active enterprise security policy for the authenticated partner key, including IP allowlists, signed-request requirements, mTLS gateway requirements, scoped-key governance, rotation policy, and security evidence metadata.
Updates partner-managed enterprise controls. A full API key is required. Once signed requests or mTLS are enabled, subsequent write requests must satisfy the configured controls.
EnterpriseSecurityUpdateRequest
Returns the sandbox-to-production checklist covering golden-path tests, concurrency/idempotency tests, webhook retry tests, failover drills, reconciliation exports, enterprise security, and MyStocks go-live approval.
Requests MyStocks operations review for production go-live approval after certification evidence is attached.
Updates partner-owned certification checks with status, evidence URL, and notes. MyStocks-owned approval checks cannot be marked passed or waived by partners.
CertificationUpdateRequest
Credits virtual USD to a sandbox sub-account for deterministic integration testing. New integrations use the sandbox base with an `sk_sandbox_` key. Production-base access is restricted legacy compatibility for specifically approved partners. No real money moves. Maximum ,000,000 per call. Triggers a `deposit.confirmed` webhook if one is registered. Formerly `POST /sandbox/deposit`, which remains a deprecated alias.
SandboxDepositRequest
curl -X POST https://mystocks.africa/api/sandbox/v1/partner/test-tools/deposit \ -H "Authorization: Bearer sk_sandbox_KEY" \ -H "Idempotency-Key: test_deposit_001" \ -H "Content-Type: application/json" \ -d '{"subAccountId":"usr_test_abc123","amount":10000,"note":"Integration test deposit"}'
await fetch('https://mystocks.africa/api/sandbox/v1/partner/test-tools/deposit', { method: 'POST', headers: { Authorization: 'Bearer sk_sandbox_KEY', 'Idempotency-Key': 'test_deposit_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ subAccountId: 'usr_test_abc123', amount: 10000, note: 'Integration test' }), });
import requests requests.post('https://mystocks.africa/api/sandbox/v1/partner/test-tools/deposit', headers={'Authorization': 'Bearer sk_sandbox_KEY', 'Idempotency-Key': 'test_deposit_001'}, json={'subAccountId': 'usr_test_abc123', 'amount': 10000, 'note': 'Integration test'})
Deprecated alias of `POST /test-tools/deposit`. Existing approved legacy integrations keep working; new integrations use `/test-tools/deposit` on the sandbox base with an `sk_sandbox_` key.
Places a deterministic test trade without hitting a real exchange. **Recommended:** use the sandbox base URL with an `sk_sandbox_` key. Set `outcome` to `PENDING`, `FILL`, `PARTIAL_FILL`, `REJECT`, `CANCEL`, or `FAIL_SETTLEMENT`; sandbox wallet reservations, holdings, execution records, and webhooks are updated consistently. A pending or partially filled order can be advanced with `PATCH /test-tools/orders/{orderId}`. The production base retains the older live-key integration tool for compatibility: **Cheat codes** for deterministic outcomes: | Quantity | Outcome | |----------|---------| | `100` | Auto-fills immediately (triggers `trade.settled`) | | `999` | Auto-rejects immediately (triggers `trade.rejected`) | | Any other | Enters PENDING state — use admin panel to settle | Formerly `POST /sandbox/trade`, which remains a supported alias.
SandboxTradeRequest
# Auto-fill trade (quantity=100) curl -X POST https://mystocks.africa/api/sandbox/v1/partner/test-tools/trade \ -H "Authorization: Bearer sk_sandbox_KEY" \ -H "Idempotency-Key: test_trade_001" \ -H "Content-Type: application/json" \ -d '{"symbol":"SCOM.KE","type":"BUY","quantity":100,"subAccountId":"usr_test_abc123"}'
// quantity=100 auto-fills; quantity=999 auto-rejects const res = await fetch('https://mystocks.africa/api/sandbox/v1/partner/test-tools/trade', { method: 'POST', headers: { Authorization: 'Bearer sk_sandbox_KEY', 'Idempotency-Key': 'test_trade_001', 'Content-Type': 'application/json' }, body: JSON.stringify({ symbol: 'SCOM.KE', type: 'BUY', quantity: 100, subAccountId: 'usr_test_abc123' }), }); const { orderId, status } = await res.json();
import requests # quantity=100 = auto-fill, quantity=999 = auto-reject r = requests.post('https://mystocks.africa/api/sandbox/v1/partner/test-tools/trade', headers={'Authorization': 'Bearer sk_sandbox_KEY', 'Idempotency-Key': 'test_trade_001'}, json={'symbol': 'SCOM.KE', 'type': 'BUY', 'quantity': 100, 'subAccountId': 'usr_test_abc123'})
Sandbox-only deterministic execution control. Advance an isolated `PENDING` or `PARTIALLY_FILLED` test order through fill, partial fill, rejection, cancellation, or settlement failure. A fully filled order can be marked settled. The operation updates virtual wallet reservations, holdings, execution records, and signed webhooks without contacting an exchange or requiring MyStocks staff.
Deprecated alias of `POST /test-tools/trade`. Existing approved legacy integrations keep working; new integrations use `/test-tools/trade` on the sandbox base with an `sk_sandbox_` key.
Returns all test orders created via the test trade endpoint. Formerly `GET /sandbox/orders`, which remains a supported alias.
curl "https://mystocks.africa/api/sandbox/v1/partner/test-tools/orders?status=FILLED" \ -H "x-api-key: sk_sandbox_KEY"
const res = await fetch( 'https://mystocks.africa/api/sandbox/v1/partner/test-tools/orders?status=FILLED', { headers: { 'x-api-key': 'sk_sandbox_KEY' } } ); const { orders } = await res.json();
import requests r = requests.get('https://mystocks.africa/api/sandbox/v1/partner/test-tools/orders', params={'status': 'FILLED'}, headers={'x-api-key': 'sk_sandbox_KEY'})
Deprecated alias of `GET /test-tools/orders`. Existing approved legacy integrations keep working; new integrations use `/test-tools/orders` on the sandbox base with an `sk_sandbox_` key.
Returns authoritative mandatory and voluntary corporate actions. Filter by symbol, exchange, type, or lifecycle status.
actionId
Reusing the same sub-account and action amends the instruction while voting remains open. Every accepted revision returns to PENDING_CUSTODIAN.
meetingId
VoteRequest
Console-member endpoint. Human RBAC is enforced independently from machine API-key scopes.
memberId
roleId
approvalId
reviewId
category
ticketId
Every authenticated POST/PATCH/PUT/DELETE requires an Idempotency-Key header — except register, reset, apply, upgrade-request, and oauth/token. Retries with the same key return the original result.
All 14 exchanges are included in the Partner API exchange directory, status, holiday, stocks, and settlement surfaces.
Full documentation: mystocks.africa/partners/docs
OpenAPI spec: mystocks.africa/openapi.yaml