Slippage Protection
PolySimulator uses the same slippage protection model as Polymarket: theprice field on every market order acts as a worst-price limit.
There is no separate slippage parameter — the price is your slippage protection.
How It Works
On Polymarket, all orders are limit orders. A “market order” is simply a limit order at a marketable price with FOK (Fill-or-Kill) time-in-force. PolySimulator mirrors this exactly. Theprice field is required on market orders and sets the worst price
you’ll accept:
- BUY: fills at the best ask, but never above your
price - SELL: fills at the best bid, but never below your
price
BUY Example
SELL Example
Polymarket migration: This is identical to how Polymarket’s
price
field works. Your existing slippage logic transfers directly to
PolySimulator — and vice versa when you migrate to live trading.Price Is Required
Market orders must include aprice field. Submitting a market order
without price returns a 400 PRICE_REQUIRED error:
Time in Force
Market orders default to FOK (Fill-or-Kill), matching Polymarket. You can also use FAK (Fill-and-Kill), Polymarket’s term for IOC.Execution Model
Market orders fill at the best available price — BUY at the best ask, SELL at the best bid — matching Polymarket’s execution model. The fill-price resolution cascade (each tier falls through to the next on a miss or a failed sanity guard):- Order-book walk (VWAP) across live CLOB levels — most realistic
- Best bid/ask from the CLOB order book (cross the spread)
- CLOB midpoint — sub-ms cache fast-path, then the cached read-through
- Live CLOB midpoint — synchronous fetch (cold-market guard)
- Cached display price — last-resort fallback
price_source labels each tier emits.
Fill Diagnostics
Every market order response includes transparency metadata:slippage_bps field is informational only — it shows how far the
fill price deviated from the cached mid-price, in basis points. It does not
affect order execution. Your price (worst-price limit) is the only
protection mechanism.
Price Sources
price_source is an opaque diagnostic label — log it for post-trade
analysis, but treat it as a non-stable enum (the label set evolves with
engine changes). Some labels carry a transport prefix (e.g. ws:) when the
underlying snapshot arrived over a streaming source rather than a poll —
strip the prefix or substring-match. The labels the engine actually emits
today, from highest to lowest confidence:
Recommendations by Strategy
Comparison: PolySimulator vs Polymarket
Fees
PolySimulator charges the same per-category taker fee schedule as Polymarket V2 — fees are not zero, takers pay and makers pay zero, and the charged amount is returned inOrderResponse.fee. A bot computing PnL
on the assumption of zero fees will be wrong on most markets.
See Trading Fees for the canonical formula, the full
per-category rate table, the maker/taker (marketability) classification, and
the documented divergences from Polymarket.
Next Steps
- Placing Orders — Full order API reference
- Order Book — Inspect liquidity before trading