Trading API
Use REST for request/response operations and WebSocket Streams for realtime market and account events.
Choose an interface
REST APIWebSocket StreamsSchemaDocumentation
QuickstartAPI Keys and NoncesAuthentication & SigningRate LimitsEndpoint
Mainnet REST Endpoint
Spot:
https://mainnet-gw.sodex.dev/api/v1/spotPerps:
https://mainnet-gw.sodex.dev/api/v1/perps
Mainnet WebSocket Endpoint
Spot:
wss://mainnet-gw.sodex.dev/ws/spotPerps:
wss://mainnet-gw.sodex.dev/ws/perps
Testnet REST Endpoint
Spot:
https://testnet-gw.sodex.dev/api/v1/spotPerps:
https://testnet-gw.sodex.dev/api/v1/perps
Testnet WebSocket Endpoint
Spot:
wss://testnet-gw.sodex.dev/ws/spotPerps:
wss://testnet-gw.sodex.dev/ws/perps
Get account ID
Account IDs are required to query account data and to sign trading actions. Retrieve them via either of:
Via REST API
The aid field in the response is the account ID. By default this is the primary account; pass ?accountID=<id> to query a specific sub-account. The same endpoint is available under ${SPOT_ENDPOINT} for spot.
See WsPerpsState for the full response shape.
Implementation example
Go SDK Signing GuideLast updated