Skip to main content
Every endpoint is served through the gateway at https://{API_BASE}. Bodies are JSON; prices and sizes are decimal strings. The auth tier for each endpoint is noted inline — see API overview for how each tier works.
Enums used throughout: side = buy | sell; order type = limit | market; timeInForce = gtc | ioc | fok; marginMode = isolated | cross. postOnly rejects an order that would take liquidity; reduceOnly prevents an order from increasing your position.

Market data

Public — no credentials required.

List markets

none
GET /perps/markets (alias GET /markets/linear) — all linear markets: spot, perpetual, and dated futures. Expired dated futures are auto-excluded.
[]
array
curl -s "https://{API_BASE}/perps/markets"
Response
[
  {
    "id": "BTC-PERP",
    "symbol": "BTC-PERP",
    "marketType": "perp",
    "baseSymbol": "BTC",
    "quoteSymbol": "USDC",
    "markPrice": "68210.5",
    "priceDecimals": 2,
    "sizeDecimals": 4,
    "indexMarketId": "BTC-USDC-SPOT"
  }
]

Order book snapshot

marketId
string
required
GET /perps/orderbook/{marketId} — aggregated book snapshot for a perp/linear market.
depth
number
Number of levels to return. Defaults to the full book.
Response
{ "bids": [["68200.0", "1.25"], ["68190.0", "3.00"]], "asks": [["68220.0", "0.80"]] }
For options and spot instruments, use GET /orderbook/{marketId} (alias GET /options/orderbook/{marketId}), which returns the same { bids, asks } shape.

Market stats

marketId
string
required
GET /perps/market-stats — 24h ticker for one market.
markPrice
string
change24hPct
string
volume24hUsd
string
openInterestUsd
string
funding1hPct
string
Current 1h funding rate as a percent.
curl -s "https://{API_BASE}/perps/market-stats?marketId=BTC-PERP"

Candles (OHLCV)

symbol
string
required
GET /perps/ohlc — candlestick history, TradingView-shaped. e.g. BTC-PERP.
resolution
string
1 | 5 | 15 | 30 | 60 | 240 | D (default 15).
from
number
Unix seconds. Range capped to 90 days.
to
number
Unix seconds.
Response
{ "s": "ok", "t": [1719878400], "o": ["68000"], "h": ["68300"], "l": ["67900"], "c": ["68210"], "v": ["120.5"] }

Fees, insurance fund & DVOL

GET /perps/fees
endpoint
Perp fee-tier schedule: array of { min30dVolumeUsd, makerBps, takerBps }. A negative maker bps is a rebate. Your personal tier is reflected in order preview.
GET /options/fees
endpoint
Options fee schedule.
GET /perps/insurance-fund
endpoint
Public insurance-fund balance and summary.
GET /markets/dvol
endpoint
30-day implied-volatility index. Query underlying (default BTC). Returns { underlying, dvol, tenorDays: 30, computedAt, sourceTimestamp }.

Options board

The option board is the single source for the chain and its implied-volatility surface — every strike carries its mark, IV and Greeks, so there is no separate surface endpoint.
underlying
string
GET /markets/board — full option chain for an underlying with per-strike quotes, IV and Greeks. e.g. BTC. Omit for the primary underlying.
underlyingPrice
string
underlyingSymbol
string
expiries
string[]
expiryForwards
object
Per-expiry { forwardPrice, futuresMarketId } — each expiry is priced off its own forward.
options
array
Board mark, iv, and delta are OCX reference marks, published for pricing and risk. The tradable prices are always the order book. See Options pricing for the concept.

Trading — perpetuals & futures

Perps and dated futures share one order API (a dated future is just a market with an expiry).

Place an order

marketId
string
required
side
string
required
buy | sell
quantity
string
required
type
string
limit (default) | market
price
string
Required for limit.
timeInForce
string
gtc | ioc | fok
postOnly
boolean
reduceOnly
boolean
marginMode
string
isolated | cross
clientOrderId
string
stopPrice
string
takeProfitPrice
string
stopLossPrice
string
POST /perps/ordersSession. Returns the order object with resulting fills and position.
curl -s -b cookies.txt -X POST "https://{API_BASE}/perps/orders" \
  -H "Content-Type: application/json" \
  -d '{
    "marketId": "BTC-PERP", "side": "buy", "type": "limit",
    "price": "68000", "quantity": "0.5", "timeInForce": "gtc", "postOnly": true
  }'

Preview an order

POST /perps/orders/previewSession or API key. Dry-run an order: margin required, estimated fee, and approval, with no side effects. Same body shape as a live order.
notional
string
marginRequired
string
estFee
string
feeBps
string
feeRole
string
maker | taker
user30dVolume
string
Drives your fee tier.
approved
boolean
reason
string
Present when approved is false.

Quotes and bulk quoting

POST /perps/quotes
endpoint
Session. Place a two-sided quote in one market: { marketId, bid?: { price, quantity, clientOrderId? }, ask?: { ... }, quoteId? }.
POST /perps/quotes/bulk
endpoint
Session or API key. Replace a whole ladder atomically — the market-maker path. Set cancelAll: true to cancel your prior quotes and place the new set in one operation.
POST /perps/quotes/bulk
{
  "marketId": "BTC-PERP",
  "quoteId": "mm-cycle-000123",
  "cancelAll": true,
  "quotes": [
    { "side": "buy",  "price": "67990", "quantity": "0.50", "postOnly": true },
    { "side": "sell", "price": "68010", "quantity": "0.50", "postOnly": true }
  ]
}

Cancel and close

