How PolySimulator matches Polymarket
PolySimulator uses Polymarket market data to simulate orders in a paper account. It never sends your orders to Polymarket. Simulated fills are measured against the venue, with differences in timing, available liquidity and accounting. API compatibility alone does not establish execution fidelity.Draft, checked 2026-11-13. This page distinguishes implemented behavior
from deployment settings and planned work. Public docs publish from
staging,
while production can run an older revision. The optional taker hold described
below arrives with the 24.11 release and is not live before then.Data source and freshness
Market identity and metadata come from Polymarket’s Gamma feed. Prices and order books use its CLOB WebSocket and REST feeds. The implementation includes a Rust ingestion service for selected market scopes, alongside Python ingestion. Having that service in the source does not prove that it owns every market’s live feed. The Rust implementation can reconstruct books from WebSocket snapshots and deltas and compare them with REST book snapshots. REST verification can retain an equivalent streamed book or trigger repair when depth diverges. Reconnects and repeated observations must not be mistaken for new venue activity. Three different clocks matter:
Internal pipeline stages include socket receipt, frame queuing, book
reconstruction, REST verification, cache publication and API/feed delivery.
Their timings require internal instrumentation. A fast cache lookup measures
one stage; it is not a venue-to-client delay measurement. This draft publishes
no internal pipeline latency percentile.
A small public measurement, with its limits
On staging, 12 anonymousGET /v1/price?token_id=…&side=BUY requests from one
sandbox client during 2026-11-13 23:15:57–23:16:05 UTC returned:
This is a small observation, not an SLA or a venue event propagation benchmark.
The client’s geographic location was not established. Each request opened a
new connection; requests were separated by a 500 ms pause. Percentiles use
nearest rank. The token was
20006732765674855733524007935991362439352594042415161039767275461950712817548.
Results will change with time, location and market activity.
To repeat the method, set POLYSIM_BASE_URL to the host you want to measure
and TOKEN_ID to a currently available outcome token. The example performs
public reads only:
How an order becomes eligible to fill
Immediate orders: native market orders default to FAK/IOC. They fill the available quantity within the price constraint and cancel the remainder. FOK requests require the full quantity or fail. Price resolution and depth requirements depend on the execution path and active safety settings; legacy market-price paths can use fallback quotes when a usable book is unavailable. Readprice_source, fee and filled quantity rather than assuming a book walk.
Fill on placement: a marketable GTC/GTD limit can fill in its placement
request when that feature is enabled and the book, deadline and venue checks
pass. It shares fill primitives with the background matcher. A skipped
placement fill can leave an order pending for a later cycle.
Resting orders: the background matcher repeatedly checks pending orders.
A BUY needs an executable ask at or below its limit; a SELL needs an executable
bid at or above it. A last-trade price touching the limit is not sufficient.
Depth, freshness and market lifecycle checks can prevent a fill. The code’s
default sleep between cycles is 1 second, an internal configuration default;
cycle work and runtime overrides determine the observed interval.
Event-driven resting-order matching is planned. The audited implementation
uses the cycle above; it does not promise a fill after each incoming venue event.
There is no model of your place behind real venue orders at a price level.
For depth walks, BUY consumes asks from lowest upward and SELL consumes bids
from highest downward. Binary-market pricing can also use complementary depth
at 1 − price. Simulated consumed depth can be withheld across orders for a
bounded refresh/window period. This does not change Polymarket’s real book or
simulate how other traders react to your order.
Taker delay (from the 24.11 release)
Not live yet. The taker delay ships with the PolySimulator 2.0 release on
24 November 2026. Until that release, taker orders on PolySimulator are not
held before matching. This section describes the behaviour that release adds.
itode boolean to decide which
markets need the hold. Positive and negative results are cached. If lookup
cannot establish a result, the implementation falls back to recognizing fast
5-minute and 15-minute crypto Up/Down markets; it does not delay every market.
The hold applies to eligible taker requests, including marketable limits, before
pricing and balance reservation. Resting makers are not deliberately delayed.
The code checks the remaining request budget and can refuse with 503 SERVER_BUSY
rather than shorten the hold. The hold does not make an order response use
Polymarket’s delayed status.
If you measure order-to-fill time, measure it separately from the configured
hold, which is only one part of that time.
Fees
Each market’s fee follows its GammafeesEnabled flag and feeSchedule
(shares × rate × [price × (1 − price)]^exponent), with five-decimal fee
calculation and cent-precision balance settlement. Category rates apply only
as a fallback when that metadata is unavailable. Maker fills
pay zero; a recorded marketable-at-placement verdict receives taker treatment.
An unknown verdict can use a legacy age-based classification fallback.
The fallback category rates are measured against Polymarket’s
published fee table, not assumed
equivalent; they can diverge when the venue changes its table. The rates,
unknown-category fallback and the formula are listed on
Trading Fees. The simulator does not pay maker rebates
(/v1/fee-rate reports the market’s rebate_rate). A marketable GTC/GTD
remainder retains taker treatment on later fills.
Use the actual fee on each fill to reconcile simulated P&L.
Order types and API compatibility
With the default order semantics enabled, GTD expires and post-only GTC/GTD
rejects if marketable. Deployments using legacy semantics differ; consult
Placing Orders and the
raw HTTP guide. API keys, response status enums and
SDK support also differ by surface. None of these endpoints sends a signed
order to the venue or settles on-chain.
Differences to include in strategy evaluation
For the versioned list of models, defaults, measured delays and planned
changes, see the Execution contract.
Use Honest Limits for operational boundaries and
Simulation API for historical fill models. Validate performance
against observed venue data before interpreting simulated execution as evidence
about a strategy on Polymarket.