POST /v1/orders/preview takes the exact body of POST /v1/orders and answers what that request
would do. It reserves and places nothing, so a read key can call it.
When the trading account can’t trade on any venue that lists the market, for example because that venue is not available in your region, the preview answers with the same
403 error that POST /v1/orders and the quote return. When a venue has stopped trading the market, the preview answers 409 CONFLICT with details.reason: "MARKET_NOT_TRADABLE", and when a venue can’t be read, 503 UPSTREAM_ERROR, as the quote does. A Polymarket US market whose book Lean has not loaded yet also answers 503 UPSTREAM_ERROR with Retry-After; send the same preview again after that time.
Warnings
Preview several orders
POST /v1/orders/preview-batch takes up to 25 bodies of POST /v1/orders in orders and
previews them all at once, so the call takes about as long as the slowest preview. Like the single
preview it places nothing, needs only a read key, and counts once against the key’s rate limit.
results has one entry per body, in the order you sent them. preview is what
POST /v1/orders/preview answers for that body, shortened here; it has every field described
above. When the single preview would answer with an
error, preview is null and status and error carry that error’s HTTP status, code,
message and details, so one body that can’t be previewed does not fail the others. A body that
fails validation, or more than 25 bodies, refuses the whole call with 400.
Each body is previewed on its own. The limits and holdings checks of one body do not count the
others, so a set of orders that each pass can still go past a limit together.
A preview is a snapshot. Prices and balances can change before you place the order. The daily
limit is read but not held, so an order placed in between can still take the room a preview saw.