API Overview
Phoenix exposes a public REST API for snapshots and request/response workflows, plus a WebSocket API for live subscriptions.
Use REST when you need a point-in-time response, such as exchange configuration, market metadata, trader state, historical fills, or transaction-builder responses. Use WebSocket subscriptions when you need continuous updates, such as orderbooks, trades, candles, trader state, or exchange parameter changes.
REST API
The REST API accepts and returns JSON. Requests with bodies should sendContent-Type: application/json.
The public reference is organized into:
Auth— wallet, service, and session authentication.Exchange— exchange, market, candle, and no-referral register-instruction workflows.Invite— invite validation and referral activation, including user-funded referral activation transactions.Trader— trader state, account history, and transaction builders.
Authentication and Errors
Most exchange, market, and trader read endpoints are public. Routes that require a session use bearer tokens returned by the authentication endpoints; the REST API reference marks those requirements on each operation. Error responses use a JSON object with anerror string: