🔄 Exchange Rate API
This endpoint retrieves exchange rates between crypto and fiat currencies.
⚠️ Note:
This endpoint does not support crypto-to-crypto conversions.
Only crypto ↔ fiat and fiat ↔ fiat conversions are supported.
Endpoint
GET
curl --location '{{baseURL}}/api/checkout/exchange-rates/?from_currency=USDC&to_currency=NGN&amount=2500&chain=BASE' \
--header 'X-Api-Key: *******************' \
--header 'X-Api-Id: ****************' \
--data ''Query Parameters
Name
Type
Required
Description
from_currency
string
Yes
Currency code to convert from. Supported: USDT, USDC, SOL, NGN, KES, GHS, USD, ZAR.
to_currency
string
Yes
Currency code to convert to. Supported: same as above.
amount
number
Yes
The amount to convert. Defaults to 1.
chain
string
Yes
From currency chain
{
"success": true,
"message": "Exchange rate retrieved successfully",
"data": {
"rate": 1459.199721997525,
"fees": 0.0,
"origin_amount": 1.713268,
"destination_amount": 2500.0,
"from_currency": "USDC",
"to_currency": "NGN",
"chain": "BASE"
}
}Usage Notes
If
amountis omitted, the API will return the conversion rate for 1 unit of thefromcurrency.Both
rateandorigin_amountare returned for clarity.Useful for showing estimated quote settlement rates in your checkout or payment screens.
Last updated