Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Sub-account buying power (settlement-aware)

Sub-Accounts & White-Label Retail KYC

GET

/users/{userId}/buying-power

Sub-account buying power (settlement-aware)

Sandbox availablegetSubAccountBuyingPower

Settlement-aware balance for a sub-account. buyingPowerUsd is cash available to trade (unsettled SELL proceeds are usable for new buys, as is standard). withdrawableUsd excludes unsettled SELL proceeds, which remain locked until exchange settlement (T+N) — this is the free-riding guard. settlements[] lists each unsettled tranche and its settlement date.

Parameters

userIdstringpathRequired

Example: usr_abc123

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

accountTypeMASTER | SUBACCOUNT
subAccountIdstring | null
currencystring

Example: "USD"

cashBalanceUsdnumber

Current USD wallet balance.

buyingPowerUsdnumber

Cash available to place new orders (already net of open-BUY escrow; includes unsettled SELL proceeds).

unsettledUsdnumber

SELL proceeds credited but not yet settled at the exchange (T+N).

withdrawableUsdnumber

Cash available to withdraw — cashBalanceUsd minus unsettledUsd. The free-riding guard.

pendingBuyEscrowUsdnumber

Funds locked in open (PENDING) BUY orders.

settlementsobject[]
settlements[].amountUsdnumber
settlements[].settlesOnstring
settlements[].symbolstring | null
settlements[].exchangestring | null
settlements[].orderIdstring | null

Response codes

200Settlement-aware balance.
404Sub-account not found.