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.
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.
[
  "0x39a4c634526de17a2f0e7e2834bcb0a044e909d7782887fcc24100a3a043a61f",
  "2026-06-18 03:18:20.068Z",
  [
    1694212,
    "Minnesota Lynx vs. Los Angeles Sparks: O/U 176.5",
    "wnba-min-la-2026-06-17-total-176pt5",
    "2026-06-17T04:31:05.891286Z",
    "2026-06-18T02:00:00Z",
    "https://polymarket-upload.s3.us-east-2.amazonaws.com/wnba-logo-PAR4befDAubM.png",
    false,
    "wnba-min-la-2026-06-17",
    "wnba",
    ["sports", "wnba", "games"],
    "Over",
    "Under",
    "O/U 176.5",
    "Minnesota Lynx vs. Los Angeles Sparks",
    "https://polymarket-upload.s3.us-east-2.amazonaws.com/wnba-logo-PAR4befDAubM.png"
  ],
  ["BUY", ["0x14e72e19ea2f6e2be41504dd3268184ebe5fa32c", "Negyedikaccount", "", "", "2026-05-26T20:17:22.279378Z"], "Under", "99169083723444391261088493561245365795535154938116614078681360075869499660270", "33000000", "50000000", "336600", "0"],
  [
    ["BUY", ["0xc29198ad764bd6adaf7bb971a3757a689ece5d74", "SnakeBall", "", "", "2026-02-14T23:54:51.615155Z"], "Over", "23731496537980602209118903433978041013300904286970617085197373043164590194158", "17000000", "50000000", "0", "0"]
  ]
]
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;
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:
{
  "txHash": "0x39a4c634526de17a2f0e7e2834bcb0a044e909d7782887fcc24100a3a043a61f",
  "timestamp": "2026-06-18 03:18:20.068Z",
  "market": {
    "id": 1694212,
    "question": "Minnesota Lynx vs. Los Angeles Sparks: O/U 176.5",
    "slug": "wnba-min-la-2026-06-17-total-176pt5",
    "start_date": "2026-06-17T04:31:05.891286Z",
    "end_date": "2026-06-18T02:00:00Z",
    "icon": "https://polymarket-upload.s3.us-east-2.amazonaws.com/wnba-logo-PAR4befDAubM.png",
    "neg_risk": false,
    "event_slug": "wnba-min-la-2026-06-17",
    "series_slug": "wnba",
    "tags": ["sports", "wnba", "games"],
    "outcome_1": "Over",
    "outcome_2": "Under",
    "group_item_title": "O/U 176.5",
    "event_title": "Minnesota Lynx vs. Los Angeles Sparks",
    "event_icon": "https://polymarket-upload.s3.us-east-2.amazonaws.com/wnba-logo-PAR4befDAubM.png"
  },
  "takerOrder": {
    "side": "BUY",
    "trader": {
      "address": "0x14e72e19ea2f6e2be41504dd3268184ebe5fa32c",
      "name": "Negyedikaccount",
      "x_username": "",
      "profile_image": "",
      "profile_created_at": "2026-05-26T20:17:22.279378Z"
    },
    "outcome": "Under",
    "tokenId": "99169083723444391261088493561245365795535154938116614078681360075869499660270",
    "usdc": "33000000",
    "shares": "50000000",
    "fee": "336600",
    "feeRateBps": "0"
  },
  "makerOrders": [
    {
      "side": "BUY",
      "trader": {
        "address": "0xc29198ad764bd6adaf7bb971a3757a689ece5d74",
        "name": "SnakeBall",
        "x_username": "",
        "profile_image": "",
        "profile_created_at": "2026-02-14T23:54:51.615155Z"
      },
      "outcome": "Over",
      "tokenId": "23731496537980602209118903433978041013300904286970617085197373043164590194158",
      "usdc": "17000000",
      "shares": "50000000",
      "fee": "0",
      "feeRateBps": "0"
    }
  ]
}

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.