tokenId. The order and read surface is in the
Polymarket reference, and
@parlayx/sdk and Python parlayx expose it through client.polymarket.
Sizing and pricing
A market BUY usesamount in dollars. amount caps the dollars spent and says
nothing about the price paid per share. maxFillPrice optionally sets the
highest price paid for each share.
A limit order uses size in outcome shares and price. A market SELL uses
amount in outcome shares.
maxFillPrice sets a BUY’s per-share ceiling and minFillPrice sets a SELL’s
per-share floor. Both take a price strictly between 0 and 1 and apply to FOK
and FAK. A SELL without minFillPrice is not unbounded: it uses a default
derived from the market’s midpoint.
A bound can leave an order unfilled. Under
FAK the order fills what it can
within the bound and cancels the rest; under FOK it does not fill at all.
A share-denominated size finer than 2 decimal places is rejected, and the error
names the size that does execute. That covers the shares on a SELL and the size
on a limit order of either side. A market BUY sized in dollars is unaffected.
Execution policy
A limit order can carry an expiry withtimeInForce: { "type": "GTD", "expiresAt": "..." }. Set expiresAt to an ISO
8601 timestamp at least 3 minutes and at most 30 days ahead. The timestamp you
send is passed through unchanged.
Reading orders and fills
A 201 means the order was accepted. On the response that placed the order,status
is the state Polymarket acknowledged, and three fields report the match it stated at
that moment. No later read answers this question: an order read reports the fills
accumulated since, so it cannot tell you what the placing call itself crossed.
Polymarket states each side of the trade, so
filledShares and filledAmountUsd
are its own figures passed through unchanged. averagePrice is derived from them
and rounded, so the three do not multiply back together:
Batch submit
POST /v1/polymarket/orders/batch takes { "orders": [...] }, each element an
order in the same shape as POST /v1/polymarket/orders, under one
Idempotency-Key header for the whole batch. Re-send the identical batch under
the same key to retry it. It answers with orders, one element per request entry
in request order: orders[i] is the answer for the order you sent at position
i. An order has no id of your own yet, so position is the only way to match an
entry to its input.
success: true: the entry was accepted, not confirmed at the venue, and a success is not a fill.orderIdandstatusare set,erroris null, and the fill fields report as on a single submit. For a new orderstatuscomes before the venue’s acknowledgement. A replayed entry reports the order’s current state, so it can readPENDING,OPENor a terminal status, and a pending success is still not venue confirmation or a fill.success: false:errorsays why, andstatusand the fill fields are null. Readerror.codebefore treating the entry as not placed:ORDER_RECONCILIATION_REQUIRED: the outcome is unknown and the order may be live, so this is not proof nothing was placed. Read it back by the entry’sorderId.INTERNAL_ERRORwith a nullorderId: the outcome is unknown, so this is not proof nothing was placed either. Re-send the identical batch under the sameIdempotency-Key.- Any other code: the entry was refused and not placed.
422 IDEMPOTENCY_CONFLICT.
To fix a refused entry, send only the corrected order as a new batch under a new
key: re-sending the whole batch under a new key places its accepted orders again.
Reading an order back
An expired order reportsstatus: "CANCELLED" with
cancellationReason: "EXPIRED" and error: null. An order you cancelled
yourself reports cancellationReason: null.
Two reads settle late. An expired order can still read OPEN for a few minutes
after it has left the venue’s book while final fills are confirmed, so that
status alone does not mean the order is still resting. And FILLED can appear
before the order read’s own filledShares and averagePrice and its fills list
are populated. Those are the order’s accumulated totals and are a different
question from the submit response’s match summary, which describes one call.