Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console
Broker API

Getting Started with Broker API

MyStocks Partner API

Build and test a complete embedded-investing workflow in the MyStocks sandbox.

Explore endpoints

44 of 44
GET

/users

List sub-accounts

Full endpoint documentation
Sandbox availablelistUsers

Returns all sub-accounts for your partner key. Supports pagination and status filtering. Status filters are applied before pagination. Follow nextCursor even for an empty filtered page with hasMore=true. Invalid or foreign cursors return 400.

Parameters

statusactive | frozen | closed | ALLquery
cursorstringquery

Opaque cursor from nextCursor of the previous response. Omit for the first page.

limitintegerquery

Example: 100

externalIdstringquery

Exact partner-owned external identifier lookup; combined with status when supplied.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

accountsobject[]
accounts[].subAccountIdstring

MyStocks internal ID. Use in /users/{userId}/... paths.

Example: "usr_abc123"

accounts[].userIdstring

Compatible alias of subAccountId. Use subAccountId as the canonical stored identifier.

accounts[].externalIdstring

Your own user identifier as set at creation.

Example: "usr_8821"

accounts[].displayNamestring | null

Example: "Alice K."

accounts[].emailstring | null

Example: "alice@yourapp.com"

accounts[].kycStatusNONE | PENDING | VERIFIED | REJECTED

VERIFIED required for trading and asset subscriptions. REJECTED remains gated until re-asserted.

accounts[].kycLevelNONE | BASIC | FULL

BASIC = ID verified. FULL = enhanced due diligence.

accounts[].kycRejectionCodestring | null

Stable rejection code when kycStatus is REJECTED.

accounts[].kycRejectionReasonstring | null

Customer-safe remediation guidance when kycStatus is REJECTED.

accounts[].kycReviewedAtstring | null

Timestamp of the rejection decision.

accounts[].statusactive | frozen | closed
accounts[].walletBalancenumber

Current USD wallet balance.

Example: 1250

usersobject[]

Backward-compatible alias of accounts.

users[].subAccountIdstring

MyStocks internal ID. Use in /users/{userId}/... paths.

Example: "usr_abc123"

users[].userIdstring

Compatible alias of subAccountId. Use subAccountId as the canonical stored identifier.

users[].externalIdstring

Your own user identifier as set at creation.

Example: "usr_8821"

users[].displayNamestring | null

Example: "Alice K."

users[].emailstring | null

Example: "alice@yourapp.com"

users[].kycStatusNONE | PENDING | VERIFIED | REJECTED

VERIFIED required for trading and asset subscriptions. REJECTED remains gated until re-asserted.

users[].kycLevelNONE | BASIC | FULL

BASIC = ID verified. FULL = enhanced due diligence.

users[].kycRejectionCodestring | null

Stable rejection code when kycStatus is REJECTED.

users[].kycRejectionReasonstring | null

Customer-safe remediation guidance when kycStatus is REJECTED.

users[].kycReviewedAtstring | null

Timestamp of the rejection decision.

users[].statusactive | frozen | closed
users[].walletBalancenumber

Current USD wallet balance.

Example: 1250

countinteger
hasMoreboolean
nextCursorstring

Response codes

200Sub-account list.

This guide takes you from a sandbox credential to a testable customer-investing workflow.

Before you start

Build the golden path

  1. Create a sub-account with an idempotent POST /users request.
  2. Deposit virtual funds with a unique Idempotency-Key.
  3. Optionally assert KYC to test the production-style flow. Normal sandbox trading does not require KYC; production requires the applicable verification before trading.
  4. Request a quote immediately before the trade.
  5. Place the trade with the matching quoteId and the same idempotency key if retrying.
  6. Consume the order, execution, wallet, and portfolio state through REST, webhooks, or SSE.
  7. 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.

Send note

Last updated on

On this page