Getting Started with Broker API
Build and test a complete embedded-investing workflow in the MyStocks sandbox.
This guide takes you from a sandbox credential to a testable customer-investing workflow.
Before you start
- Create a partner session in the sandbox portal.
- Keep the sandbox key server-side.
- Install the TypeScript or Python SDK, or use
curl. - Read authentication, errors, and idempotency.
Build the golden path
- Create a sub-account with an idempotent
POST /usersrequest. - Deposit virtual funds with a unique
Idempotency-Key. - Assert the required KYC status.
- Request a quote immediately before the trade.
- Place the trade with the matching
quoteIdand the same idempotency key if retrying. - Consume the order, execution, wallet, and portfolio state through REST, webhooks, or SSE.
- Run the reconciliation workflow before requesting production access.
The complete copyable workflow is in the Broker API quickstart. Use the API Tester to run individual operations and the API Reference for schemas.
Production transition
Sandbox success does not grant production access. Attach evidence for concurrency/idempotency, webhook retry handling, failover, reconciliation, security controls, and data governance through Going Live.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on