Token Swap

Retrieve a swap rate

Changed on

Get the current market rate for swapping an amount of sourceCurrency into destinationCurrency. Currently only supported between usdc and usdt.

get/v2/wallets/swaps/rate

Request

  • Base URL
    https://production.hifibridge.com
  • URL
    https://production.hifibridge.com/v2/wallets/swaps/rate
  • Auth
    HTTP bearer

Query parameters

sourceCurrency'usdc' | 'usdt' required

Currency being swapped from.

destinationCurrency'usdc' | 'usdt' required

Currency being swapped to.

amountstring required

Amount of sourceCurrency to swap.

Response

Success

sourceCurrencystring
destinationCurrencystring
sourceAmountstring
destinationAmountstring
conversionRatestring

Example response

{
  "sourceCurrency": "usdc",
  "destinationCurrency": "usdt",
  "sourceAmount": "100.00",
  "destinationAmount": "99.98",
  "conversionRate": "0.99980"
}

Changes