GetExchangeRate returns the exchange rate from USD to a specified currency.
Chains & Discovery
GetExchangeRate
POST
GetExchangeRate returns the exchange rate from USD to a specified currency.
Documentation Index
Fetch the complete documentation index at: https://anypay-trails-api-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheGetExchangeRate endpoint returns the current exchange rate for a fiat currency against USD. Use this to display fiat-denominated amounts in your UI or to convert token values to a user’s local currency.
Use Cases
- Display token prices in local fiat currencies
- Power fiat input mode in fund/withdraw flows
- Build currency selectors with live exchange rates
- Show USD-equivalent values in non-USD currencies
Request Parameters
Optional Fields
- toCurrency (string): ISO 4217 currency code (e.g.
"EUR","GBP","JPY"). Defaults to"USD"if omitted.
Response
- exchangeRate (
ExchangeRate): Exchange rate object
ExchangeRate Object Structure
- name (string): Full name of the currency (e.g.
"Euro") - symbol (string): Currency symbol (e.g.
"€") - value (number): Exchange rate value relative to
vsCurrency - vsCurrency (string): The base currency (typically
"USD") - currencyType (string): Currency type identifier
Examples
Get EUR Exchange Rate
Convert a USD Amount
Use
GetFiatCurrencyList to retrieve the full list of supported currencies and their codes before calling this endpoint.Next Steps
GetFiatCurrencyList
Get the list of supported fiat currencies
GetTokenPrices
Get USD prices for on-chain tokens