Skip to main content
BETA — SUBJECT TO CHANGE. This API is in beta and may change without notice.
CreateFundedOrder executes the full on-demand funding flow in one call: it validates the request, transfers the total prefund (collateral + exchange fee reserve + vendor fee) from your partner funding account into the participant’s account, submits the limit order, and waits for the exchange’s durable outcome before returning.

Service definition

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

Request

CreateFundedOrderRequest

Response

CreateFundedOrderResponse

FundedOrderStatus

ACCEPTED means durable acceptance. The service does not report an order as accepted based on submission alone — it waits for the exchange’s durable outcome. An order the exchange rejects asynchronously after submission is returned as REJECTED with the prefund reversed, not as a phantom accepted order.

Idempotency and retries

The idempotency_key identifies one funded-order request for your authenticated firm. The service guarantees at most one prefund transfer and at most one resting order per key:
  • Retry on transport failure or timeout (deadline exceeded, connection loss, UNAVAILABLE): call again with the same key. If the original attempt completed, you get its recorded terminal result; if it was interrupted, the service resumes or resolves it.
  • Retry on PENDING: call again with the same key. The service re-checks the exchange outcome and either returns the terminal result or safely resumes the flow.
  • Never reuse a key for a different order. Use a fresh key for each new funded-order request.

Compensating reversal

When the prefund transfer succeeds but no order durably reaches the book — validation failure at the exchange, rejection, or permanent submission failure — the service automatically reverses exactly the total prefund amount from the participant account back to your partner funding account. The reversal is linked to the original funding_request_id and prefund_transfer_id, and both legs are visible on the balance ledger. You do not need to trigger or manage reversals; a REJECTED response means the reversal path has been taken.
The automatic reversal covers pre-book failures only. An order that durably reaches the book and then ends with residual cash — including a FOK that is accepted and cancels with zero fill — is past the reversal boundary: the prefund stays in the participant account until you sweep it back. See Settlement Sweeps.

Cancelling a funded order

COMING SOON — CancelFundedOrder is planned and not currently available. Do not substitute the generic trading cancel (or FIX) for a funded order — generic order-entry paths do not perform the funding workflow’s bookkeeping. Until the cancellation RPC is released, rely on order tif (e.g. TIME_IN_FORCE_DAY, GOOD_TILL_TIME) to bound order lifetime, and contact institutional@polymarket.us if you need an order cancelled.

Example

Errors

An order-level rejection (for example, a price outside market limits) is not a gRPC error: the call returns OK with status = FUNDED_ORDER_STATUS_REJECTED, and the prefund is reversed. Quote the correlation identifiers when you need the underlying rejection detail from support.