---
title: "Convert an on-chain amount to a fiat currency"
method: GET
path: "/v1/exchange-rate/convert"
tags: ["Exchange Rate"]
---

# Convert an on-chain amount to a fiat 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`

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).

## Query parameters

- `asset` 'USDC' | 'ETH', required
- `amount` string, required
- `currency` 'EUR' | 'USD' | 'JPY', required

## Response `200`

- ExchangeRateConversionDtoOutput
  - `asset` 'USDC' | 'ETH', required: On-chain asset that was converted.
  - `amount` string, required: Raw on-chain amount that was converted, in the asset base units (USDC has 6 decimals, ETH 18). Echoed back from the request.
  - `currency` 'EUR' | 'USD' | 'JPY', required: Fiat currency (ISO 4217) the amount was converted to.
  - `valueRef` string, required: Converted value in reference sub-units of `currency` (centi-units — divide by 100 for the major amount, uniform across currencies incl. JPY). Live quote from the rate oracle; subject to a short cache.

## Other responses

- `400`: Invalid query parameters.
- `503`: No recent enough exchange rate could be obtained.

---

[API](https://skmtc.dev/keyban/apis/keyban-rest-apis.md) · [All operations](https://skmtc.dev/keyban/apis/keyban-rest-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/keyban/apis/keyban-rest-apis/revisions/0bb79a1da961?raw)
