Skip to main content
The stream endpoint delivers every matched Polymarket transaction the moment it occurs via Server-Sent Events (SSE). Each event contains the full transaction: market context, the taker order that triggered the fill, and all matching maker orders. Endpoint: GET /v1/stream/orders
Keep a long-lived SSE connection open for high-frequency use cases. Repeatedly opening and closing connections (polling) will miss events that arrive between requests and adds unnecessary latency.

Filter parameters

Apply filters to receive only the events relevant to your strategy. Omit a parameter to receive all values for that dimension.
ParameterTypeDescription
tradersstringComma-separated wallet addresses. Only events where the taker or a maker matches will be delivered.
tagsstringComma-separated market tags (e.g. crypto,sports).
seriesstringComma-separated series slugs (e.g. nba-2026,btc-up-or-down-5m).
min_usdc / max_usdcfloatFilter by USDC value of the taker order.
min_shares / max_sharesfloatFilter by share quantity of the taker order.
min_price / max_pricefloatFilter by execution price (0–100).
formatstringSet to json for structured JSON objects. Omit for the default compact array format.

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.
[
  "0xe1c7fd21906a0a4b664d9e71d883463d8e9cc0a9c644a9454d55617e0f627ab3",
  "2026-04-06 03:36:29Z",
  [
    1791549,
    "Rockets vs. Warriors",
    "nba-hou-gsw-2026-04-05",
    "2026-03-30 14:03:07Z",
    "2026-04-06 02:00:00Z",
    "https://polymarket-upload.s3.us-east-2.amazonaws.com/super+cool+basketball+in+red+and+blue+wow.png",
    false,
    "nba-hou-gsw-2026-04-05",
    "nba-2026",
    ["sports", "basketball", "nba", "games"],
    "Rockets",
    "Warriors",
    "",
    "Rockets vs. Warriors",
    "https://polymarket-upload.s3.us-east-2.amazonaws.com/super+cool+basketball+in+red+and+blue+wow.png"
  ],
  ["SELL", ["0x96dd86f5cd9eb638defd1402ee5d2f9268f817fe", "bwho", "", "...", "2026-03-14 05:29:19Z"], "Warriors", "6947...1458", "1362902000", "6408800000", "32191970", "1000"],
  [
    ["BUY", ["0x68146921df11eab44296dc4e58025ca84741a9e7", "LynxTitan", "", "", "2025-12-12 05:09:42Z"], "Warriors", "6947...1458", "110000000", "500000000", "0", "1000"]
  ]
]
The array positions map as follows:
IndexField
[0]Transaction hash
[1]Timestamp
[2]Market array (id, question, slug, start_date, end_date, icon, neg_risk, event_slug, series_slug, tags, outcome_1, outcome_2, group_item_title, event_title, event_icon)
[3]Taker order array (side, trader array, outcome, token_id, usdc, shares, fee, fee_rate_bps)
[4]Array of maker order arrays (same structure as taker)
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:
function parseCompactTrader(arr) {
  if (!arr || arr.length === 0) return null;
  return {
    address: arr[0],
    name: arr[1] || "",
    x_username: arr[2] || "",
    profile_image: arr[3] || "",
    profile_created_at: arr[4] || ""
  };
}

function parseCompactOrder(arr) {
  if (!arr || arr.length === 0) return null;
  return {
    side: arr[0],
    trader: parseCompactTrader(arr[1]),
    outcome: arr[2],
    tokenId: arr[3],
    usdc: arr[4],
    shares: arr[5],
    fee: arr[6],
    feeRateBps: arr[7]
  };
}

function parseCompactMarket(arr) {
  if (!arr || arr.length === 0) return null;
  return {
    id: arr[0],
    question: arr[1] || "",
    slug: arr[2] || "",
    start_date: arr[3] || "",
    end_date: arr[4] || "",
    icon: arr[5] || "",
    neg_risk: arr[6] || false,
    event_slug: arr[7] || "",
    series_slug: arr[8] || "",
    tags: arr[9] || [],
    outcome_1: arr[10] || "",
    outcome_2: arr[11] || "",
    group_item_title: arr[12] || "",
    event_title: arr[13] || "",
    event_icon: arr[14] || ""
  };
}

function parseCompactTx(arr) {
  if (!arr || arr.length !== 5) return null;

  const makers = [];
  if (Array.isArray(arr[4])) {
    for (const makerArr of arr[4]) {
      makers.push(parseCompactOrder(makerArr));
    }
  }

  return {
    txHash: arr[0],
    timestamp: arr[1],
    market: parseCompactMarket(arr[2]),
    takerOrder: parseCompactOrder(arr[3]),
    makerOrders: makers
  };
}

export default parseCompactTx;
After parsing, the result object has this shape regardless of which format you used:
{
  "txHash": "0xe1c7fd...",
  "timestamp": "2026-04-06 03:36:29Z",
  "market": { "id": 1791549, "question": "Rockets vs. Warriors", "tags": ["sports", "basketball"] },
  "takerOrder": { "side": "SELL", "trader": { "address": "0x96dd...", "name": "bwho" }, "outcome": "Warriors", "usdc": "1362902000", "shares": "6408800000" },
  "makerOrders": [{ "side": "BUY", "trader": { "address": "0x68146921...", "name": "LynxTitan" }, "outcome": "Warriors" }]
}

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.
import PolyEdgeClient from './polyedge.js';

const client = new PolyEdgeClient('YOUR_API_KEY');
2

Open the stream

Call streamOrders() / stream_orders() with your filters. The Node.js SDK uses eventsource-client which auto-reconnects on dropped connections.
// Stream all crypto orders above $100 USDC
for await (const order of client.streamOrders({ tags: 'crypto', min_usdc: 100 })) {
  const taker = order.takerOrder;
  console.log(`${taker.side} ${taker.outcome} — $${Number(taker.usdc) / 1e6} USDC`);
}
3

Process each event

Each yielded order object is already parsed by the SDK. Access order.market, order.takerOrder, and order.makerOrders directly.
for await (const order of client.streamOrders({ tags: 'sports', min_usdc: 500 })) {
  const { market, takerOrder, makerOrders } = order;

  console.log(`[${order.timestamp}] ${market.question}`);
  console.log(`  Taker: ${takerOrder.trader?.name} ${takerOrder.side} ${takerOrder.outcome}`);
  console.log(`  USDC: $${Number(takerOrder.usdc) / 1e6} | Shares: ${Number(takerOrder.shares) / 1e6}`);
  console.log(`  Filled by ${makerOrders.length} maker order(s)`);
}
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
import time

while True:
    try:
        for order in client.stream_orders({'tags': 'crypto'}):
            process(order)
    except Exception as e:
        print(f"Stream disconnected: {e}. Reconnecting in 2s...")
        time.sleep(2)
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.