Contracts and environments
Choose the right network, configure its endpoints and use compatible API schemas.
Networks and endpoints
Each network (TestNet, MainNet and DevNet) has its own REST, realtime and MCP addresses, listed once on the Networks page. Keep endpoints, credentials and account identifiers within one network. Keep the network selected in the REST console aligned with your credentials.
Published API schemas
OpenAPI defines REST endpoints, authentication requirements, request fields, responses and errors. AsyncAPI defines WebSocket channels, message envelopes and payloads. Use these schemas to generate client types and validate incoming data.
Choose versions compatible with your target environment, and check each operation’s availability and account permissions. Unsupported methods return HTTP 501 NotSupported.
Client compatibility
Client compatibility
- Step
- Participant
10 parts and 9 connections.
Read as text
- REST OpenAPI → Generated REST client types
- Product AsyncAPI → Realtime types and validation
- Generated REST client types → Your integration
- Realtime types and validation → Your integration
- Chosen environment → Capabilities, permissions and schema compatibility
- Your integration → Capabilities, permissions and schema compatibility
- Capabilities, permissions and schema compatibility → Read and subscribe
- Read and subscribe → Verify readiness and data continuity
- Verify readiness and data continuity → Authorized commands
Generate REST types from OpenAPI and realtime types from AsyncAPI. Validate received data before applying it to account or market state, and retain the schema version used by each client release.
Requests and responses. Check required fields, response alternatives and error values when upgrading a client.
Realtime messages. Check subscription envelopes, channel access, payload schemas and replay behavior.
Environment and access. Use credentials and identifiers for the chosen environment, then confirm supported operations and account permissions before enabling commands.
API reference and schema downloads
Use the REST API reference and realtime API reference, including the place-order operation.
Download External REST OpenAPI for REST request and response types, and Product-channel AsyncAPI for market and account WebSocket channels. Keep a copy of the schema used to generate your client, and check its compatibility with the chosen environment before enabling commands.
Validate responses and supported assets
Handle the response alternatives and error codes defined for each operation. Validate WebSocket messages before applying them to market or account state. If a response is incompatible with your client, keep the affected state unavailable and follow the documented recovery steps.
Use asset metadata for identifiers and decimal scales, and the account’s funding capabilities to determine which assets it can accept. A response type alone does not establish deposit or withdrawal availability. See asset identifiers and account funding.
REST operation directory
Find REST endpoints for market data, order entry, accounts, authentication and funding below. Check each operation’s credential requirements, request fields and environment availability before integrating. Unsupported compatibility methods return HTTP 501 NotSupported.
| Method | Path | Operation | Purpose |
|---|---|---|---|
| GET | /health | getServiceHealth | Get service health |
| GET | /ready | getServiceReadiness | Get service readiness |
| GET | /openapi.json | getOpenApiDocument | Fetch the OpenAPI document |
| GET | /v1/affiliate/availability | getAffiliateAvailability | Get public affiliate availability |
| POST | /v1/orders | placeOrder | Place an order |
| POST | /v1/orders/batch | placeOrderBatch | Place a LIMIT order batch |
| POST | /v1/orders/batch/cancel | cancelOrderBatch | Cancel an order batch |
| POST | /v1/orders/preview | previewOrder | Preview an order |
| GET | /v1/orders/{orderId} | getOrder | Get an order |
| POST | /v1/orders/{orderId}/cancel | cancelOrder | Cancel an order |
| POST | /v1/withdrawals | createWithdrawal | Request a withdrawal |
| GET | /v1/withdrawals/{withdrawalId} | getWithdrawal | Get a withdrawal |
| POST | /v1/withdrawals/{withdrawalId}/authorize | authorizeWithdrawal | Authorize a withdrawal |
| POST | /v1/withdrawals/{withdrawalId}/confirm | confirmDfnsWithdrawal | Confirm an owner-signed withdrawal step |
| GET | /v1/auth/capabilities | getAuthCapabilities | Get authentication capabilities |
| POST | /v1/auth/social/register | initiateSocialAuthRegistration | Start Google/OIDC registration |
| POST | /v1/auth/social/register/recover | recoverSocialAuthRegistration | Resolve a Google registration outcome |
| POST | /v1/auth/register/complete | completeAuthRegistration | Complete passkey registration |
| POST | /v1/auth/login/init | initiateAuthLogin | Start passkey login |
| POST | /v1/auth/login/complete | completeAuthLogin | Complete passkey login |
| POST | /v1/auth/social/login | completeSocialAuthLogin | Log in with Google/OIDC |
| POST | /v1/auth/mapping/recover | recoverAuthMapping | Recover an account link |
| POST | /v1/realtime/ticket | mintRealtimeTicket | Mint a realtime connection ticket |
| PUT | /v1/realtime/ticket | rotateRealtimeTicket | Rotate a realtime connection ticket |
| DELETE | /v1/realtime/ticket | revokeRealtimeTicketFamily | Revoke a realtime ticket family |
| GET | /v1/markets | listMarkets | List markets |
| GET | /v1/leaderboard | getLeaderboard | Get the projected realized-PnL leaderboard |
| GET | /v1/markets/{marketId} | getMarketSnapshot | Get a market snapshot |
| GET | /v1/markets/{marketId}/stats | getMarketStats | Get market stats |
| GET | /v1/markets/{marketId}/book | getMarketBook | Get the order book |
| GET | /v1/markets/{marketId}/candles | getMarketCandles | Get market candles |
| GET | /v1/market-data/candidate-markets | listMarketDataCandidateMarkets | List market-data candidate markets |
| GET | /v1/accounts/{accountId} | getAccountSnapshot | Get an account snapshot |
| GET | /v1/accounts/{accountId}/positions | getAccountPositions | Get account positions |
| GET | /v1/accounts/{accountId}/positions/history | getAccountPositionHistory | Get account position history |
| GET | /v1/accounts/{accountId}/transfers | getAccountTransferHistory | Get account transfer history |
| GET | /v1/accounts/{accountId}/affiliate/earnings | getAccountAffiliateEarnings | Get affiliate earnings for an account |
| POST | /v1/accounts/{accountId}/affiliate/registration | registerAccountAffiliate | Register an affiliate account |
| GET | /v1/accounts/{accountId}/kyc | getAccountKycStatus | Get account KYC status |
| POST | /v1/accounts/{accountId}/kyc/skip | skipAccountKyc | Skip optional account KYC |
| GET | /v1/accounts/{accountId}/affiliate/profile | getAccountAffiliateProfile | Get an affiliate profile |
| GET | /v1/accounts/{accountId}/fills | getAccountFillHistory | Get account fill history |
| GET | /v1/accounts/{accountId}/orders | getAccountOrderHistory | Get account order history |
| GET | /v1/accounts/{accountId}/orders/open | getAccountOpenOrders | Get live open orders |
| GET | /v2/trading-fees | v2FetchTradingFees | Fetch market trading fees |
| GET | /v2/currencies | v2FetchCurrencies | Fetch currencies |
| GET | /v2/markets | v2FetchMarkets | Fetch markets |
| GET | /v2/markets/{symbol}/stats | v2FetchTickerAndFundingRate | Fetch a ticker and funding rate |
| GET | /v2/funding-rates | v2FetchFundingRates | Fetch funding rates |
| GET | /v2/tickers | v2FetchTickers | Fetch tickers |
| GET | /v2/venue/totals | getVenueTotals | Fetch venue totals |
| GET | /v2/markets/{symbol}/candles | v2FetchOhlcv | Fetch OHLCV |
| GET | /v2/markets/{symbol}/trades | v2FetchTrades | Fetch public trades |
| GET | /v2/markets/{symbol}/book | v2FetchOrderBook | Fetch an order book |
| GET | /v2/accounts/{accountId} | v2FetchBalance | Fetch balances for every held asset |
| GET | /v2/accounts/{accountId}/positions | v2FetchPositions | Fetch positions |
| POST | /v2/orders | v2CreateOrders | Create LIMIT orders |
| POST | /v2/order | v2CreateOrder | Create one order |
| POST | /v2/twap-orders | v2CreateTwapOrder | Create a TWAP order |
| POST | /v2/orders/{orderId}/cancel | v2CancelOrder | Cancel one order |
| POST | /v2/orders/cancel | v2CancelOrders | Cancel orders |
| POST | /v2/orders/cancel-all | v2CancelAllOrders | Cancel every open order of one symbol |
| GET | /v2/orders/{orderId} | v2FetchOrder | Fetch an order |
| GET | /v2/accounts/{accountId}/orders | v2FetchOrders | Fetch orders |
| GET | /v2/accounts/{accountId}/orders/open | v2FetchOpenOrders | Fetch open orders |
| GET | /v2/accounts/{accountId}/fills | v2FetchMyTrades | Fetch private trades |
| GET | /v2/spot/markets | v2FetchMarketsSpot | Fetch markets (spot) |
| GET | /v2/perps/markets | v2FetchMarketsPerps | Fetch markets (perps) |
| GET | /v2/spot/markets/{symbol}/stats | v2FetchTickerAndFundingRateSpot | Fetch a ticker and funding rate (spot) |
| GET | /v2/perps/markets/{symbol}/stats | v2FetchTickerAndFundingRatePerps | Fetch a ticker and funding rate (perps) |
| GET | /v2/spot/tickers | v2FetchTickersSpot | Fetch tickers (spot) |
| GET | /v2/perps/tickers | v2FetchTickersPerps | Fetch tickers (perps) |
| GET | /v2/spot/markets/{symbol}/candles | v2FetchOhlcvSpot | Fetch OHLCV (spot) |
| GET | /v2/perps/markets/{symbol}/candles | v2FetchOhlcvPerps | Fetch OHLCV (perps) |
| GET | /v2/spot/markets/{symbol}/trades | v2FetchTradesSpot | Fetch public trades (spot) |
| GET | /v2/perps/markets/{symbol}/trades | v2FetchTradesPerps | Fetch public trades (perps) |
| GET | /v2/spot/markets/{symbol}/book | v2FetchOrderBookSpot | Fetch an order book (spot) |
| GET | /v2/perps/markets/{symbol}/book | v2FetchOrderBookPerps | Fetch an order book (perps) |
| GET | /v2/spot/trading-fees | v2FetchTradingFeesSpot | Fetch market trading fees (spot) |
| GET | /v2/perps/trading-fees | v2FetchTradingFeesPerps | Fetch market trading fees (perps) |
| GET | /v2/perps/funding-rates | v2FetchFundingRatesPerps | Fetch funding rates (perps) |
| GET | /v2/perps/accounts/{accountId}/positions | v2FetchPositionsPerps | Fetch positions (perps) |
| POST | /v2/spot/order | v2CreateOrderSpot | Create one order (spot) |
| POST | /v2/perps/order | v2CreateOrderPerps | Create one order (perps) |
| POST | /v2/spot/orders | v2CreateOrdersSpot | Create LIMIT orders (spot) |
| POST | /v2/perps/orders | v2CreateOrdersPerps | Create LIMIT orders (perps) |
| POST | /v2/spot/twap-orders | v2CreateTwapOrderSpot | Create a TWAP order (spot) |
| POST | /v2/spot/orders/{orderId}/cancel | v2CancelOrderSpot | Cancel one order (spot) |
| POST | /v2/perps/orders/{orderId}/cancel | v2CancelOrderPerps | Cancel one order (perps) |
| POST | /v2/spot/orders/cancel | v2CancelOrdersSpot | Cancel orders (spot) |
| POST | /v2/perps/orders/cancel | v2CancelOrdersPerps | Cancel orders (perps) |
| POST | /v2/spot/orders/cancel-all | v2CancelAllOrdersSpot | Cancel every open order of one symbol (spot) |
| POST | /v2/perps/orders/cancel-all | v2CancelAllOrdersPerps | Cancel every open order of one symbol (perps) |
| GET | /v2/spot/orders/{orderId} | v2FetchOrderSpot | Fetch an order (spot) |
| GET | /v2/perps/orders/{orderId} | v2FetchOrderPerps | Fetch an order (perps) |
| GET | /v2/spot/accounts/{accountId}/orders | v2FetchOrdersSpot | Fetch orders (spot) |
| GET | /v2/perps/accounts/{accountId}/orders | v2FetchOrdersPerps | Fetch orders (perps) |
| GET | /v2/spot/accounts/{accountId}/orders/open | v2FetchOpenOrdersSpot | Fetch open orders (spot) |
| GET | /v2/perps/accounts/{accountId}/orders/open | v2FetchOpenOrdersPerps | Fetch open orders (perps) |
| GET | /v2/spot/accounts/{accountId}/fills | v2FetchMyTradesSpot | Fetch private trades (spot) |
| GET | /v2/perps/accounts/{accountId}/fills | v2FetchMyTradesPerps | Fetch private trades (perps) |
| POST | /v2/spot/orders/{orderId}/edit | v2EditOrderSpot | Edit one order (spot) |
| POST | /v2/perps/orders/{orderId}/edit | v2EditOrderPerps | Edit one order (perps) |
| POST | /v2/spot/orders/edit | v2EditOrdersSpot | Edit orders (spot) |
| POST | /v2/perps/orders/edit | v2EditOrdersPerps | Edit orders (perps) |
| POST | /v1/accounts/{accountId}/party/consent | ensureAccountReceiverConsent | Set up receiver-only USD.E consent |
| POST | /v1/accounts/{accountId}/party | initAccountPartyOnboarding | Start secure account setup |
| GET | /v1/accounts/{accountId}/party | getAccountPartyOnboarding | Get the status of secure account setup |
| POST | /v1/accounts/{accountId}/party/complete | completeAccountPartyOnboarding | Complete secure account setup |
| POST | /v1/accounts/{accountId}/local-signing-wallet | createLocalSigningWallet | Create a local signing wallet |
| POST | /v1/accounts/{accountId}/faucet-grant | requestAccountFaucetGrant | Request the account's test funds |
| GET | /v1/accounts/{accountId}/local-signing-funding-intents | listLocalSigningFundingIntents | List owner funding intents |
| POST | /v1/accounts/{accountId}/deposits | prepareLocalSigningDeposit | Prepare a deposit |
| POST | /v1/accounts/{accountId}/deposits/confirm | confirmLocalSigningDeposit | Authorize a deposit |
| PUT | /v1/accounts/{accountId}/favorites/{marketId} | putAccountMarketFavorite | Favorite a market |
| DELETE | /v1/accounts/{accountId}/favorites/{marketId} | deleteAccountMarketFavorite | Unfavorite a market |
| POST | /v1/agent-connect/start | startAgentConnect | Start connecting an agent |
| POST | /v1/agent-connect/complete | completeAgentConnect | Collect the API key of an approved agent |
| POST | /v1/accounts/{accountId}/agent-connect/approve | approveAgentConnect | Approve an agent for the account |
| GET | /v1/api-keys/current | getCurrentApiKey | Read the authenticated API key metadata |
| GET | /v1/accounts/{accountId}/api-keys | listApiKeys | List the account's API keys |
| DELETE | /v1/accounts/{accountId}/api-keys/{keyId} | revokeApiKey | Revoke an API key |