---
title: "POST /price"
method: POST
path: "/price"
---

# POST /price

`POST /price`

## Request body

- object
  - `user` string, required — Address that is depositing funds on the origin chain and submitting transactions or signatures
  - `recipient` string — Address that is receiving the funds on the destination chain, if not specified then this will default to the user address
  - `originChainId` number, required
  - `destinationChainId` number, required
  - `originCurrency` string, required
  - `destinationCurrency` string, required
  - `amount` string, required — Amount to swap as the base amount (can be switched to exact input/output using the dedicated flag), denoted in the smallest unit of the specified currency (e.g., wei for ETH)
  - `tradeType` 'EXACT_INPUT' | 'EXACT_OUTPUT' | 'EXPECTED_OUTPUT', required — Whether to use the amount as the output or the input for the basis of the swap
  - `txs` object[]
    - `to` string
    - `value` string
    - `data` string
  - `referrer` string
  - `refundTo` string — Address to send the refund to in the case of failure, if not specified then the recipient address or user address is used
  - `refundOnOrigin` boolean — Always refund on the origin chain in case of any issues
  - `useExternalLiquidity` boolean — Enable this to use canonical+ bridging, trading speed for more liquidity
  - `useFallbacks` boolean — Enable this for specific fallback routes
  - `usePermit` boolean — Enable this to use permit (eip3009) when bridging, only works on supported currency such as usdc
  - `useDepositAddress` boolean — Enable this to use a deposit address when bridging, in scenarios where calldata cannot be sent alongside the transaction. only works on native currency bridges.
  - `slippageTolerance` string — Slippage tolerance for the swap, if not specified then the slippage tolerance is automatically calculated to avoid front-running. This value is in basis points (1/100th of a percent), e.g. 50 for 0.5% slippage. Must be 0–10000 bps.
  - `appFees` object[]
    - `recipient` string — Address that will receive the app fee
    - `fee` string — App fees to be charged for execution in basis points, e.g. 100 = 1%

## Response `200`

Default Response

- object
  - `fees` object
    - `gas` object — Origin chain gas fee
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `relayer` object — Combination of the relayerGas and relayerService to give you the full relayer fee
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `relayerGas` object — Destination chain gas fee
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `relayerService` object — Fees paid to the relay solver, note that this value can be negative (which represents network rewards for moving in a direction that optimizes liquidity distribution)
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `app` object — Fees paid to the app. Currency will be the same as the relayer fee currency. This needs to be claimed later by the app owner and is not immediately distributed to the app
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `subsidized` object — The amount of fees for the request that are subsidized by the request sponsor. Does not include deposit origin gas unless it is a permit based deposit.
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
  - `details` object — A summary of the swap and what the user should expect to happen given an input
    - `operation` string — The operation that will be performed, possible options are send, swap, wrap, unwrap, bridge
    - `sender` string — The address that deposited the funds
    - `recipient` string — The address that will be receiving the swap output
    - `currencyIn` object
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `currencyOut` object
      - `currency` object
        - `chainId` number
        - `address` string
        - `symbol` string
        - `name` string
        - `decimals` number
        - `metadata` object
          - `logoURI` string
          - `verified` boolean
          - `isNative` boolean
      - `amount` string
      - `amountFormatted` string
      - `amountUsd` string
      - `minimumAmount` string
    - `totalImpact` object — The difference between the input and output values, including fees
      - `usd` string
      - `percent` string
    - `swapImpact` object — The impact of the swap, not factoring in fees
      - `usd` string
      - `percent` string
    - `rate` string — The swap rate which is equal to 1 input unit in the output unit, e.g. 1 USDC -> x ETH. This value can fluctuate based on gas and fees.
    - `slippageTolerance` object
      - `total` string — The total slippage tolerance applied to the order, in basis points (1/100th of a percent), e.g. 50 for 0.5% slippage. The origin and destination breakdowns are alternative allocations of this budget and are not additive.
      - `origin` object — The slippage tolerance on the origin chain swap
        - `usd` string
        - `value` string
        - `percent` string
      - `destination` object — The slippage tolerance on the destination chain swap
        - `usd` string
        - `value` string
        - `percent` string
    - `timeEstimate` number — Estimated swap time in seconds
    - `userBalance` string — The user's balance in the given currency on the origin chain

## Other responses

- `400` — Default Response
- `401` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/relay/apis/cross-chain-solver.md) · [All operations](https://skmtc.net/relay/apis/cross-chain-solver/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/relay/cross-chain-solver/revisions/428d669c2830/schema)
