Exchange Rate
Convert an on-chain amount to a fiat currency
Quotes the given on-chain amount in the requested fiat currency via the rate oracle. Used to show wallet balances in the application preferred currency. The value is returned in reference sub-units (centi-units of the currency).
get/v1/exchange-rate/convert
Request
- Base URL: https://api.prod.keyban.io
- URL: https://api.prod.keyban.io/v1/exchange-rate/convert
- Auth: API key in header X-Api-Key
Query parameters
asset'USDC' | 'ETH' required
On-chain asset to convert.
amountstring required
Raw amount to convert, in the asset base units (USDC: 6 decimals, ETH: 18). Passed as a string to preserve bigint precision.
currency'EUR' | 'USD' | 'JPY' required
Target fiat currency (ISO 4217).
Response
Example response
{
"asset": "USDC",
"amount": "1250500000",
"currency": "EUR",
"valueRef": "118750"
}Changes
No recorded changes to this operation across all 1 revision of this API.