POST /perps/orders/{id}/cancel
endpoint
Session. Cancel one resting order.
POST /perps/orders/cancel-all
endpoint
Session or API key. Cancel all your orders, optionally scoped by { marketId?, quoteId?, clientOrderId?, marginMode? }. Wire this to your kill-switch.
POST /perps/positions/close
endpoint
Session. Close a position fully or partially: { marketId, quantity?, marginMode?, orderType?, price?, timeInForce? }. Omit quantity to close fully.

Trading — options & spot

Options and spot run on the central limit order-book engine. Single-instrument orders use /orders; multi-leg strategies use /orders/strategy. Each path has an /options/… alias.

Single order

POST /orders (alias POST /options/orders) — Session.
marketId
string
required
side
string
required
buy | sell
quantity
string
required
price
string
required
type
string
limit (default) | market
timeInForce
string
gtc | ioc | fok
postOnly
boolean
reduceOnly
boolean
clientOrderId
string
POST /orders
{ "marketId": "BTC-2026-05-15-40000-C", "side": "buy", "type": "limit",
  "price": "1240", "quantity": "5", "timeInForce": "gtc" }
Preview with POST /orders/preview (alias /options/orders/preview), amend a resting order with POST /options/orders/{id}/modify ({ price?, quantity? }), and cancel with POST /orders/{id}/cancel or POST /orders/cancel-all.

Multi-leg strategy

POST /orders/strategy (alias /options/orders/strategy) — Session. Place a combo (spread, straddle, …). Combos are all-or-none-immediate: every leg must fully fill or the whole strategy is rejected (per-leg timeInForce is accepted but ignored — combos are FOK).
strategyName
string
allOrNone
boolean
cancelOnFailure
boolean
legs
array
required
2–8 legs, each { market, side, quantity, price }.
POST /orders/strategy
{
  "strategyName": "call-spread",
  "legs": [
    { "market": "BTC-2026-05-15-40000-C", "side": "buy",  "quantity": "5", "price": "1240" },
    { "market": "BTC-2026-05-15-45000-C", "side": "sell", "quantity": "5", "price": "430"  }
  ]
}
strategyId
string
fullyFilled
boolean
legs
array
Each { orderId, fills }.
Dry-run first with POST /orders/strategy/preview. Two-sided option quotes use POST /quotes and POST /quotes/bulk (the bulk path accepts an API key).

Account

Read your own orders, positions, trades, and portfolio. Session unless noted.
EndpointReturns
GET /perps/ordersYour perp orders (limit, marketId, marginMode).
GET /perps/orders/openYour resting perp orders.
GET /perps/positionsOpen positions: size, entry, mark, uPnL, liquidation price, leverage.
GET /perps/tradesYour recent perp fills.
GET /orders/meYour option/spot orders (alias /options/orders/me).
GET /positions/meYour option/spot positions.
GET /options/trades/meYour option fills.
GET /portfolio/meUnified cross-venue portfolio (perps + options + balances).
GET /portfolio/balancesUnified balance summary across venues.
For live account state, prefer the streams — GET /perps/stream/events, GET /options/stream/events, and GET /portfolio/balances/stream — documented in Streaming.

Wallet

Funds live in four buckets: wallet (deposit/withdraw source), perps, options, and spot. Move funds between buckets before trading in a venue. All Session.

Balances

GET /wallet/balance
endpoint
{ onchainDepositTotal, walletBalance, perpsBalance, optionsBalance, pendingWithdrawalTotal } — decimal strings.
GET /wallet/assets
endpoint
Per-asset inventory: array of { asset, bucket, available, locked, total }.
GET /perps/balances
endpoint
Perp-venue balance and margin view.

Transfer between buckets

from
string
required
wallet | perps | options | spot
to
string
required
A distinct bucket.
amount
string
required
Positive; cannot exceed the source balance.
POST /wallet/transfer — atomic and double-entry ledgered.
POST /wallet/transfer
{ "from": "wallet", "to": "perps", "amount": "500" }
→ { "walletBalance": "1500.00", "perpsBalance": "500.00", "optionsBalance": "0" }

Withdraw

amount
string
required
Must be ≤ your wallet balance. Transfer back from perps/options/spot first.
POST /wallet/withdraw{ "withdrawalId": "…" }. The amount is debited from wallet immediately and the on-chain payout proceeds asynchronously.

History & settlements

EndpointReturns
GET /wallet/historyLedger entries { id, type, amount, txHash, createdAt }, newest first.
GET /wallet/settlementsSettlements; filter kind (deposit/withdraw), status, limit (1–200).
GET /wallet/settlements/{id}One settlement record.
Settlement status values: pending, processing, sent, confirmed, failed, insufficient_liquidity.

API keys

Session-only — a key cannot manage keys. Scopes: read, trade.
GET /perps/me/api-keys
endpoint
List your keys (metadata only; secrets are never returned): { id, name, scope, allowedIps, expiresAt, createdAt, lastUsedAt, status }.
POST /perps/me/api-keys
endpoint
Create a key. Body { name, scope, allowedIps?, expiresInDays? }. Returns the metadata plus the plaintext secret, shown once only.
DELETE /perps/me/api-keys/{id}
endpoint
Revoke a key.
POST /perps/me/api-keys
{ "name": "mm-bot-1", "scope": "trade", "allowedIps": ["203.0.113.7"], "expiresInDays": 90 }
→ { "id": "01H…", "name": "mm-bot-1", "scope": "trade",
    "secret": "ocx_sk_…", "message": "Copy this secret now — it will not be shown again." }
The secret is returned exactly once at creation and can never be retrieved again. Store it in a secret manager immediately; if you lose it, revoke the key and create a new one.