Skip to main content
The stream endpoint delivers every matched Polymarket mempool transaction via Server-Sent Events (SSE), allowing you to see the market before it hits the chain. Each event contains the full transaction: market context, the taker order that triggered the fill, and all matching maker orders. Powered by a multi-node mempool synchronization engine, the system achieves a >99.99% delivery rate and streams live order flow up to 3-6 seconds faster than on-chain confirmations, with 10ms transaction awareness. Endpoint: GET /v1/stream/orders

Filter parameters

Apply filters to receive only the events relevant to your strategy. Omit a parameter to receive all values for that dimension.

Output formats

The stream supports two formats. Choose based on your throughput and parsing needs.
The default format serializes each transaction as a nested array. It is more compact and faster to transmit than equivalent JSON objects — ideal for high-frequency feeds.
The array positions map as follows:Use the parser utilities to convert the compact array into a structured object.

Parsing the compact format

The SDK parsers convert a raw compact array into the same shape as the JSON format response. Here is the complete parser code for both languages:
Depending on the format you request, the properties in the final transaction object will have different casing:
  • Default (Compact Format): After running the compact array through the SDK’s parser, the output uses camelCase for top-level fields and specific order fields (such as txHash, takerOrder, tokenId, and feeRateBps).
  • JSON Format (?format=json): The raw API returns a structured object using snake_case for all fields (such as tx_hash, taker_order, token_id, and fee_rate_bps).
Here are the complete shapes for both formats:

Connect and process events

1

Instantiate the client

Create a PolyEdgeClient with your API key. The SDK handles authentication via the X-PolyEdge-Key header on every request.
2

Open the stream

Call streamOrders() / stream_orders() with your filters. The Node.js SDK uses eventsource-client which auto-reconnects on dropped connections.
3

Process each event

Each yielded order object is already parsed by the SDK. Access order.market, order.takerOrder, and order.makerOrders directly.
4

Handle disconnections

The Node.js SDK auto-reconnects via eventsource-client. In Python, wrap your loop in a try/except and re-enter the loop to reconnect.
reconnect.py
The SSE event name sent by the PolyEdge API is order. The SDK already filters on this event name for you, so non-order events (heartbeats, etc.) are silently dropped.