SSE Events
Subscribe to MyStocks Server-Sent Events for order, wallet, KYC, dividend, market, and incident updates.
Explore endpoints
43 of 43/account
Get partner account
Full endpoint documentationlistAccountReturns your partner profile — tier, wallet balance, API key metadata, and feature flags.
Parameters
walletContract1 | 2queryOpt in to actual currency wallets. Legacy indicative views remain unchanged.
Example: 1
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Response fields
accountIdstringbusinessNamestringemailstringwalletobjectwallet.currencystringExample: "USD"
wallet.balancenumberwalletContractVersion1 | 2walletModelUSD_LEDGER_WITH_INDICATIVE_EQUIVALENTS | NATIVE_CURRENCY_WALLETSsupportedConversionCurrenciesstring[]currencyWalletsobject[]currencyWallets[].currencystringcurrencyWallets[].balanceKindstringcurrencyWallets[].cashBalancenumbercurrencyWallets[].reservednumbercurrencyWallets[].externallyReservednumbercurrencyWallets[].totalCashnumbercurrencyWallets[].availablenumbercurrencyWallets[].withdrawablenumbercurrencyWallets[].availableForConversionnumbercurrencyWallets[].policyEligiblebooleancurrencyWallets[].internalTransferAvailablenumberTraceable available funds for internal transfers
currencyWallets[].nativeFundingEnabledbooleancurrencyWallets[].nativePayoutEnabledbooleancurrencyWallets[].conversionEnabledbooleanwalletsobject[]wallets[].balanceKindstringwallets[].indicativebooleanwallets[].spendablebooleanwallets[].currencystringExample: "KES"
wallets[].balancenumberExample: 65000
wallets[].availablenumberExample: 65000
wallets[].ledgerCurrencystringExample: "USD"
wallets[].ledgerBalancenumberExample: 500
wallets[].fxRatenumberExample: 130
wallets[].fxSourcestringExample: "MYSTOCKS_MANAGED_FX"
wallets[].fxRateAsOfstring | nullmanagedFxobjectmanagedFx.ledgerCurrencystringExample: "USD"
managedFx.sourcestringExample: "MYSTOCKS_MANAGED_FX"
managedFx.rateConventionstringExample: "local currency units per USD"
managedFx.supportedCurrenciesstring[]managedFx.asOfstring | nullportfolioValuenumberinvestedCapitalnumberrealizedGainUsdnumberenvironmentproduction | sandboxpilotobjectControlled-production policy. When enabled, production mutations fail closed unless admission, ownership, feature, limit, and reconciliation controls pass.
pilot.enabledbooleanRequiredpilot.statusNOT_APPROVED | APPROVED | PAUSED | COMPLETEDRequiredpilot.operationalOwnerunionpilot.incidentContactunionpilot.manualTreasuryReviewbooleanRequiredAlways true for a controlled pilot; master-wallet top-ups and payouts remain pending until MyStocks treasury review.
pilot.featuresobjectRequiredpilot.limitsobjectRequiredpilot.reconciliationobjectRequiredpilot.readinessobjectRequiredEvidence and approvals required before mutations may resume and before the controlled pilot may complete.
Response codes
200Partner account details.401Invalid API key.GET /stream is a Server-Sent Events feed for partner-facing state changes. Use it for live application updates; use signed webhooks for durable server-to-server processing and reconciliation.
Connect
The stream uses the same partner base URL and authentication model as REST:
For browser clients, prefer a short-lived OAuth token over exposing a long-lived partner key. For server clients, send the normal Authorization: Bearer header.
Resume and reconnect
Each frame carries an opaque timestamp:documentId stream cursor so events sharing a timestamp remain replayable. Legacy millisecond cursors are accepted. Persist the last id: value and reconnect with Last-Event-ID or ?since= after a network interruption. The connection may close after approximately 110 seconds; reconnect is expected. Heartbeat comments are sent periodically and should reset your idle timer.
Delivery semantics
- Events are at-least-once and can be duplicated.
- Events can arrive out of order; derive state from the event payload and current REST state.
- Deduplicate by
eventId, not by cursor alone. - SSE is not a tick-by-tick market-price stream.
- A stream reconnect does not replace daily reconciliation.
The same business events can be delivered through signed webhooks. See Trading lifecycles for order transitions and Daily Reconciliation for the durable operating record.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on