Skip to main content
Start from Choose your integration. A limit order rests on one venue at a price you set. It does not smart-route. Statuses, including which ones are final, are on Order lifecycle. Authenticate with x-app-id and Authorization: Bearer. Buys need spendable managed cash. Sells need shares of that outcome. AGG reserves that amount while the order is open. limitPriceRaw and sizeRaw are 6-decimal integer strings. 530000 is a price of 0.53, scaled by 1e6. 1000000 is 1 share. The price must be greater than 0 and less than 1000000 (1000000 would be 1.00 and is rejected). GTD also requires a future expiresAt. clientOrderId is optional and unique per user. Reusing it returns 409. See Errors. Check the market before you send. A limit order is not priced against a quote. GET /venue-markets has tickSize for every venue and minOrderSize only where the venue publishes a floor. A null minOrderSize means AGG has no value for that market. It does not mean there is no minimum. Kalshi’s notional floor is one of those gaps. Prefer the live book tick from the orderbook, and fall back to tickSize when no book is loaded. A size or tick rejection is 400 and creates no order.

Place a managed limit order

Place limit order. The usual first status is pending: accepted, not yet on the book. AGG enforces the combinations below. This is not every value of the Venue enum. TipRun takes buy and sell. A GTD expiresAt must be 10 minutes to 30 days out. A GTC order rests for at most 22 days, then ends as venue-expired. TipRun nets opposite directions on one contract, so an order opposite to one of the user’s open TipRun orders on that contract (for example buy No while buy Yes rests) is refused with 400. Maker fills cost 0% and taker fills 1%. ProphetX and Novig accept that pair only in Direct API mode, and only on a buy. Both reject expiresAt. BetDEX uses hosted venue cash, not a signing wallet: GTC or IOC, no post-only, and no expiry. Odds are rounded conservatively and stake is rounded down. Unmatched GTC size is cancelled when the market goes in-play. A sell closes the same outcome and needs collateral as well as the shares. Execution can be unavailable. An unsupported venue, time in force, or post-only flag is rejected before the order reaches the venue. Self-custody placement is the same call with signingAddress set to a linked EOA, and only when that is enabled for your app. Polymarket allows GTC or GTD, buy or sell, at or above the market minimum, and the deposit wallet must already exist. The deposit wallet places the order. When enabled for your app, a legacy Polymarket Safe can move pUSD or shares into that deposit wallet first, which adds one Safe signature. A legacy proxy wallet is not supported. Hyperliquid allows GTC or ALO, buy or sell, whole contracts, and a 0.00001 price tick, with no expiresAt. Self-custody IOC is rejected. expiresAt is accepted only with GTD. fundingAddresses is buy-only, requires signingAddress, and can only fund by bridging in. On the venue’s own chain, only the signing wallet pays. Omit approveMode, or send approveMode: "sponsored", for the same EIP-7702 approval as a market fill. approveMode: "user_broadcast" makes the wallet send the approve. See Choosing an approve mode. The response includes quoteId for a funded buy. Poll getExecutionStatus({ quoteId }) and submit signatures on Self-custody signing. Do not call fillSelfCustody for that quote. Placement has already started it. An admitted pending order has not reached the venue. A self-custody buy does not reserve a managed balance.

Poll a managed limit order

open is not the only resting status, and filled is not the only finished one. partially_filled_open is resting and not terminal: some size filled, and the rest is still on the book. partial_fill is terminal: the unfilled rest will not fill. cancel_pending is not done. The loop returns on the resting pair and on a terminal status, so it does not spin on those two.
The list call is Get user orders. What each status means is Order lifecycle.

Cancel a managed limit order

Cancel is POST /execution/orders/cancel with orderId. Queued and open orders can be cancelled. A terminal order cannot.
Cancel an order. cancel_pending means the venue has not confirmed yet. Keep polling until cancelled, or until filled or partial_fill if a fill won the race. Do not stop on open.

Self-custody cancels are on the signing page

Build the Polymarket ClobAuth signature or Hyperliquid cancel action using Self-custody signing. Pass that signature as cancelSignature to cancelManagedOrder(orderId, { cancelSignature }). An order a linked wallet placed on Polymarket or Hyperliquid outside AGG uses cancelVenueOrder with venue, venueOrderId, signerAddress, and cancelSignature. Both are the same cancel route. AGG cannot cancel a self-custody order without a new signature, and it does not retry one on its own. GTD expiry is enforced by the venue. AGG does not cancel self-custody GTC orders when a market closes.