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
Here’s a complete example of how to authenticate a WebSocket connection using Python:
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.