> ## 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.

# Get Swap Quote

> Get a price quote for a swap via router (Jupiter, 0x).

Example:
    connector: 'jupiter'
    network: 'solana-mainnet-beta'
    trading_pair: 'SOL-USDC'
    side: 'BUY'
    amount: 1
    slippage_pct: 1

Returns:
    Quote with price, expected output amount, and gas estimate



## OpenAPI

````yaml /api-reference/openapi.json post /gateway/swap/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/quote:
    post:
      tags:
        - Gateway Swaps
      summary: Get Swap Quote
      description: |-
        Get a price quote for a swap via router (Jupiter, 0x).

        Example:
            connector: 'jupiter'
            network: 'solana-mainnet-beta'
            trading_pair: 'SOL-USDC'
            side: 'BUY'
            amount: 1
            slippage_pct: 1

        Returns:
            Quote with price, expected output amount, and gas estimate
      operationId: get_swap_quote_gateway_swap_quote_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapQuoteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapQuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
components:
  schemas:
    SwapQuoteRequest:
      properties:
        connector:
          type: string
          title: Connector
          description: DEX router connector (e.g., 'jupiter', '0x')
        network:
          type: string
          title: Network
          description: >-
            Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta',
            'ethereum-mainnet')
        trading_pair:
          type: string
          title: Trading Pair
          description: Trading pair in BASE-QUOTE format (e.g., 'SOL-USDC')
        side:
          type: string
          title: Side
          description: 'Trade side: ''BUY'' or ''SELL'''
        amount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Amount to swap (in base token for SELL, quote token for BUY)
        slippage_pct:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Slippage Pct
          description: 'Maximum slippage percentage (default: 1.0)'
          default: 1
      type: object
      required:
        - connector
        - network
        - trading_pair
        - side
        - amount
      title: SwapQuoteRequest
      description: Request for swap price quote
    SwapQuoteResponse:
      properties:
        base:
          type: string
          title: Base
          description: Base token symbol
        quote:
          type: string
          title: Quote
          description: Quote token symbol
        price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Price
          description: Quoted price (base/quote)
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: >-
            Amount specified in request (BUY: base amount to receive, SELL: base
            amount to sell)
        amount_in:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount In
          description: 'Actual input amount (BUY: quote to spend, SELL: base to sell)'
        amount_out:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount Out
          description: 'Actual output amount (BUY: base to receive, SELL: quote to receive)'
        expected_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Expected Amount
          description: 'Deprecated: use amount_out instead'
        slippage_pct:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Slippage Pct
          description: Applied slippage percentage
        gas_estimate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Gas Estimate
          description: Estimated gas cost
      type: object
      required:
        - base
        - quote
        - price
        - amount
        - slippage_pct
      title: SwapQuoteResponse
      description: Response with swap quote details
    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

````