Rates
The Rates API lets you fetch the current exchange rate and charge for converting between supported currencies. Use this before initiating a Swap or whenever you need the latest FX rate for your business.
Get Rates
Endpoint: https://api.chapa.co/v1/rates
Method: GET
Authorization: Pass your secret key as a bearer token in the request header to authorize this call.
Query Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| from | yes | string | Source currency code (e.g. USD, ETB) |
| to | yes | string | Destination currency code (e.g. ETB, USD) |
Example request:
https://api.chapa.co/v1/rates?from=USD&to=ETBResponse Parameters
| Parameter | Type | Description |
|---|---|---|
| message | string | A descriptive message about the result |
| status | string | The status of the request (success or failed) |
| data | object | Rate details when the request succeeds; null on failure |
The data object contains:
| Parameter | Type | Description |
|---|---|---|
| from | string | Source currency code |
| to | string | Destination currency code |
| rate | number | Exchange rate from from to to (returned with 4 decimal places) |
| charge | number | Applicable charge for the currency pair (returned with 4 decimal places) |
Both rate and charge are rounded to 4 decimal places before being returned.
Supported Currencies
Currently supported currency codes:
ETBUSD
Currency values are case-insensitive (usd and USD are treated the same).
Error Responses
| HTTP Status | Message | When it happens |
|---|---|---|
| 401 | Invalid API Key or the business can’t accept payments at the moment… | Missing or invalid bearer token |
| 400 | Source currency is required | from query parameter is missing |
| 400 | Destination currency is required | to query parameter is missing |
| 400 | Invalid source currency | from is not a supported currency |
| 400 | Invalid destination currency | to is not a supported currency |
| 404 | Rates not found | No rate exists for the requested pair |
1import requests23url = "https://api.chapa.co/v1/rates?from=USD&to=ETB"4payload = ''5headers = {6 'Authorization': 'Bearer CHASECK_TEST-xxxxxxxxxxxxxxxx'7}89response = requests.request("GET", url, headers=headers, data=payload)1011print(response.text) ℹ️
If a direct rate for from → to is not stored, the API will attempt to
invert the reverse pair (to → from) when available.
ℹ️
Refer to our Error Codes page for general response patterns across the Chapa API.