Skip to main content

Get price for a swap

POST /api/v1/price

Use this API to quickly get the fee data for a cross-chain swap.

Request Body required
  • from string (chain:token) required

    The initial chain and token type. See supported chains.

  • to string (chain:token) required

    The target chain and token type. See supported chains.

  • amount string_of_number required

    Amount of tokens to initialize the cross-chain swap.

  • fromAddress address

    The address on initial chain to initialize the cross-chain swap.

Responses

Successful operation

Schema
  • result object

    Fee data of this swap

  • serviceFee string_of_number

    Fee charged by Meson protocol

  • lpFee string_of_number

    Fee charged by liquidity providers on Meson

  • totalFee string_of_number

    Total fee to be charged

  • converted optional

    For some swap routes (i.e. arb:usdc -> merlin:btc) token conversion is allowed.

  • amount string_of_number

    Amount of converted token to receive

  • symbol string

    Symbol of converted token

Loading...