Skip to content
Partner API Docs

Architecture & Custody

What happens between your POST /trade and settled units on an African exchange — who executes, who holds the assets, where the cash sits, and how MyStocks reconciles omnibus custody against per-sub-account holdings.

What actually happens between your POST /trade and settled units on an African exchange — who executes, who holds the assets, and where the cash sits.

The stack — one integration, every supported market

Your app
partner backend + clients
MyStocks Partner API
/api/v1/partner — one REST surface
Dealing desk + licensed broker
regulated broker per exchange
Exchange
NSE · NGX · JSE · GSE · BRVM · ZSE · BSE · LuSE · EGX · DSE · USE · MSE · CSE · SEM
CSD / custodian
central securities depository per market
Settlement
T+N business days

You integrate one API. MyStocks routes orders to the regulated broker for each exchange, normalizes market data, currencies (FX model), settlement cycles, and corporate-action handling behind a single USD-denominated surface.

Who does what

FunctionPerformed byHow it surfaces in the API
KYCYou — the partner runs KYC and asserts the outcomePOST /users/{id}/kyc. Trading is blocked until status is VERIFIED (403 KYC_REQUIRED).
AML & sanctions screeningMyStocks, at platform levelA frozen account fires account.frozen; frozen sub-accounts cannot trade or move funds.
Order executionMyStocks dealing desk + the licensed broker on each exchangeOrders move through WORKING, PENDING, PARTIALLY_FILLED, and FILLED (or a terminal rejection/cancellation/expiry); per-fill detail at GET /orders/{id}/executions.
Custody of securitiesRegulated brokers, custodians and the CSD in each marketPooled custody positions reconciled against per-sub-account holdings daily — custody section of GET /report/reconciliation.
Cash ledgerMyStocks — master wallet + sub-account wallets (USD)GET /float (master headroom), sub-account wallet endpoints, cash section of the reconciliation report.
SettlementExchange + CSD, T+N business daysUnsettled SELL proceeds tracked per tranche in GET /users/{id}/buying-power; excluded from withdrawableUsd until settled.
Corporate actions & dividendsMyStocks processes and distributesdividend.paid and corporateaction.declared webhooks with per-sub-account breakdowns.
FXMyStocks, at quote/trade timeLocal-currency prices, USD wallets — see FX & Currency.

Where assets and cash live

MyStocks is a financial technology platform, not a broker-dealer. Brokerage, custody, settlement, and regulated dealing activities are performed by regulated stockbrokers, investment banks, broker-dealers, custodians, or appointed partners in each market; specific executing partners are disclosed at the point of trade execution.

Securities bought through the API are held in an omnibus (nominee) structure with the relevant market's custodian or CSD: the pooled custody account holds the units, and MyStocks maintains the beneficial-ownership ledger attributing exact units — including fractions — to each sub-account. That attribution is auditable any day via the custody section of GET /report/reconciliation, which reconciles pooled positions against the sum of per-sub-account holdings.

Cash — your master wallet and every sub-account wallet — is a USD ledger balance maintained by MyStocks, funded by your remittances (POST /topup) and depleted by payouts. Wallet balances are platform ledger entries, not bank deposits held in your end users' names. See the compliance hub for licensing, investor-protection, and per-market disclosures.

Money map — in, invested, out

Funding & investing

Your bank
remittance
POST /topup
Master wallet
GET /float — headroom & credit line
POST /users/{id}/deposit
Sub-account wallet
per end user, USD
POST /users/{id}/trade
Escrow
held at order placement
fill + settlement
Holding
settled units + tax lots

Divesting & withdrawing

Holding
SELL order
fill
Unsettled proceeds
T+N — excluded from withdrawableUsd
settlement date
Sub-account wallet
settled cash
POST /users/{id}/withdraw
Master wallet
aggregated
POST /payout
Your bank
payout

Full endpoint detail in Fund Flow; currency handling in FX & Currency.

For the production control model, continue with Customer ownership and omnibus custody, Client-money segregation, and Complaints, corporate actions, and insolvency.

Anatomy of a market BUY

Your backend
quote → trade
POST /users/{id}/trade + quoteId + Idempotency-Key
Partner API
order PENDING — cost + fees escrowed
review & routing
Dealing desk + broker
routes to the exchange
execution
Exchange
order executed
signed webhook (at-least-once)
Your webhook endpoint
order.filled (+ trade.settled alias)
you update your UI / ledger
Portfolio updated
GET /users/{id}/portfolio · tax lots · buying power

LIMIT/STOP orders rest in status WORKING until the trigger price is crossed (firing order.triggered), then follow the same path. Rejections release the escrow and fire order.rejected.

Was this page useful?

Your signal helps us tighten partner onboarding docs.

Last updated on

On this page