Cash units on the wire
Cash uses one internal unit but reads differently depending on direction.- Internally, cash is measured in CentiCents, where
1 CentiCent = 0.0001 USDC(one ten-thousandth of a USDC) — the same integer family used for prices and sizes, covered in markets, assets, and precision. - In responses (reads), a cash balance comes back as a USDC decimal string, not an integer. For example,
cash_balanceis a string such as"1000.00". - In request bodies (writes), the
sizefield of a deposit, withdrawal, or transfer is a signed 64-bit integer in CentiCents. To deposit1,000 USDC, sendsize = 10000000(1000 × 10000).
Read your balance
Two read endpoints return cash, both authenticated with a read credential:GET /api/v1/portfolio/balancereturns the free cash balance for a single portfolio, as a USDC string.GET /api/v1/portfolio/cash_balancesreturns one balance per portfolio. A pinned credential sees its own subaccount; an unpinned credential sees the whole account.
Deposit
Add USDC collateral to a portfolio.- Endpoint:
POST /api/v1/trading/deposit - Auth: session-key signed payload.
- Body:
portfolio_id(theaccount_id/subaccount_index/portfolio_indextriple) andsize(CentiCents).
status and processed_at_ns. A failed deposit returns a rejecting status rather than a transport error — read the body.
Spot deposit is not yet available: the spot deposit request type is rejected with 400. Only USDC cash deposit is live.
Withdraw
Remove USDC collateral from a portfolio. A withdrawal is signed by a session key on the wire, the same as a deposit, but the exchange holds it to a higher bar.- Endpoint:
POST /api/v1/trading/withdraw - Auth: admin-rooted session-key signed body.
- Body:
portfolio_idandsize(CentiCents).
400. Only USDC cash withdrawal is live.
Transfer
Move USDC cash between portfolios without an external deposit or withdrawal. Both variants hit the same endpoint; the embedded request body selects the variant.- Endpoint:
POST /api/v1/trading/transfer - Auth: session-key signed body.
- Intra-account
- Inter-account
Move cash between two portfolios you own under one
account_id. The body carries the account_id once, plus from_subaccount_index / to_subaccount_index, from_portfolio_index / to_portfolio_index, and size (CentiCents).