Skip to main content

Overview

The Polymarket CLOB API provides websocket (wss) channels through which clients can get pushed updates. These endpoints allow clients to maintain almost real-time views of their orders, their trades and markets in general. There are two available channels user and market.

Subscription

To subscribe send a message including the following authentication and intent information upon opening the connection.
FieldTypeDescription
authAuthsee next page for auth information
marketsstring[]array of markets (condition IDs) to receive events for (for user channel)
assets_idsstring[]array of asset ids (token IDs) to receive events for (for market channel)
typestringid of channel to subscribe to (USER or MARKET)
custom_feature_enabledboolenabling / disabling custom features
Where the auth field is of type Auth which has the form described in the WSS Authentication section below.

Subscribe to more assets

Once connected, the client can subscribe and unsubscribe to asset_ids by sending the following message:
FieldTypeDescription
assets_idsstring[]array of asset ids (token IDs) to receive events for (for market channel)
marketsstring[]array of market ids (condition IDs) to receive events for (for user channel)
operationstring”subscribe” or “unsubscribe”
custom_feature_enabledboolenabling / disabling custom features