---
title: "Preview a swap"
method: GET
path: "/v1/swap/preview"
tags: ["Swap"]
---

# Preview a swap

`GET /v1/swap/preview`

Reads preview(inputToken, amount) on the Superstate swap contract and returns the quote: the input amount to pay, the fee charged on it and the output amount to receive.

## Query parameters

- `contract_address` string, required
- `chain` string, required
- `input_token` string, required
- `amount` string, required

## Response `200`

Successful response.

- SwapPreview — Quote for swapping an amount of an input token on a swap contract.
  - `fee` string, required — Fee charged on the swap, as a uint256 decimal string in the input token's smallest unit
  - `object` 'swap_preview', required — String representing the object's type. Objects of the same type share the same value.
  - `pay_input_amount` string, required — Amount of the input token to pay, as a uint256 decimal string in the input token's smallest unit
  - `receive_output_amount` string, required — Amount of the output token to receive, as a uint256 decimal string in the output token's smallest unit

## Other responses

- `default` — Error response.

---

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