Skip to main content
The core of a market-making loop is one call: replace your entire ladder of two-sided quotes on a market in a single atomic operation. This page covers authentication, posting a ladder, and cancelling. All traffic goes through the OCX API gateway (one HTTPS base URL, referred to below as {API_BASE}). Prices and quantities are JSON strings (fixed-decimal).

Authentication

1

Get a nonce

2

Sign in with SIWE

Sign the EIP-4361 message (including the nonce) and verify:
This opens a session (cookie / JWT).
3

Mint an API key for automation

The response includes a plaintext secretshown once only. Store it and send x-api-key: <secret> on every automated request.
The API-key secret is returned exactly once at creation and is never retrievable again. Store it in a secret manager. Pin allowedIps to your egress addresses and set expiresInDays for rotation. Keys carry a scope: use trade for quoting. Key creation and revocation are session-only — a key cannot manage keys.
The bulk-quote, cancel-all, and preview endpoints accept either a session cookie or an API key — the programmatic quoting path is fully API-key enabled.

Preview before you quote (optional)

Dry-run a prospective order to check sizing, fee, and margin with no side effects.
string
Order notional in quote currency.
string
Margin the order would consume.
string
Estimated fee for this fill.
string
Fee in basis points at your tier.
string
maker or taker.
string
Your rolling 30-day volume (drives your tier).
boolean
Whether the order would pass the margin gate.
string
Rejection reason when approved is false.

Post and refresh a ladder

POST {API_BASE}/perps/quotes/bulkAuth: session or API key. Build a symmetric set of bid/ask levels around your fair value and submit them in one call. Set cancelAll: true to make the call an atomic replace: your prior resting quotes on that market are cancelled and the new ladder is placed in one operation. This is the standard way to re-quote each cycle without leaving stale orders behind.
string
required
The market to quote.
string
Tags this quoting cycle so you can group/track/replace the batch.
boolean
When true, cancels your existing quotes on this market before placing the new ladder (atomic replace).
array
required
The ladder levels. Each entry accepts side (buy|sell), price, quantity, and optional clientOrderId, timeInForce, postOnly, reduceOnly, marginMode.
Keep postOnly: true on every quote level to guarantee you stay on the maker side — a postOnly order that would cross the book and take liquidity is rejected rather than executed as a taker.

Single-market convenience form

To place just one bid and one ask, use POST {API_BASE}/perps/quotes:

Cancel

Pull quotes on shutdown, on feed loss, or as a risk kill-switch.
POST {API_BASE}/perps/orders/cancel-allAuth: session or API key.Cancel all your resting orders, optionally scoped by marketId, quoteId, clientOrderId, or marginMode. Omit the body to cancel everything.
The typical re-quote cycle is a single quotes/bulk call with cancelAll: true — you rarely need standalone cancels except as an emergency stop. Wire cancel-all to your dead-man switch (see Best practices).

Options quoting

The options CLOB exposes an equivalent bulk path at POST {API_BASE}/options/quotes/bulk (with POST {API_BASE}/quotes/bulk as an alias), accepting a session or API key. The single-quote form is POST {API_BASE}/options/quotes. The ladder shape and cancelAll replace semantics match the perp path above.