API Reference
REST and WebSocket APIs for trading and market data.
Scalar has two REST APIs and two WebSocket feeds. New to the API? Start with Build on Scalar, which signs and submits an order step by step.
| API | Base URL on testnet | Auth |
|---|---|---|
| Trading REST | https://testnet-api.scalar.market | Signed orders. A SIWE bearer token for private reads and cancels. |
| Trading WebSocket | wss://testnet-api.scalar.market/ws | The same SIWE token, in the authenticate frame. |
| Market data WebSocket | wss://testnet-api.scalar.market/market-data/ws | None |
| Data REST | https://data.scalar.market | None, except to set a username |
Each REST endpoint has its own page with parameters, response samples, TypeScript types and a playground. The WebSocket feeds are stateful, so they are documented frame by frame on one page.