API ReferenceWebSocket

Issue a short-lived WebSocket handshake token

POST/api/v1/ws/handshake-tokenBearer

Trading APIprice E4 · size E2 · amount E6 (integers)YES | NO

Exchange for a short-lived token used to open a WebSocket connection. The WebSocket itself is not part of the REST surface documented here: the trading stream lives at the stream service's /ws (an {action,topic} protocol), and the PX stream at /api/v1/stream (upgraded and forwarded by the gateway; Next's /api/exchange rewrite does not proxy WebSockets).

Send Authorization: Bearer <token>. The token is issued by POST /api/v1/auth/verify, and expires after 24h idle or 7d after issuance.

Response

200Token issued
  • tokenstring

    Short-lived handshake token

    Example"eyJhbGciOiJIU…<signature>"

Switch status codes in the response example to view errors. For all codes, see the Errors page.