How do I trace a prediction market order back to its evidence and forecast?
Trace an order with one decision ID created before submission. Store the forecast, evidence snapshot, market identity, raw pre-trade book, order parameters, fee assumption and venue order/fill IDs, then append resolution and settlement. Preserve venue and contract scope: a Kalshi implied ask or a Polymarket resolution rule cannot be copied to another venue.
1. Build the chain before the order leaves the router
Create one immutable decision_id before submission and point every downstream record to it. Store the forecast probability and model version, evidence IDs with retrieval time and hash, market identity, order parameters, risk approval and venue order/fill IDs. For batch submissions, keep the parent request ID and each child order ID. Polymarket's authenticated user channel carries order and trade updates for an account, so record those events against the same decision_id.
Reconstructing the chain from P&L hides the forecast, evidence and book state that justified the order. Store raw request and response payloads, not only normalized prices. Record retrieval and event timestamps; if your own pipeline caches a quote, label the cache age and do not present it as venue-real-time. Append corrections rather than overwriting the original record.
Sources: [1]
2. Capture venue-specific market and book evidence
For Kalshi event contracts, save the raw orderbook response. The orderbook_fp object contains yes_dollars and no_dollars bid arrays; the API returns bids only, not asks. Arrays are sorted ascending, so the best bid is the last element. The best YES ask is $1.00 minus the highest NO bid, so store that derivation with the source snapshot. A REST orderbook read is point-in-time; use the orderbook WebSocket for changes and mark which source produced each record.
For Polymarket, keep Gamma market metadata separate from CLOB order-book and order data, and store the outcome/token identity with the question. The cited Polymarket resolution page says rules specify resolution source, end date and edge cases; UMA serves prediction markets and Chainlink TWAP serves up-down markets. Do not apply that page to Polymarket US without US contract terms; that venue distinction is an explicit assumption below.
3. Worked audit example and replay test
Hypothetical: at 10:00:00Z a Kalshi YES order is considered. The raw snapshot has best YES bid $0.42 and best NO bid $0.56; implied YES ask is $0.44 and spread $0.02. Forecast v3 is 0.47, evidence hash E-17, decision D-001. Buy 17 YES at limit $0.44, because only 17 contracts rest at the best NO bid that implies that ask. Expected gross edge is (0.47 − 0.44) × 17 = $0.51 before fees. Store the fee/rebate assumption separately; the edge is not net.
Replay the order from the frozen record: recompute the implied ask from raw bids, rerun forecast v3 on evidence E-17, and compare submitted limit and size with approved parameters. A replay that needs a live endpoint is not an audit. If the evidence page changed, use the stored copy and hash. If the book source was a cached internal read, mark it non-executable and re-fetch before sizing.
Sources: [2]
4. Resolution, exceptions and failure cases
Append resolution evidence after the fill. For the Polymarket documentation cited here, record whether the market is UMA-resolved or Chainlink TWAP-resolved and any 'Additional context' clarification published onchain. Do not apply those fields to Polymarket US; use its US rulebook. A fully paid position locks its purchase cost until sale or resolution; uncertain payout is unresolved outcome exposure, not unlocked capital.
Failure cases include missing venue order ID, mismatched fill quantity, duplicate submission after timeout, changed resolution clarification and fee-tier drift. For Polymarket US, store the fee schedule version and coefficient: its CFTC filing listed eight taker tiers while its public fee page listed four, and reporting said it was unclear which schedule was in effect. Mark each exception with owner and timestamp. Do not overwrite the original forecast; append corrections. If a clarification changes resolution, link it to the original market and order and retain the pre-clarification assessment.
| Layer | Identifier / field | Purpose |
|---|---|---|
| Decision | decision_id D-001; forecast v3 = 0.47; approver | Ties the order to the pre-trade forecast and approval |
| Evidence | evidence_id E-17; URL; retrieved_at; SHA-256; excerpt | Freezes what the forecast saw at decision time |
| Market/book | venue; market/ticker/token; raw book hash; source=REST/WS; ts | Reconstructs implied ask, spread and executable depth |
| Execution | venue order ID; fill IDs; batch parent ID; fee coefficient/schedule version | Reconciles fills, costs and duplicate-submission checks |
| Resolution | source type; rule version; outcome; settlement ID | Closes the chain from order to payout |
Assumptions and scope
- Raw payload persistence and hashing are assumed available; no specific database or vendor is assumed.
- The worked example is hypothetical, uses Kalshi event-contract order-book conventions, and is not a trading result; 17 contracts is the resting size at the cited best implied ask.
- Kalshi event-contract fields and the cited Polymarket International resolution fields are not reused for Polymarket US; confirm US rulebook and fee schedule separately.
- The cited Polymarket resolution page is not treated as a Polymarket US rulebook.
Sources and verification
- Polymarket API surfaces
Source checked Nov 16, 2026. - Kalshi order book conventions
Source checked Nov 16, 2026. - Polymarket resolution mechanisms
Source checked Nov 16, 2026. - Polymarket US Taker Fee Tiers Differ in CFTC Filing, Fee Page
Source checked Nov 16, 2026.
Prepared by Skybit Research with AI assistance and automated source checks. Examples and assumptions are identified in the article. No human reviewer is implied. Check the exact contract and current venue documentation before applying a method.