Skip to main content
A prediction-fill message is sent when one of your orders executes. It is delivered inside a prediction-market-update envelope on your private stream.

Access

Requires an API key with the read scope. Send an authenticate frame; there is no separate subscribe for the private stream.

Fields

orderId is a string, and must stay one. It is a 63-bit hash from the matching engine that exceeds Number.MAX_SAFE_INTEGER. Parsing it as a number silently corrupts it — JSON.parse in JavaScript will round it, and the id you send back will not match the one you received.Compare and store it as a string.

price vs fillPrice

price is the canonical price of the match, always expressed from the YES perspective — it is the same value both counterparties see. fillPrice is that same match from your side. If you hold NO, your economics are the complement of the canonical price, and fillPrice reflects that. Use fillPrice for your own cost basis and P&L; use price when correlating against the public tape, which reports the canonical price.

Example

Notes

  • One message per execution. An order that crosses several resting orders produces several fills, each with the same orderId and a different tradeId. Sum qty across them for the total, or read filledQty from the matching order update.
  • Fills and order updates arrive independently. Do not assume an ordering between a prediction-fill and the prediction-order that reflects it.
  • This replaces polling GET /v1/portfolio/fills. Authenticate and buffer live events before loading REST history, then reconcile and deduplicate by tradeId. See Replacing REST polling.