Prefer WebSocket for order submission. Placing and cancelling orders over the persistent
/ws socket is lower-latency (one round trip instead of the REST submit/poll pair) and simpler to build: one connection, one auth handshake, and pushed order_update/fill events instead of polling. See Order Execution over WebSocket.The four API groups below the overview are generated from the OpenAPI specs, so they always reflect the current wire contract — parameters, request bodies, and responses. The Guides beneath them add the caveats that don’t fit in a schema: pagination quirks, field casing, price scales, and error handling. Read the generated page for the exact fields, then the matching guide for the gotchas.
Your first request
The Market Data API needs no credentials — call it right now:Submit an order
The exact request shape, status semantics, and error codes for the custodial order lane.
Stream market data
Real-time orderbooks, trades, and prices over WebSocket with protobuf encoding.
Fees and fee quotes
Platform tiers, per-venue exchange fees, and the live fee-quote endpoint.
Get an API key
API keys, scopes, the session JWT, and how each service reports auth failures.
Machine-readable specifications
Every public API is described by an OpenAPI 3.1 specification. The copies below power the auto-generated endpoint references; download them to generate clients or feed your own tooling.WebSocket surfaces are described separately with AsyncAPI. See the WebSocket section for the wire contracts and Protobuf Schema for the generated message definitions.
What trips people up first
These bite almost every first integration. Each links to the guide with the full detail.priceis required on every order — including market orders, where it is the limit you are willing to cross, not a sentinel. Omitting it is a400. See Orders.- Tick grids change while a market trades. Read
rangesandmin_tick(and treat them as decimal strings, not floats), not a single cached tick size. See Markets, Resolutions & Marks. - Casing is per-service.
/ordersand most REST issnake_case;/combo/*iscamelCase; the RPC API usescamelCase. Copy the generated reference for the service you’re calling. See Combos & Parlays. - Price scales differ by surface. Candles and trades are on a
0–100scale; marks and resolution payouts are0–1; some discovery feeds returncamelCasewith a24hsuffix. See Markets & Prices. - A bad credential triple on an execution mutation is
403, not401. Handle both. See Orders. - The fastest way to trade is the WebSocket. Submit and cancel over
/wsinstead of the REST submit/poll pair. See Order Execution over WebSocket.
Conventions
- Authentication — the Market Data API is anonymous and free. The Data and Execution APIs accept the API-key triple; Agora requires a first-party session JWT; the RPC API accepts either. Scopes are per-operation. See API Key Auth.
- Pagination — mixed. The Market Data API,
/markets/active,/trades/kalshi, and/matched-marketsare cursor-based (pass the returnednext_cursorback ascursor). Most Data API list endpoints and all RPC list procedures uselimit/offset. - Errors — each service has its own envelope: Execution returns
error_details.code, the Data API returns{"detail": ...}, the Market Data API returns{"error": {"code", "message"}}, and the RPC API returns a tRPC error witherror.data.code. Status codes are standard HTTP. - Rate limits — per-IP on the free tier, per-key on authenticated tiers. Honor
429with exponential backoff.

