Skip to main content
POST /offramp/quote endpoint returns a quote for converting a supported stablecoin to local currency, including the applied rate, how much the user sends and receives, settlement timing, and when the quote expires.

Example Request

curl -L \
  --request POST \
  --url 'https://api.onswitch.xyz/offramp/quote' \
  --header 'x-service-key: YOUR_SERVICE_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 100,
    "country": "NG",
    "asset": "base:usdc",
    "currency": "NGN",
    "channel": "BANK",
    "exact_output": false,
    "developer_fee": 0.5
  }'
exact_output (optional, default false) controls how amount is interpreted.

With false, amount is the stablecoin you send (asset); i.e. the quote computes how much local currency (currency) the user receives.

With true, amount is the local currency to deliver; i.e. the quote computes how much stablecoin must be sent.
developer_fee (optional) is a percentage between 0 and 100 taken as your fee from the payment amount.

Omit the fee or set it to 0 if you are not charging your own fee.

Example Response

{
  "success": true,
  "message": "Offramp quote fetched successfully",
  "timestamp": "2026-03-31T03:05:43.257Z",
  "data": {
    "expiry": "2026-03-31T04:10:43+01:00",
    "settlement": "5-10 minutes",
    "channel": "BANK",
    "rate": 1409.758,
    "source": {
      "amount": 100,
      "currency": "USDC",
      "network": "BASE"
    },
    "destination": {
      "amount": 140975.8,
      "currency": "NGN",
      "network": "FIAT"
    }
  }
}
Quotes expire at data.expiry. Market conditions can change; create the transaction promptly after fetching a quote, or request a fresh quote if it has expired.

Need Help?

Email Support

Send us a message and we’ll get back to you shortly.

Book a Demo

Hop on a call with our team.