Skip to main content
Your account holds USDC in three buckets. Funds move by deposit, withdrawal, transfer, or — when you trade — the automatic collateral top-up described below.

The buckets

Automatic collateral

You do not have to pre-fund a venue. When an order is rejected only because its venue bucket is short of collateral, the gateway moves the shortfall into that bucket — from wallet first, then from the other venue if that venue can spare it — and retries the order once. If the move is not possible, you get the original rejection. Withdrawals work the same way in reverse: if wallet is short, OCX first tries to move collateral back from options and perps.
All balance and wallet endpoints require an authenticated session. See Authentication.

Check your balances

string
USDC in the wallet bucket — the only bucket withdrawals are paid from. tradableBalance repeats this value for older clients.
string
Collateral currently allocated to futures and to options.
string
Amount debited from wallet and awaiting on-chain payout.
string
Total USDC credited from on-chain deposits.
For a combined view with equity and margin, use GET /portfolio/balances or its stream.

The money lifecycle

1

Deposit on-chain

Deposit USDC through the OCX app. The deposit goes through OCX’s on-chain wallet router, and your wallet bucket is credited only after the transaction has the required number of block confirmations (reorg-safe). Until then the deposit shows as pending (202) and OCX keeps checking it. Each on-chain transaction is credited exactly once.
2

Trade

Place orders. Collateral is drawn from the venue’s bucket and topped up automatically from wallet when needed.
3

Withdraw

Request an on-chain withdrawal. It is paid to the wallet address you signed in with.

Transfer between buckets

To allocate collateral explicitly:
string
required
Source bucket — wallet, perps, or options.
string
required
Destination bucket, different from from.
string
required
Positive amount, no greater than the source bucket’s balance.
Transfers are atomic and ledgered. Two rules protect open risk:
  • A move between perps and options is refused if the source venue would be left under-margined; the message states the most you can move.
  • A move from perps or options back to wallet is refused (409) while you have any open positions or open orders.

Withdraw

Withdrawals are paid only from wallet. The amount is immediately debited from wallet into pendingWithdrawalTotal, and the on-chain payout is processed asynchronously. If collateral cannot be moved back to wallet (for example because you have open positions), the request is rejected with Insufficient wallet balance. While you have an open loan on OCX’s funding books, a withdrawal must leave enough in the account to cover it.

History and settlement tracking

/wallet/history returns your 100 most recent ledger entries. Settlement status values: pending, processing, sent, confirmed, failed, insufficient_liquidity.
For live updates, subscribe to the portfolio balances stream instead of polling — it pushes a snapshot on connect and an update whenever your balances change.