Skip to main content
POST
One-shot quote + submit
POST /execute is the one-step convenience endpoint. It runs /quote and /submit server-side and returns both the route plan (so you can display it) and the calldata (so you can broadcast). Use this when:
  • You don’t need a separate price preview step (one-click swap, server-side bot).
  • You want to avoid the quoteId round trip.
  • You always submit immediately after quoting.
For UIs that show a quote, let the user think, then submit, prefer the /quote + /submit two-step flow so the user sees the final price before signing.
  • Authentication: x-api-key header required.
  • user is required here (unlike /quote) because the response includes signed-ready calldata.

Request

Body parameters

/execute accepts the union of /quote and /submit parameters. See POST /quote and POST /submit for full descriptions of each field.

Response

Response fields

A union of the /quote response (so you can display the price) and /submit response (so you can broadcast).

Examples

/execute always returns a fresh quote. There’s no risk of 404 expired here because the quote is consumed immediately on the server side.

Authorizations

x-api-key
string
header
required

Body

application/json
chainId
integer
required
Required range: x >= 1
tokenIn
string
required

20-byte hex address. The sentinel 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero address) signals the chain's native asset (ETH on Base) and is recognized in tokenIn/tokenOut.

Pattern: ^0x[a-fA-F0-9]{40}$
tokenOut
string
required

20-byte hex address. The sentinel 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero address) signals the chain's native asset (ETH on Base) and is recognized in tokenIn/tokenOut.

Pattern: ^0x[a-fA-F0-9]{40}$
amountIn
string
required

Non-negative integer encoded as a decimal string (wei).

Pattern: ^[0-9]+$
slippageBps
integer
required
Required range: 0 <= x <= 10000
user
string
required

20-byte hex address. The sentinel 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero address) signals the chain's native asset (ETH on Base) and is recognized in tokenIn/tokenOut.

Pattern: ^0x[a-fA-F0-9]{40}$
maxHops
integer
Required range: x >= 1
splitEnabled
boolean
enforcePoolDisjoint
boolean
allowedDexes
enum<string>[]
Minimum array length: 1
Available options:
UNIV2,
UNIV3,
UNIV4,
AERODROME_V2LIKE,
AERODROME_CL,
PANCAKE_V2,
PANCAKE_V3,
PANCAKE_INFINITY_CL,
HYDREX,
QUICKSWAP_V4,
ALIEN_BASE_V3,
CURVE,
PROPSWAP,
TESSERA,
ELFOMOFI,
LUNARBASE,
FELTIR,
DODO_V2,
WOOFI,
GYROSCOPE_ECLP,
MAVERICK_V2
feeBps
integer
Required range: 0 <= x <= 10000
useNativeIn
boolean
unwrapNativeOut
boolean
permit
object

Response

Quote + transaction payload

quoteId
string
required
chainId
integer
required
to
string
required

20-byte hex address. The sentinel 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero address) signals the chain's native asset (ETH on Base) and is recognized in tokenIn/tokenOut.

Pattern: ^0x[a-fA-F0-9]{40}$
data
string
required

Hex-encoded bytes.

Pattern: ^0x[a-fA-F0-9]*$
value
string
required

Non-negative integer encoded as a decimal string (wei).

Pattern: ^[0-9]+$
routePlan
object
required
expiresAt
integer<int64>
required