---
title: "Execute Swap Quote"
method: POST
path: "/gateway/swap/execute-quote"
tags: ["Gateway Swaps"]
---

# Execute Swap Quote

`POST /gateway/swap/execute-quote`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/gateway/swap/execute-quote`
- Auth: HTTP basic

Execute a quote returned by /swap/quote, by its quote_id.

The two-step flow: quote, decide, then commit to THAT quote. /swap/execute prices
again at execution, which discards the price the caller saw — the whole reason dflow,
titan and 0x return a held quote. Router connectors only; a pool-scoped connector has
no cached quote to execute and is rejected rather than quietly re-priced.

Example:
    connector: 'jupiter'
    network: 'solana-mainnet-beta'
    quote_id: '<quote_id from /swap/quote>'
    trading_pair: 'SOL-USDC'
    side: 'SELL'
    amount: 0.01

Returns:
    Transaction hash and what the swap actually moved

## Request body

- SwapExecuteQuoteRequest: 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` union, required: Base-token amount the quote was for, recorded as the request
    - number
    - string
  - `wallet_address` string, nullable: Wallet address (optional, uses default if not provided)

## Response `200`

Successful Response

- SwapExecuteResponse: 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.
  - `input_amount` string, nullable: Amount actually spent, denominated in the input token (quote for BUY, base for SELL). None until the transaction confirms.
  - `output_amount` string, nullable: Amount actually received, denominated in the output token (base for BUY, quote for SELL). None until the transaction confirms.
  - `price` string, nullable: Executed price in quote per base, computed from the amounts that moved. None until the transaction confirms.
  - `status` string: Transaction status

## Other responses

- `422`: Validation Error

## Changes

- **2026-08-27** `6edd79085219`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hummingbot/apis/hummingbot-api/changes/gateway/swap/execute-quote/post.md)

---

[API](https://skmtc.dev/hummingbot/apis/hummingbot-api.md) - [All operations](https://skmtc.dev/hummingbot/apis/hummingbot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hummingbot/apis/hummingbot-api/revisions/66c2e6c1da2e?raw)
