Read public market data, sign in with your wallet, fund a venue, and place your first order — in minutes.
This guide takes you from zero to your first order. You will read public market
data (no credentials), sign in with your wallet, move collateral into a venue,
and place a trade. All requests go through the API gateway, referred to here as
{BASE_URL}.
Prices and sizes are decimal strings. Send and parse them as strings to
keep full precision.
No authentication is needed for market data. List the linear markets and pull a
book snapshot.
# list perp / futures / spot marketscurl -s "{BASE_URL}/perps/markets"# order book snapshot for one marketcurl -s "{BASE_URL}/perps/orderbook/BTC-PERP?depth=10"# 24h ticker: mark, change, volume, open interest, fundingcurl -s "{BASE_URL}/perps/market-stats?marketId=BTC-PERP"
For live values, subscribe to the SSE stream {BASE_URL}/perps/book-stream?marketId=BTC-PERP
instead of polling — it pushes a snapshot then incremental updates.
Always dry-run first. preview returns your notional, estimated fee, fee role,
your volume tier, and whether the order passes the margin check — with no side
effects.
# dry-runcurl -s -b cookies.txt -X POST {BASE_URL}/perps/orders/preview \ -H 'Content-Type: application/json' \ -d '{"marketId":"BTC-PERP","side":"buy","type":"limit","price":"68000","quantity":"0.05"}'# place a post-only limit ordercurl -s -b cookies.txt -X POST {BASE_URL}/perps/orders \ -H 'Content-Type: application/json' \ -d '{"marketId":"BTC-PERP","side":"buy","type":"limit","price":"68000","quantity":"0.05","timeInForce":"gtc","postOnly":true,"clientOrderId":"my-first-order"}'
Use clientOrderId for idempotent client-side tracking. 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.