Skip to main content

Overview

The update action allows you to modify the filters of an existing subscription without creating a new one. This is more efficient than unsubscribing and re-subscribing, as it maintains the same subscription ID.

Update Message Format

Required Parameters:
  • action: Must be "update"
  • subscription_id: The ID of the subscription you want to update
  • platform: Must be "polymarket"
  • version: Currently 1
  • type: Must be "orders"
  • filters: New filter configuration (same format as subscribe)

Example

Update a subscription to change its filters:
After updating, the subscription will immediately start using the new filters. You’ll continue to receive events, but they’ll match the updated criteria.

Use Cases

  • Change which users you’re tracking without losing your subscription
  • Switch from tracking users to tracking condition IDs
  • Update market slugs or condition IDs as markets change
  • Adjust filters based on runtime conditions

Filter Types

You can update a subscription to use any of the supported filter types:

Update to User Filters

Update to Condition ID Filters

Update to Market Slug Filters

Complete Example

Here’s a complete example showing the full flow of subscribing, receiving events, and then updating the subscription:

Step 1: Initial Subscription

Server Response:

Step 2: Receiving Events (Before Update)

You’ll receive order events for the subscribed user:

Step 3: Update Subscription

Now update the subscription to track a different user:
Note: The subscription ID remains the same: sub_k7f5hgr7wy

Step 4: Receiving Events (After Update)

After the update, you’ll now receive events for the new user:
Notice that:
  • The subscription_id is still sub_k7f5hgr7wy (same as before)
  • The user field in the event data now matches the updated filter
  • You’ll no longer receive events for the previous user (0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b)

Example: Changing Filter Types

You can also change the filter type entirely. For example, switch from user filters to condition ID filters:
After this update, you’ll receive events for orders matching the specified condition ID, regardless of which user made the trade.

Benefits

  • Efficiency: No need to unsubscribe and re-subscribe
  • Consistency: Maintains the same subscription ID
  • Seamless: No interruption in receiving events (after the update takes effect)
  • Flexibility: Change filter types or criteria on the fly