Skip to main content
BETA — SUBJECT TO CHANGE. This API is in beta and may change without notice.
CreateVendorOrder is the partner order-entry call: it validates the supported structure of an embedded public polymarket.v1.InsertOrderRequest, records your declared vendor fee against the order, passes the order through to EP3, and waits for the exchange’s durable outcome before returning. No money moves in this call — the order trades against cash already in the participant’s account, and the vendor fee accrues for later collection. EP3 is authoritative for order economics and buying-power validation; CreateVendorOrder does not calculate or return order economics.

Service definition

  • Service: polymarket.us.orderfunding.v1.OrderFundingService
  • RPC: CreateVendorOrder
  • Type: Unary (request/response)

Request

CreateVendorOrderRequest

The participant is identified only by order.account. Use the DCM trading account returned by the KYC approval webhook—the same account identifier used to match the participant’s Drop Copy activity. There is no separate customer-account field in this request. Do not set order.user or order.session_id; both are rejected.
The embedded public message is wider than the partner launch surface. The service uses a fail-closed allowlist: if you populate an unsupported field, the request is rejected with INVALID_ARGUMENT and an error that names the offending field. Do not copy a generic InsertOrderRequest wholesale; construct one of the supported shapes below.

Response

CreateVendorOrderResponse

FundingCorrelation

VendorOrderStatus

ACCEPTED means durable acceptance, not an execution state. The service does not report acceptance based on submission alone, but an accepted order may have rested, matched immediately, or been cancelled under FOK. Track fills and other execution outcomes on Drop Copy. An order the exchange rejects asynchronously after submission is returned as REJECTED, not as a phantom accepted order.

Funding request lifecycle

Every successful CreateVendorOrder call returns a durable funding_request_id and the workflow’s current status. PENDING is a valid durable response, not a gRPC error: submission may have happened, but the service has not yet established the final EP3 outcome. When a response is PENDING, re-check it by calling CreateVendorOrder again with the identical request, including the same idempotency_key and order.clord_id. The service resumes the existing workflow and returns the same funding_request_id with its current status. Continue bounded re-checks until the status is terminal:
  • VENDOR_ORDER_STATUS_ACCEPTED — terminal accepted outcome.
  • VENDOR_ORDER_STATUS_REJECTED — terminal rejected outcome.
Do not rotate the idempotency key while a funding request is pending. A new key identifies a new placement workflow and can create a duplicate order. If you reuse the original key with any caller-controlled field changed, the service returns gRPC ALREADY_EXISTS instead of modifying the existing workflow. Persist the funding_request_id, idempotency_key, and clord_id together. The funding request ID identifies the workflow even before an exchange order ID exists and is the primary identifier to quote in support requests.

Supported order examples

These examples deliberately populate only the launch fields. They assume the instrument uses price_scale = 2 and fractional_quantity_scale = 2; use each instrument’s published scales when converting decimal prices and quantities to integers.

Consumer FOK share limit order

This order buys 100 shares at a limit price of $0.45 and must fill immediately in full or cancel.

Consumer cash order: spend $20

Set cash_order_qty instead of order_qty when the participant specifies a dollar amount. This order spends up to 20atthesame20 at the same 0.45 limit.

Buying power and previews

EP3 validates buying power when the order is placed and rejects an order unless the participant account’s available cash covers its worst-case collateral plus the exchange fee. This authoritative placement check does not reserve accrued vendor fees. Before submission, you may provide client-side guidance by gating against:
For a buy share limit order, client-side worst-case collateral is the share quantity multiplied by the limit price. For a cash order, cash_order_qty is the participant’s requested maximum spend. Add the maximum exchange fee from the fee schedule when estimating required cash. CreateVendorOrder does not calculate these amounts. You may calculate them in your client or separately call the public polymarket.v1.OrderEntryAPI/PreviewOrder with the participant’s order shape. The preview is optional and informational, not a locked quote; EP3 validates the order again at placement.

Idempotency and retries

The idempotency_key identifies one placement request for your authenticated firm, while order.clord_id is your standard FIX tag-11 client order ID and recovery key. Persist both before the first call. The service guarantees at most one order per idempotency key — retrying with the same key can never place a duplicate order or double-charge the declared vendor fee.
  • Retry transport failures and timeouts with the same complete request and the same idempotency_key and clord_id. If the original attempt completed, the service returns its recorded result; otherwise it resumes or resolves the workflow.
  • Retry PENDING the same way. The service re-checks the exchange outcome and returns the same funding request with its current status.
  • Match Drop Copy by account and clord_id. order.account is the DCM account on Drop Copy, and the exchange echoes order.clord_id as clOrdID.
  • Never change the request under an existing key. A different clord_id, account, order field, or vendor fee returns ALREADY_EXISTS.
  • Never rotate the key for a pending request. A new key creates a new workflow and can submit a duplicate order.
  • Never reuse a clord_id across live orders for the same participant. Use a fresh idempotency key and client order ID for each new order.

Cancelling an order

An order placed through this service is a standard exchange order. Cancel it through the standard order entry cancel. Cancellation does not alter the recorded vendor fee: the platform records exactly what you declared at placement. If your fee policy waives fees on cancelled or unfilled orders, apply that policy in your books and in the amount you collect.

Errors

An EP3 order-level rejection, such as insufficient buying power or a price outside market limits, is not a gRPC error. The call returns OK with status = VENDOR_ORDER_STATUS_REJECTED; FAILED_PRECONDITION is reserved for relationship-state problems. Quote the correlation identifiers when requesting the underlying rejection detail from support.