Currency API
Convert between world currencies and get live exchange rates with full Ethiopian Birr (ETB) support. Whether you need a simple rate check, currency conversion, or all rates against a base currency, this API has you covered.
Available Endpoints
GET Currency Converter
Convert an amount from one currency to another using live exchange rates. Returns the conversion rate and result.
GET All Rates (Base Currency)
Get exchange rates for all supported currencies against a specified base currency.
GET ETB Rates
Quick access to Ethiopian Birr (ETB) rates against major currencies. Returns cached rates updated via cron.
Try the API
Click to test currency conversion:
Click a button to see the response here...
Currency Converter Endpoint
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| from | string | USD | Source currency code (e.g., USD, EUR, GBP, ETB) |
| to | string | ETB | Target currency code (e.g., ETB, USD, EUR, AED) |
| amount | number | 1 | Amount to convert |
| base | string | (optional) | When set, returns all rates against this base currency instead of converting |
Example Request
GET /currency/api?from=USD&to=ETB&amount=100
GET /currency/api?from=EUR&to=USD&amount=50
GET /currency/api?base=USD
Example Response (Conversion)
{
"from": "USD",
"to": "ETB",
"amount": 100,
"rate": 157.430000,
"result": 15743.00,
"date": "2026-07-09"
}
Example Response (All Rates)
{
"base": "USD",
"date": "2026-07-09",
"rates": {
"AED": 3.673000,
"AFN": 71.000000,
"ETB": 157.430000,
"EUR": 0.920000,
"GBP": 0.790000,
"SAR": 3.750000,
"USD": 1.000000
}
}
ETB Rates Endpoint
Example Request
GET /currency/serveRates.php
Example Response
{
"USD": 157.43,
"EUR": 180.06,
"GBP": 210.22,
"AED": 42.87,
"SAR": 41.93
}
Returns ETB exchange rates for USD, EUR, GBP, AED, and SAR. These rates are updated periodically via a cron job.
Supported Currencies
The API supports 170+ world currencies. Here are some of the most commonly used:
Features
Response Fields
| Field | Description |
|---|---|
| from | Source currency code |
| to | Target currency code |
| amount | Input amount to convert |
| rate | Conversion rate (1 from = rate to) |
| result | Converted amount rounded to 2 decimals |
| date | Date of the exchange rates |
| base | Base currency (when using &base= parameter) |
| rates | Object of all rates against base (when using &base=) |
Error Responses
{
"error": "Failed to fetch exchange rates"
}
{
"error": "Unsupported currency: XYZ"
}