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

ParameterRequiredTypeDescription
fromyesstringSource currency code (e.g. USD, ETB)
toyesstringDestination currency code (e.g. ETB, USD)

Example request:

https://api.chapa.co/v1/rates?from=USD&to=ETB

Response Parameters

ParameterTypeDescription
messagestringA descriptive message about the result
statusstringThe status of the request (success or failed)
dataobjectRate details when the request succeeds; null on failure

The data object contains:

ParameterTypeDescription
fromstringSource currency code
tostringDestination currency code
ratenumberExchange rate from from to to (returned with 4 decimal places)
chargenumberApplicable 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:

  • ETB
  • USD

Currency values are case-insensitive (usd and USD are treated the same).

Error Responses

HTTP StatusMessageWhen it happens
401Invalid API Key or the business can’t accept payments at the moment…Missing or invalid bearer token
400Source currency is requiredfrom query parameter is missing
400Destination currency is requiredto query parameter is missing
400Invalid source currencyfrom is not a supported currency
400Invalid destination currencyto is not a supported currency
404Rates not foundNo rate exists for the requested pair
1import requests
2
3url = "https://api.chapa.co/v1/rates?from=USD&to=ETB"
4payload = ''
5headers = {
6 'Authorization': 'Bearer CHASECK_TEST-xxxxxxxxxxxxxxxx'
7}
8
9response = requests.request("GET", url, headers=headers, data=payload)
10
11print(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.