Skip to main content
The event WebSocket is the fastest path from a detected Polymarket fill to your application. A settlements subscription emits:
  • settlement when PolyNode detects a matching transaction, with status set to pending or confirmed
  • status_update when a previously pending transaction is confirmed on-chain
The SDK waits for the server’s subscription acknowledgement before returning the subscription. It then routes typed events to handlers or an async iterator.

Subscribe to settlements

snapshotCount / snapshot_count returns recent matching events before live delivery. Set it only when your application benefits from a warm start.

Filter at the server

Filters reduce bandwidth and work before events reach your process. Example wallet filter:
See Subscribing for preset-specific filter behavior.

Presets

The SDKs use the same subscription names:

Acknowledgements

Do not assume a subscription is active before the SDK’s subscribe call resolves. The acknowledgement includes the server-assigned subscription ID and may include warnings. For Chainlink subscriptions it also reports the selected price source and explicit TWAP windows:
One event-stream connection can carry several normal subscriptions. Chainlink feed and TWAP selection is connection-scoped, so combine all desired Chainlink feeds and windows in one Chainlink subscription on that connection. Use another connection for a different selection.

Reconnect behavior

Automatic reconnect is enabled by default. After a disconnect, the SDK:
  1. opens a replacement socket
  2. resubscribes each active subscription with its original filters
  3. adds a best-effort since cursor based on the latest accepted event
  4. overlaps the cursor slightly and removes duplicate delivery in the client
  5. reports replay state to your application
This reduces avoidable gaps, but it is not an unlimited gapless guarantee. Server history is bounded, and a disconnect can outlast it. Treat every replay notice as an observable recovery interval.
Managed short-form streams also reconnect at every market boundary. That deliberate rotation is required to replace the old market slugs and connection-scoped Chainlink selection. See Short-form and TWAP.

Slow consumers

TypeScript and Python async iterators use a bounded per-subscription queue. Register an overflow callback if processing may fall behind:
Handler callbacks are still invoked immediately. Queue overflow applies to the async-iterator buffer.

Forward-compatible events

New event types do not disappear merely because your SDK predates their typed model:
  • TypeScript emits an unknown event containing wire_event_type, raw, and an optional decode error.
  • Python yields UnknownEvent with the complete raw payload.
  • Rust emits WsMessage::UnknownEvent or WsMessage::UnknownMessage.
Log the event type and upgrade the SDK; avoid logging credentials or an entire payload when it may contain user data.

Cleanup

Stop subscriptions and close their owning socket during shutdown:
Next: Short-form and Chainlink TWAP or the full event reference.