---
title: "Swap Quote"
method: GET
path: "/v1/swap/quote"
---

# Swap Quote

`GET /v1/swap/quote`

Returns a swap quote between two SPL mints. The quote response can be passed as-is into `POST /v1/swap/swap` to build the swap transaction.

## Query parameters

- `inputMint` string, required
- `outputMint` string, required
- `amount` string, required
- `slippageBps` integer
- `swapMode` 'ExactIn' | 'ExactOut'
- `dexes` string
- `excludeDexes` string
- `restrictIntermediateTokens` boolean
- `onlyDirectRoutes` boolean
- `asLegacyTransaction` boolean
- `platformFeeBps` integer
- `maxAccounts` integer
- `instructionVersion` 'V1' | 'V2'
- `dynamicSlippage` boolean
- `forJitoBundle` boolean
- `supportDynamicIntermediateTokens` boolean

## Response `200`

Swap quote

- object
  - `inputMint` string, required
  - `inAmount` string, required
  - `outputMint` string, required
  - `outAmount` string, required
  - `otherAmountThreshold` string, required
  - `swapMode` 'ExactIn' | 'ExactOut', required
  - `slippageBps` integer, required
  - `priceImpactPct` string, required
  - `routePlan` object[], required
    - `swapInfo` object
    - `percent` integer
    - `bps` integer, nullable
  - `instructionVersion` 'V1' | 'V2' | 'null', nullable
  - `platformFee` object, nullable
  - `contextSlot` integer
  - `timeTaken` number

## Other responses

- `500` — Configuration error (e.g. missing `METIS_SWAP_API_URL`)
- `502` — Upstream error

---

[API](https://skmtc.dev/magicblock/apis/magicblock-router-api.md) · [All operations](https://skmtc.dev/magicblock/apis/magicblock-router-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/magicblock/magicblock-router-api/revisions/f024efa907c6/schema)
