For the complete documentation index, see llms.txt. This page is also available as Markdown.

REST API

Endpoints

Mainnet

  • Public: https://mainnet-gw.sodex.dev/api/v1

  • Spot: https://mainnet-gw.sodex.dev/api/v1/spot

  • Perps: https://mainnet-gw.sodex.dev/api/v1/perps

Testnet

  • Public: https://testnet-gw.sodex.dev/api/v1

  • Spot: https://testnet-gw.sodex.dev/api/v1/spot

  • Perps: https://testnet-gw.sodex.dev/api/v1/perps

Authentication

  • Public market-data endpoints are unsigned.

  • Authenticated REST writes use EIP-712 signatures.

  • API keys are used for signing only.

  • Account queries should use the target accountID.

See API Keys and Nonces for credential and nonce rules, and Authentication & Signing for EIP-712 structures and signing examples.

Rate Limits

All REST API requests consume request weight from a fixed one-minute window. When the window's weight limit is reached, subsequent requests are rejected until the window resets.

  • Weight budget: 1200 per minute

  • Scope: per IP address

  • Default unmatched endpoint weight: 20

For the full per-endpoint weight table, dynamic rules, order-placement limits, and WebSocket limits, see Rate Limits.

Request Headers

Public read endpoints

Public read endpoints usually only require:

  • Accept: application/json

Signed write endpoints

Signed write endpoints use the following default headers:

Name
Type
Required
Description

Content-Type

string

true

application/json

Accept

string

true

application/json

X-API-Key

string

For API key signing

Name of the registered API key (e.g. "api-key-01") — a plain string, not a public key or EVM address. Omit this header for direct master-wallet signing (the "default key"), which is supported but not recommended for routine trading.

X-API-Sign

HexString

true

EIP-712 typed signature produced with the private key of either the API key named in X-API-Key, or, if that header is omitted, the master wallet. The private key is never sent — only this signature is. See Typed signature.

X-API-Nonce

uint64

true

Recommended: current timestamp in milliseconds. Must be within (T - 2 days, T + 1 day) window. Nonces are tracked per signing address (master wallet address or API key public key), not per account.

Endpoint pages include a dedicated Headers section only when they differ from this shared default.

Signed request example

Direct master-wallet signing is supported but not recommended for routine trading. To use it, omit X-API-Key entirely and sign with the master wallet's private key. Prefer a dedicated, revocable API key for trading requests.

Use the shared default headers above for normal signed writes. Endpoints that require additional headers such as X-API-Chain document that exception locally.

Response Format

REST endpoints return a common response envelope with:

  • code for status

  • timestamp for the server time in milliseconds

  • error when the request fails

  • data containing the endpoint-specific payload

Each endpoint's Response section only describes the endpoint-specific data payload, or notes when no endpoint-specific data is returned.

See the endpoint pages and Schema for concrete response payload definitions.

Reference Pages

Last updated