The trades channel (Documentation Index
Fetch the complete documentation index at: https://docs.predexon.com/llms.txt
Use this file to discover all available pages before exploring further.
"orders") streams real-time trade events from Polymarket. By default, you receive confirmed events - trades that have been mined on-chain. Covers both V1 and V2 Polymarket contracts.
Want even earlier signals? Pending trade events deliver trades 3–5 seconds before confirmation by decoding transactions from the Polygon mempool. Use
status: "all" to receive both.V1 vs V2: Every
order_filled event has a version field (1 or 2). V2 trades add builder and metadata fields (bytes32 hex, currently zero). fee_refund events are V1-only - V2 emits net fees directly on order_filled (no refund flow). See the V2 Migration Guide.Event Types
| Event | Description |
|---|---|
order_filled | An order was filled on-chain |
fee_refund | A maker fee rebate was processed |
order_filled
Field Reference
Maker vs Taker emissions
A singlematchOrders transaction emits multiple order_filled events - one per maker matched, plus one synthetic taker-aggregate emission summarizing the taker’s overall fill. The role field tells you which one you’re looking at:
role | Description | When to use |
|---|---|---|
"maker" | Per-maker fill. One row per maker order matched in the tx. taker is the real taker user address. | Default for almost all use cases - counting fills, attributing volume to maker wallets, copytrading specific makers. |
"taker" | Synthetic taker-aggregate. One row per matchOrders tx, summing across all makers. taker equals the exchange contract address. | Use when you want one row per taker action - e.g. dashboards keyed on the taker, or to avoid double-counting volume across the per-maker rows. |
Pending events set
role directly from the maker/taker builder; confirmed events derive it from the chain log (taker == exchange contract ⇒ "taker", else "maker"). Empirically the two agree 100%, so you can dedupe pending → confirmed by tx_hash + order_hash regardless of role.fee_refund
fee_refund events are emitted for V1 trades only. V2 has no refund flow - the net fee is emitted directly on order_filled at match time.Understanding Fee Refunds
Polymarket implements a maker fee rebate program. Here’s how it works:Rebate processes
A
fee_refund event for the same order_hash arrives 2–5ms later (same block, usually same tx). Rarely up to 50ms.If you don’t need exact fee accounting, you can ignore
fee_refund events. The fee field on order_filled is directionally correct for most purposes. Fee refunds are only necessary for precise PnL tracking or cost basis accounting.