Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console
Trading API

Bonds & Funds

Beyond equities — fixed-income instruments (government bonds, T-bills, Eurobonds, commercial papers), money-market and yield funds with fund-specific redemption terms, and curated private-credit and pre-IPO opportunities. Subscribe and redeem via sub-account endpoints.

Beyond equities, the Partner API provides access to fixed-income instruments, open-ended funds, and curated private-market opportunities. All subscriptions and redemptions are handled via sub-account endpoints.

Subscribe
POST /users/{userId}/subscribe
PENDING
USD reserved
COMPLETED
units allocated

The full transition table is in Order & Money Lifecycles.

Bonds

GET /bonds · GET /bonds/{id}

List all available fixed-income instruments — government bonds, T-bills, Eurobonds, infrastructure bonds, and commercial papers. Filter by ?instrumentType=TREASURY_BILL (or BOND | EUROBOND | COMMERCIAL_PAPER | INFRASTRUCTURE_BOND), ?currency=, or ?exchange=.

curl "https://mystocks.africa/api/v1/partner/bonds?instrumentType=TREASURY_BILL" \
  -H "Authorization: Bearer pk_live_<key>"
{ "bonds": [{ "id": "ke-treasury-91", "symbol": "KE91T", "name": "Kenya 91-Day T-Bill", "instrumentType": "TREASURY_BILL", "couponRate": 15.8, "maturityDate": "2026-09-01", "pricePerUnit": 100, "currency": "KES", "minInvestment": 50000, "status": "ACTIVE", "yield": 15.8 }], "count": 1 }

Funds

GET /funds · GET /funds/{id}

Money-market and yield funds with published redemption terms; only funds whose redemptionType is instant credit the wallet in the redemption call. Responses include NAV per unit, yield, distribution frequency, minimum investment, and whether the fund is open for subscriptions.

{ "funds": [{ "id": "fund_mmf_africa", "name": "Africa Money Market Fund", "fundType": "MONEY_MARKET", "navPerUnit": 1.0, "annualYield": 12.5, "currency": "USD", "minInvestment": 50, "status": "OPEN", "redemptionType": "instant", "distributionFrequency": "Monthly" }], "count": 1 }

Opportunities

GET /opportunities · GET /opportunities/{id}

Curated private-credit deals and pre-IPO allocations, merged from both collections and sorted newest first. Each deal exposes target return, minimum commitment, risk level, and funding progress. The detail route resolves by document ID or URL slug. Subscribe via POST /users/{userId}/subscribe with assetType: "OPPORTUNITY" or "PRE_IPO".

FieldTypeRequiredDescription
typestringNoOPPORTUNITY | PRE_IPO. Omit for all types.
curl "https://mystocks.africa/api/v1/partner/opportunities?type=PRE_IPO" \
  -H "Authorization: Bearer pk_live_<key>"
{ "opportunities": [{ "id": "TREEPZ-PRE-IPO", "assetType": "PRE_IPO", "name": "Treepz — Pre-IPO Round", "slug": "treepz-pre-ipo", "description": "Ghana-based intercity bus platform targeting a secondary listing on the NSE in Q2 2027.", "minInvestment": 500, "targetAmount": 3000000, "currentRaised": 900000, "expectedReturn": 0.45, "riskLevel": "HIGH", "currency": "USD", "status": "OPEN", "expectedExitDate": "2027-06-30" }], "count": 1 }

Subscribe

POST /users/{userId}/subscribe

Subscribe a sub-account to a bond, fund, private deal, or pre-IPO. The sub-account must be KYC-verified. Funds are escrowed immediately; the position appears in the portfolio once confirmed. Requires an Idempotency-Key.

FieldTypeRequiredDescription
assetTypestringYesBOND | FUND | OPPORTUNITY | PRE_IPO
assetIdstringYesFirestore doc ID from the relevant list endpoint.
unitsnumberNoWhole units. Required for BOND and FUND.
amountnumberNoUSD commitment. Required for OPPORTUNITY and PRE_IPO.
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_001" \
  -H "Content-Type: application/json" \
  -d '{"assetType":"FUND","assetId":"fund_mmf_africa","units":500}'

Redeem

POST /users/{userId}/redeem

Redeem fund units back to the sub-account wallet. For funds with redemptionType: "instant", proceeds credit immediately. Units in a lock-up period cannot be redeemed — check unlockedUnits in the portfolio response first.

FieldTypeRequiredDescription
holdingIdstringYesSub-account holding doc ID (same as the fund doc ID).
unitsToRedeemnumberYesUnits to redeem. Must not exceed unlockedUnits.

Was this page useful?

Your signal helps us tighten partner onboarding docs.

Send note

Last updated on

On this page