Trading

Execute quote

POST
/execution/fill

Authorization

appIdbearerAuth
headerx-app-id<token>

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

headerAuthorizationBearer <JWT>

JWT access token from POST /auth/verify. Required with x-app-id on user routes. On the smart-route quote it is optional and turns a preview into an executable quote.

Request Body

application/json
  1. body
quoteId*string

quoteId from GET /orderbook/{venueMarketOutcomeId}/route.

externalId?string

Idempotency key. Your own id for this trade, unique within your app. Saved on every order the quote splits into, so GET /execution/orders?externalId= returns all legs, and carried on each trades.filled webhook. Reusing it on a different quote is rejected with 409, unless the earlier fill was rejected before its orders were queued. Live mode only.

Length1 <= length <= 128
mode?string

live (default) or paper to fill against the user's paper account.

Value in"live""paper"
fallbackToLatest?

Used only when quoteId has expired: the server fills against the user's latest quote with this same intent instead of returning 400. A different spend, mode or venue scope is a different intent and does not match.

signingAddress?string

Self-custody: the wallet that signs this fill. Must already be linked to the account. Omit for managed custody (the default).

Length42 <= length <= 42
fundingAddresses?array<>

Self-custody: other linked wallets this fill may spend from (signingAddress is always included). Order does not matter: per token, the wallet with the largest balance is used first. Omit to fund from the signing wallet only. Entries are EVM or Solana; a Solana entry only funds (the signer stays EVM) and is asked for one solana_transaction signature per bridge.

approveMode?string

Self-custody, cross-chain fills only: how the token approval a bridge needs is made. sponsored (default): the wallet does not send the approve itself; it signs a one-time EIP-7702 authorization per chain, over a raw digest (not EIP-191 or EIP-712), which many wallets cannot produce. user_broadcast: the user sends the approve transaction from their wallet and pays its gas, on every bridge. Pick based on what the wallet software supports. Neither mode makes bridging free: quote with deepEstimate and read feeBreakdown.bridgeFees and feeBreakdown.setupCosts.

Value in"sponsored""user_broadcast"

Response Body

200

application/json
  1. response
alreadyAccepted?boolean

true when this quote was already accepted; the call had no new effect.

quoteId*string

The quote being filled. Poll GET /execution/status with it.

orderIds*array<string>

Orders created for the fill, including tracking orders for shares redeemed instead of sold.

status*"pending"

Always pending: accepted, not yet executed. Poll GET /execution/status.

Value in"pending"
redeemId?string

Present when a sell quote includes resolved shares that are redeemed rather than sold.

message?string

Readable note about redemption, when relevant.

pendingSignatures?array<>

Self-custody only: requests the user's wallet must sign before execution continues. Absent for managed custody. Answer them on POST /execution/fill/{quoteId}/signatures.

Example Request
curl -X POST 'https://api.t.sufwankhalid.com/execution/fill' \  -H 'Content-Type: application/json' \  -d '{  "quoteId": "k2r8v5n1x7c4m9t3b6q0w2za"}'
Example Response
{  "quoteId": "k2r8v5n1x7c4m9t3b6q0w2za",  "orderIds": [    "cmf3r1a2b00c4mw0lq8y7e3uj",    "cmf3r1a3c00c5mw0lt2k9w6nd"  ],  "status": "pending"}