> ## Documentation Index
> Fetch the complete documentation index at: https://condor.hummingbot.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute Swap Quote

> 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



## OpenAPI

````yaml /api-reference/openapi.json post /gateway/swap/execute-quote
openapi: 3.1.0
info:
  title: Hummingbot API
  description: API for managing Hummingbot trading instances
  version: 1.0.1
servers:
  - url: http://localhost:8000
    description: Local development server
security: []
paths:
  /gateway/swap/execute-quote:
    post:
      tags:
        - Gateway Swaps
      summary: Execute Swap Quote
      description: >-
        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
      operationId: execute_swap_quote_gateway_swap_execute_quote_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapExecuteQuoteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapExecuteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    SwapExecuteQuoteRequest:
      properties:
        connector:
          type: string
          title: Connector
          description: Router connector the quote came from (e.g., 'jupiter', '0x')
        network:
          type: string
          title: Network
          description: Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')
        quote_id:
          type: string
          title: Quote Id
          description: quote_id from a prior /swap/quote on the same connector
        trading_pair:
          type: string
          title: Trading Pair
          description: >-
            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:
          type: string
          title: Side
          description: 'Trade side the quote was for: ''BUY'' or ''SELL'''
        amount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Base-token amount the quote was for, recorded as the request
        wallet_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Wallet Address
          description: Wallet address (optional, uses default if not provided)
      type: object
      required:
        - connector
        - network
        - quote_id
        - trading_pair
        - side
        - amount
      title: SwapExecuteQuoteRequest
      description: >-
        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.
    SwapExecuteResponse:
      properties:
        transaction_hash:
          type: string
          title: Transaction Hash
          description: Transaction hash
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair
        side:
          type: string
          title: Side
          description: Trade side
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: >-
            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:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Input Amount
          description: >-
            Amount actually spent, denominated in the input token (quote for
            BUY, base for SELL). None until the transaction confirms.
        output_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Output Amount
          description: >-
            Amount actually received, denominated in the output token (base for
            BUY, quote for SELL). None until the transaction confirms.
        price:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price
          description: >-
            Executed price in quote per base, computed from the amounts that
            moved. None until the transaction confirms.
        status:
          type: string
          title: Status
          description: Transaction status
          default: submitted
      type: object
      required:
        - transaction_hash
        - trading_pair
        - side
        - amount
      title: SwapExecuteResponse
      description: >-
        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.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic

````