Skip to main content
POST
Execute Swap Quote

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request to execute a quote the caller already has.

The two-step flow โ€” quote, decide, then commit to that quote โ€” is the reason dflow, titan and 0x return a held price at all. Routing them through /swap/execute instead throws the quote away and prices again, which is what every swap on record did, because until now nothing downstream exposed Gateway's execute-quote route.

connector
string
required

Router connector the quote came from (e.g., 'jupiter', '0x')

network
string
required

Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')

quote_id
string
required

quote_id from a prior /swap/quote on the same connector

trading_pair
string
required

Trading pair the quote was for (e.g., 'SOL-USDC'). Gateway identifies the swap by quote_id alone; this is what the recorded trade is filed under.

side
string
required

Trade side the quote was for: 'BUY' or 'SELL'

amount
required

Base-token amount the quote was for, recorded as the request

wallet_address
string | null

Wallet address (optional, uses default if not provided)

Response

Successful Response

Response after executing swap.

amount is what was asked for; the three fill fields are what happened. They were missing entirely, so a caller reconciling a position against this response was reconciling against its own intent: a BUY of 1000 tokens that delivered 951.68 answered amount: 1000 under the description "Amount swapped". Every one of these numbers was already in hand โ€” the same call writes them to the swap history โ€” so the only way to learn what a swap did was to execute it, discard the answer, and search the history by transaction hash.

transaction_hash
string
required

Transaction hash

trading_pair
string
required

Trading pair

side
string
required

Trade side

amount
string
required

Amount REQUESTED, denominated in the base token (SELL: base sold; BUY: base wanted). This is the request echoed back, not the fill โ€” see input_amount / output_amount for what actually moved.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
input_amount
string | null

Amount actually spent, denominated in the input token (quote for BUY, base for SELL). None until the transaction confirms.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
output_amount
string | null

Amount actually received, denominated in the output token (base for BUY, quote for SELL). None until the transaction confirms.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
price
string | null

Executed price in quote per base, computed from the amounts that moved. None until the transaction confirms.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
status
string
default:submitted

Transaction status