CreateVendorOrder embeds the public polymarket.v1.InsertOrderRequest. The supported order shape for partner entry is intentionally narrow: limit orders with fill-or-kill (FOK) time in force and either a share quantity or a cash quantity such as “spend $20.”
The service validates populated fields against a fail-closed allowlist. Any field marked Rejected if set below causes INVALID_ARGUMENT, with the offending field named in the error. This prevents newly added public-order features from becoming available to partner callers unintentionally.
Supported fields
In proto3, scalar fields at their default value are not populated on the wire. “Rejected if set” means do not send a non-default value for that field. Construct the supported request directly rather than reusing a broad public-order object.
Outcomes and prices
There is one order book per market, expressed in instrument (YES) terms.price is always the YES price; there is no separate NO book or NO price field. Express a NO position with the complementary YES order:
q contracts; do not convert it to a dollar amount. For example, buying 10 NO at $0.20 requires SIDE_SELL, order_qty = 1000, and price = 80 when both scales are 100. A fill changes the YES-terms position by -10 contracts. Economically, buying the 10 NO contracts costs $2.00, and the cost is reflected in the account’s buying power. Commission is additional—$0.08 in this example.
Share and cash quantities
Set exactly one oforder_qty or cash_order_qty. The service rejects requests that set both or neither.
order_qtyspecifies a number of contracts and is unchanged when translating between YES and NO.- On
SIDE_BUY,cash_order_qtyis the principal to spend on YES, and fill quantity is principal divided by actual execution price. A $20.00 principal fills 25 contracts at the $0.80 limit or 62.5 contracts with price improvement to $0.32. The limit bounds the worst-case price; commission is additional to the principal. - On
SIDE_SELL,cash_order_qtyis the complementary NO collateral to spend, not a target for sale proceeds. At a YES limit price of $0.80, $20.00 is divided by the $0.20 complement and buys 100 NO contracts. “Spend $20 on NO at up to $0.20” therefore usesSIDE_SELL,cash_order_qty = 2000, andprice = 80whenpriceScale = 100.
ORDER_TYPE_LIMIT. Exchange commission is charged in addition to the principal represented by cash_order_qty.
Fixed-point values
price, order_qty, and cash_order_qty are integers on the public exchange message. Convert user-facing decimals with the scales published for the instrument — the priceScale and fractionalQtyScale fields returned by the Reference Data API:
100, a $0.45 YES limit price is price = 45, 100 contracts is order_qty = 10000, and $20.00 of principal is cash_order_qty = 2000. Divide by the same scales to convert wire integers back to decimals. Always use each instrument’s published values; do not hard-code them.
Fees on execution reports
Execution reports — on the Drop Copy stream and fromSearchExecutions / SearchOrders — carry the exchange fee in the same fixed-point convention as every other wire value. The commission fields are notional units, scaled by both the price scale and the quantity scale:
price_scale × fractional_quantity_scale notional units. When both scales are 100, commission_notional_collected = 100 means $0.01 — not $1.00.
The relevant fields:
The dollar amount always reconciles with the fee schedule formula
Fee = Θ × C × p × (1 − p) — where C is contracts (not raw order_qty units) and p is the decimal price — rounded to $0.01.
Worked example — quantity scale 100
A taker buysorder_qty = 312 at price = 97 on an instrument with priceScale = 100 and fractionalQtyScale = 100. The fill execution report (captured from Drop Copy; identifiers anonymized):
3.0364 = 3.12 × $0.97 principal ($3.0264) plus the $0.01 commission.
Worked example — quantity scale 1
A taker buysorder_qty = 100 at price = 97 on an instrument with priceScale = 100 and fractionalQtyScale = 1, so order_qty is the contract count. The fill carries commissionNotionalCollected = "17" with "fractionalQuantityScale": "1":
1 instruments. The ledger debit is 97.17 = $97.00 principal + $0.17 commission.
Maker rebates and zero-fee fills
The same decoding applies to the maker side, where the fee coefficient is negative. The resting sell in the scale-1 example above received commissionNotionalCollected = "-4" → −$0.04, matching −0.0125 × 100 × 0.97 × 0.03 = −$0.036 rounded to the cent.
Because fees round to $0.01, small fills legitimately produce zero fee: the maker rebate in the scale-100 example rounds −$0.0011 to $0.00, and the field is simply absent from the JSON (proto3 omits default values). Treat a missing commission field as 0, not as missing data.
Customer identity
order.account is the only customer identifier accepted by CreateVendorOrder. Persist the DCM account delivered when KYC is approved and use it consistently for:
order.accounton partner order placementparticipant_account_idon transfers- the account field on Drop Copy and reconciliation records
order.user or order.session_id. The service authenticates your firm, verifies that order.account belongs to an enabled participant relationship, and derives the submitting participant.
MoneyAmount
MoneyAmount is used for the top-level vendor_fee; it is not used for the fixed-point fields in the embedded public order.
Next step
CreateVendorOrder
See complete YES, NO, cash-BUY, and cash-SELL order examples.