Quote
https://sandboxapi.onbrails.com/api/v2/wallets/quote (opens in a new tab)
Retrieve a quote for the exchange rate, transaction fee, and quote expiry before executing a Swap or Payout.
📘
Purpose
- Retrieve the exchange rate for the requested currency pair.
- Retrieve the transaction fee.
- Retrieve the quote expiry timestamp.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sourceCurrency | string | ✅ | The currency you are converting from (e.g. USD) |
| destinationCurrency | string | ✅ | The currency you are converting to (e.g. NGN) |
| amount | int64 | ✅ | The amount to convert, in the lowest denomination (minor units) |
| beneficiaryCountry | string | ✅ | The country of the beneficiary (e.g. NG) |
⚠️
Amounts are in minor units. The amount must always be provided in the
lowest denomination of the sourceCurrency — for example, 1 USD is sent as
100 (cents).
Request
Wallets/Get Quote [GET]
curl --request GET \
--url 'https://sandboxapi.onbrails.com/api/v2/wallets/quote?sourceCurrency=USD&destinationCurrency=NGN&amount=100&beneficiaryCountry=NG' \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'accept: application/json'Responses
The response returns the exchange rate, fee, and expiry timestamp for the quote.
🟢 200 - Result example
{
"status": true,
"message": "Quote retrieved successfully",
"data": {
"sourceCurrency": "USD",
"destinationCurrency": "NGN",
"exchangeRate": "1150",
"fee": "0",
"expiry": "2023-12-12T23:15:11.000Z"
}
}