Subscription Channels
The Paradex WebSocket API allows you to subscribe to various channels to receive real-time updates. This page explains how to subscribe and unsubscribe from channels.
Subscribing to Channels
To receive updates from a specific channel, you need to subscribe to it. Multiple calls to subscribe can be made, each for a different channel.
Note: Subscribing to the same channel more than once will return an error.
Subscribe Request
To subscribe to a channel, send a message with the following format:
Subscribe Parameters
Subscribe Response
Upon successful subscription, you will receive a response similar to:
Subscribe Response Parameters
Unsubscribing from Channels
To stop receiving updates from a specific channel, you need to unsubscribe from it.
Note: Unsubscribing from a channel that you are not subscribed to will return an error.
Unsubscribe Request
To unsubscribe from a channel, send a message with the following format:
Unsubscribe Parameters
Unsubscribe Response
Upon successful unsubscription, you will receive a response similar to:
Unsubscribe Response Parameters
Example: Subscribing to a Channel
Here’s a complete example of how to subscribe to the trades.ETH-USD-PERP
channel using Python:
Example: Unsubscribing from a Channel
Here’s a complete example of how to unsubscribe from the trades.ETH-USD-PERP
channel using Python:
Refer to the WebSocket Channels documentation for a list of supported channels.