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

# Get Swap Quote

`POST /gateway/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

## Request body

- SwapQuoteRequest — Request for swap price quote
  - `connector` string, required — DEX router connector (e.g., 'jupiter', '0x')
  - `network` string, required — Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')
  - `trading_pair` string, required — Trading pair in BASE-QUOTE format (e.g., 'SOL-USDC')
  - `side` string, required — Trade side: 'BUY' or 'SELL'
  - `amount` union, required — Amount to swap (in base token for SELL, quote token for BUY)
    - number
    - string
  - `slippage_pct` union — Maximum slippage percentage (default: 1.0)
    - number
    - string

## Response `200`

Successful Response

- SwapQuoteResponse — Response with swap quote details
  - `base` string, required — Base token symbol
  - `quote` string, required — Quote token symbol
  - `price` string, required — Quoted price (base/quote)
  - `amount` string, required — Amount specified in request (BUY: base amount to receive, SELL: base amount to sell)
  - `amount_in` string, nullable — Actual input amount (BUY: quote to spend, SELL: base to sell)
  - `amount_out` string, nullable — Actual output amount (BUY: base to receive, SELL: quote to receive)
  - `expected_amount` string, nullable — Deprecated: use amount_out instead
  - `slippage_pct` string, required — Applied slippage percentage
  - `gas_estimate` string, nullable — Estimated gas cost

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hummingbot/apis/hummingbot-api.md) · [All operations](https://skmtc.net/hummingbot/apis/hummingbot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hummingbot/hummingbot-api/versions/5347fe79537f/schema)
