Authentication
To access private channels in the Paradex WebSocket API, you must authenticate your connection. This page explains how to authenticate your WebSocket connection using a JWT token.
Authentication Process
Authentication is required to subscribe to private channels. The JWT (bearer) token is obtained from the POST /auth endpoint of the REST API.
Important: After the initial authentication, you do not need to re-authenticate your WebSocket connection for the lifetime of the connection.
Authentication Request
To authenticate your WebSocket connection, send an authentication message with the following format:
Authentication Parameters
Authentication Response
Upon successful authentication, you will receive a response similar to:
Example: Authenticating a WebSocket Connection
The auth request and its response are JSON-RPC text frames in both encodings. The SDK sends them for you and negotiates SBE for any public channels the same connection subscribes to:
If you implement the handshake yourself, send the auth request shown above as a text frame, and remember to append the SBE parameters to the connection URL so public channels are not silently delivered as JSON.
Authentication Errors
If authentication fails, you will receive an error response. Common authentication errors include:
For more information on error handling, see the Error Handling section.