REST endpoints
Market data, trading, account, and wallet operations over HTTPS JSON.
Streaming
Server-Sent Events for futures books, fills, positions, the option board, and balances.
Errors & limits
Status codes, error shapes, and rate limits.
Base URL
"31071.25", not 31071.25) — parse them with a decimal-safe type, never a native float.
Futures endpoints live under /fut/*; the legacy /perps/* prefix serves the same handlers. Options endpoints use /orders, /quotes, /positions/me, and /options/*; market data lives under /markets/*, /fut/*, and /orderbook/*.
The API is meant to be called from your own servers, bots, and agents. Cross-origin browser requests are only allowed from OCX’s own web app.
Authentication
Each endpoint in this reference is tagged with the access it needs.Public
No credentials. Market data — markets, order books, stats, candles, the option board, fee schedules — and the public streams.
Session
A session from Sign-In With Ethereum (SIWE). Required for orders, quotes, and your own account and wallet.
astra_session cookie and accepted either way:
Response shape
Successful responses return the resource directly as a JSON object or array — there is no envelope on REST responses.text/event-stream — see Streaming.
Error shape
Errors use HTTP status codes with a JSON body. Handle the status first, then read the body for detail. Business rejections carry a stable code, for example:Rate limits
Requests are rate-limited per client, and rate-limited responses carryx-ratelimit-limit, x-ratelimit-remaining, and x-ratelimit-reset (seconds until the window resets). Futures market-data reads are not rate-limited; prefer the streams over tight polling anyway. Details are in Errors & rate limits.
Idempotency
Order endpoints accept aclientOrderId. Resending an order with the same clientOrderId and the same parameters returns the original result instead of placing a second order. Quote endpoints accept a quoteId to tag a quote set.