Actions61
- Activity Actions
- Asset Actions
- Custom Query Actions
- Hub Actions
- Lending Actions
- Market Data Actions
- Position Management Actions
- Position Swap Actions
- Protocol Actions
- Reserve Actions
- Spoke Actions
- Swap Actions
- User Position Actions
Market Data → Get Exchange Rate
AI-generatedSummary
Fetch the exchange rate from a specified source type to a target currency on a given chain.
Inputs
- chainId — Choose from the list, or specify an ID using an expression
- exchangeFromType — The type of source currency/token (fiat, native, or ERC20)
- exchangeFromValue (required) — For fiat: USD/EUR/GBP. For native: chain ID. For ERC20: address:chainId (e.g., 0x....:1)
- exchangeToCurrency — The target currency (USD, EUR, GBP)
Output shape
a single exchange rate record
Returns an object containing the computed rate and associated metadata; may include additional fields such as timestamp or source.
Examples
Example 1: Get USD to EUR rate for Ethereum mainnet native token
chainId: 1, exchangeFromType: native, exchangeFromValue: 1, exchangeToCurrency: EUR
Example 2: Get EUR to USD rate for a specific ERC20 token
chainId: 1, exchangeFromType: erc20, exchangeFromValue: 0xTokenAddr:1, exchangeToCurrency: USD
Example 3: Get GBP rate for a custom chain ID
chainId: