Skip to main content
Every trading call is user-tier: send x-app-id and the user’s Authorization: Bearer token. Every call returns before the trade finishes. Track it to a final state with Order lifecycle & statuses. Choose your integration compares when to use each.

Fill a quote

Get an executable quote with the user’s token (Quotes & smart routing), check status is ok, then fill it.
status is always pending: the trade is accepted, not done. orderIds has one order per venue leg. Poll GET /execution/status?quoteId= until terminal is true. Optional body fields: API reference: Execute quote.

Place a direct order

POST /execution/orders places a market order on one venue you name. It never splits, and AGG prices and funds it server-side. externalId is required and makes retries safe.
The response has orderId, externalId, status: "pending", and a quoteId you can poll. On a buy, maxSpend is the all-in ceiling including your app fee. slipCapBps defaults to 500 (5%); set it explicitly on sells. Live only: there is no paper mode. Details, including skipQuote for server integrations: Direct order execution.

Place a limit order

POST /execution/limit-orders rests an order at your price on one venue. Prices and sizes are 6-decimal integer strings: limitPriceRaw: "450000" is $0.45, sizeRaw: "20000000" is 20 shares.
timeInForce is one of GTC, GTD (with expiresAt), FOK, FAK, IOC, or ALO. Venues support different subsets. A managed buy reserves cash (reservedCostRaw); a sell reserves shares. The order starts pending, then becomes open when it rests on the venue. open is not final. Details: Limit orders.

Cancel an order

The response is { quoteId, orderIds, status }. status can be cancel_pending while the venue confirms. Keep polling the order. A filled or already cancelled order returns 409. Self-custody orders need a fresh cancelSignature from the signing wallet. SDK: client.cancelManagedOrder.

Self-custody

In self-custody the user’s own wallet funds the trade and signs it. You still quote and fill, but add signingAddress, then answer the signature requests that appear on the status endpoint. See Self-custody trading.

Redeem winnings

When a market resolves, POST /execution/redeem claims the user’s payout and credits USDC. Some venues settle on their own and need no redeem call, and a split or voided market pays less than $1 a share. See Market resolution & voids. See Redeem winnings.

Checks at fill time

AGG checks these again when you fill, so a quote that looked fine can still be refused:
  • The user’s location against each venue in the route. A blocked venue returns 403.
  • Your app’s venue and category settings. Returns 400 quote_app_blocked.
  • The market is still open. Returns 400 quote_market_inactive.
  • The user’s balance still covers the trade. Returns 400 quote_insufficient_balance.
  • Testing-mode trade cap. Returns 403.
Codes and retry rules: Errors, retries & idempotency.