Get Off-Ramp Exchange Rate
Get a fee breakdown and fiat conversion for a proposed off-ramp transaction.
Returns the platform fee, business fee, and fiat payout breakdown for a crypto-to-fiat off-ramp before initiating a transaction.
Endpoint
POST /v1/exchange-rates/offrampAuthentication
Requires a Merchant API key in the Authorization header.
Authorization: <api_key>Request body
cryptoAmount
number
Yes
Amount of crypto the customer is sending
businessFeeInCrypto
number
Yes
Your business fee in crypto. Send 0 if not charging a fee
Example request
curl -X POST https://ramp-api.ivorypay.io/api/v1/exchange-rates/offramp \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"cryptoAmount": 30,
"businessFeeInCrypto": 0,
"token": "USDT",
"blockchain": "BSC_MAINNET",
"fiatCurrency": "NGN"
}'const response = await fetch("https://ramp-api.ivorypay.io/api/v1/exchange-rates/offramp", {
method: "POST",
headers: {
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
cryptoAmount: 30,
businessFeeInCrypto: 0,
token: "USDT",
blockchain: "BSC_MAINNET",
fiatCurrency: "NGN",
}),
});
const data = await response.json();
console.log(data);Example response
Response fields
feeInCrypto
number
IvoryPay's platform fee in crypto
feeInFiat
number
IvoryPay's platform fee in fiat
businessFeeInCrypto
number
Your business fee in crypto
businessFeeInFiat
number
Your business fee in fiat
cryptoAmount
number
Gross crypto amount provided
cryptoAmountPayable
number
Crypto amount to be sent
fiatAmountPayable
number
Net fiat amount the customer receives after fees
fiatRate
number
Fiat units per 1 crypto token
cryptoRate
number
Crypto rate used for conversion
fiatCurrency
string
Fiat currency code
token
string
Cryptocurrency token
blockchain
string
Blockchain network
Last updated