Contract guarantees
Canonical runtime promises for currency, freshness, retention, rate limits, and sandbox behavior.
Contract guarantees
This page is the canonical summary of the guarantees that partners can safely build against. The OpenAPI specification is the executable reference for paths, schemas, and headers; this page explains the cross-cutting promises that apply across those operations. If a guide disagrees with this page or the specification, report the drift before relying on it.
Currency and wallets
Every partner and sub-account wallet is USD-denominated. Local-currency deposits and withdrawals expose the applied FX rate and fee in the transaction response, but they do not create a second wallet currency. Record the returned rate and amount in your own audit trail.
Market-data freshness
Prices are pull-based and refresh approximately every 15 minutes during each exchange's trading hours; end-of-day values are finalized after the exchange close. /stocks, /market/quotes, and /stocks/{symbol} read from the same feed used by the MyStocks consumer app. SSE and webhook events provide state changes, not tick-by-tick prices. History depth varies by exchange; use historyConfidence when deciding whether a long back-series is available.
Retention and delivery
| Record or behavior | Contracted default |
|---|---|
| Idempotency responses and request fingerprints | 24 hours |
| Webhook delivery logs | 90 days |
| Partner API audit events | 365 days |
| Webhook retry window | 8 attempts over 24 hours |
An idempotent replay with the same key and the same request fingerprint returns the original response. Reusing a key with a different request is a conflict. Webhook consumers must deduplicate by eventId, acknowledge quickly, and use the deliveries endpoint to reconcile failures.
Rate-limit headers
Sandbox and production responses expose X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. A 429 response also includes Retry-After. Limits use a one-minute sliding window and requests are not queued.
Sandbox and production
Sandbox uses https://mystocks.africa/api/sandbox/v1/partner with sk_sandbox_ keys. Registration and reset are the only root-level sandbox utilities: POST /api/sandbox/v1/register and POST /api/sandbox/v1/reset. Sandbox accounts receive virtual USD funds (currently $100,000), trades use accelerated simulated settlement, and no real money moves. Integration Test Tools are a separate production surface under /api/v1/partner/test-tools/* and require a live key.
Production uses https://mystocks.africa/api/v1/partner with pk_live_ keys and real settlement workflows. Complete the go-live checklist before requesting production access.
Linked references
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on