https://api.ocx.global, written here as {BASE_URL}.
Prices and sizes are decimal strings. Send and parse them as strings to
keep full precision. Quantities are whole contracts.
1. Read public market data
No authentication is needed for market data. List the futures markets, then pull a book snapshot and stats for one of them. Market ids change as contracts expire — always read them from the market list.contractSize, tickSize, expiry, and current markPrice. Book levels are objects:
2. Sign in with your wallet
Open a session with SIWE: request a nonce, sign the message in your wallet, then verify. See Authentication for the required message fields and a full example.-c cookies.txt jar now holds your session cookie; pass -b cookies.txt on authenticated calls (or send the token as Authorization: Bearer <token>).
3. Check your balance
Deposit USDC through the OCX app; deposits are credited to yourwallet balance once confirmed on-chain.
perpsBalance is your futures collateral and optionsBalance your options collateral. You do not have to move funds before trading: if an order is rejected only for lack of collateral, OCX moves the shortfall from your wallet and retries once. To allocate explicitly, use POST /wallet/transfer — see Balances & transfers.
4. Preview, then place your first order
Always dry-run first.preview returns the notional, the estimated fee, and whether the order passes the margin check — with no side
effects.
Limit prices must sit on the market’s
tickSize. clientOrderId makes a retry safe: resending the same order with the same id returns the original result. postOnly keeps you on the maker side (the order is rejected if it would take liquidity), and reduceOnly prevents an order from increasing your position.5. Watch your orders, positions, and fills
Next steps
Authentication
Session tokens for bots and agents.
Methodology
How futures marks and the option board are built.
REST API
Every market-data, trading, account, and wallet endpoint.
Products
Contract sizes, ticks, expiry, and settlement.