API Overview
Phoenix exposes a public REST API for snapshots and request/response workflows, plus a WebSocket API for live subscriptions.| Surface | URL |
|---|---|
| REST API | https://perp-api.phoenix.trade |
| WebSocket | wss://perp-api.phoenix.trade/v1/ws |
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, and candle queries.Registration— invite and referral activation.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: