---
title: "Request a swap quote"
method: POST
path: "/swap/quotes"
---

# Request a swap quote

`POST /swap/quotes`

[Available in Production/Sandbox environment] Request a swap quote for the selected swap pair.

## Headers

- `X-XFERS-APP-API-KEY` string, required
- `X-PUBLIC-KEY-ID` string
- `X-TIMESTAMP` string
- `X-NONCE` string
- `X-SIGNATURE` string

## Request body

- object
  - `data` object
    - `attributes` object
      - `swapPair` string, required — The currency pair involved in the swap. You can obtain possible `swapPair` values from the [Get supported swap pairs API](https://docs.straitsx.com/reference/get-supported-swap-pairs) response
      - `sourceCurrency` string, required — The source currency of requested swap quote
      - `targetCurrency` string, required — The target currency of requested swap quote
      - `fixedSide` string, required — Indicates which side of the swap has a fixed amount, can be either `source` or `target`
      - `amount` string, required — Amount of the `fixedSide` currency (Must be positive float up to 2 d.p.)<br>Regex: `/^[0-9]+(\.[0-9]{1,2}0*)?$/`

## Response `200`

200

- object
  - `data` object
    - `id` string — Swap quote ID.
    - `type` string — Request type.
    - `attributes` object
      - `swapPair` string — The currency pair involved in the swap.
      - `sourceCurrency` string — The source currency of requested swap quote.
      - `targetCurrency` string — The target currency of requested swap quote.
      - `totalSourceCurrencyAmount` string — The total amount of the source currency that will be deducted for the swap, including any applicable fees.
      - `sourceCurrencyAmount` string — The amount of the source currency being converted, excluding any fees.
      - `targetCurrencyAmount` string — The amount of the target currency that will be received from the swap.
      - `fixedSide` string — Indicates which side of the swap has a fixed amount, can be either `source` or `target`.
      - `rate` string — The proposed exchange rate.<br><br>Note: The rate is always defined as the first currency in the swap pair quoted against the second currency.
      - `fees` object[] — Additional transaction fees or markup applied on top of the exchange rate.
        - `type` string — Fee type.
        - `amount` string — The amount of the fee charged for the swap, expressed in the specified fee currency.
        - `currency` string — The currency for the fee amount.
      - `expiresAt` string — The timestamp indicating when the quoted rate expires.
      - `createdAt` string — The timestamp indicating when the quoted rate is created.

---

[API](https://skmtc.net/straitsx/apis/straitsx-sandbox-base-url.md) · [All operations](https://skmtc.net/straitsx/apis/straitsx-sandbox-base-url/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/straitsx/straitsx-sandbox-base-url/versions/9ceee2969aeb/schema)
