API Reference
Quote [GET]

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.

📘

A quote locks in the exchange rate, fee, and expiry for a transaction. Quotes are used before both Swap and Payout so you know the exact cost before you execute.

Purpose

  • Retrieve the exchange rate for the requested currency pair.
  • Retrieve the transaction fee.
  • Retrieve the quote expiry timestamp.

Request Parameters

ParameterTypeRequiredDescription
sourceCurrencystring✅The currency you are converting from (e.g. USD)
destinationCurrencystring✅The currency you are converting to (e.g. NGN)
amountint64✅The amount to convert, in the lowest denomination (minor units)
beneficiaryCountrystring✅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"
}
}