Get Sell Quotes
Get off-ramp quotes showing how much fiat you receive for a given crypto amount. Returns multiple quotes so you can compare rates and fees.
GET
https://api.zenpayz.com/payment/api/v1/off-ramp/quotesBearer · API key
Request
Headers
| Header | Description |
|---|---|
x-request-id OPTIONAL | Custom request ID for tracing |
Public Endpoint
This endpoint does not require authentication headers.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
source REQUIRED | string | Crypto ID (e.g. btc_bitcoin) |
destination REQUIRED | string | Fiat currency (e.g. usd) |
amount REQUIRED | string | Crypto amount (e.g. 0.01) |
paymentMethod OPTIONAL | string | Payout method (e.g. bank_transfer) |
country OPTIONAL | string | ISO country code |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"onramp": "moonpay",
"paymentMethod": "bank_transfer",
"inputAmount": 0.01,
"outputAmount": 870.50,
"rate": 89285.71,
"networkFee": 2.00,
"transactionFee": 5.00,
"totalFee": 7.00,
"recommended": true,
"labels": [],
"minAmount": 0.001,
"maxAmount": 1.0,
"quoteId": "01H985NH79FW951SKERQ45JMYXmoonpay",
"availablePaymentMethods": [
{ "paymentTypeId": "bank_transfer", "name": "Bank Transfer", "icon": "https://cdn.onramper.com/icons/payments/banktransfer.svg" },
{ "paymentTypeId": "creditcard", "name": "Credit Card", "icon": "https://cdn.onramper.com/icons/payments/creditcard.svg" }
]
}
],
"message": "Sell quotes retrieved"
}
Response Fields
| Parameter | Type | Description |
|---|---|---|
onramp OPTIONAL | string | Reference identifier -- pass this to the sell checkout endpoint |
paymentMethod OPTIONAL | string | Payout method for this quote |
inputAmount OPTIONAL | number | Crypto amount you sell |
outputAmount OPTIONAL | number | Fiat amount you receive |
rate OPTIONAL | number | Exchange rate |
networkFee OPTIONAL | number | Blockchain network fee |
transactionFee OPTIONAL | number | Processing fee |
totalFee OPTIONAL | number | Combined fees |
recommended OPTIONAL | boolean | Whether this is the recommended quote |
labels OPTIONAL | string[] | Tags |
minAmount OPTIONAL | number | Minimum allowed amount |
maxAmount OPTIONAL | number | Maximum allowed amount |
estimatedTime OPTIONAL | string | Estimated completion time |
errors OPTIONAL | string[] | Any issues with this quote |
quoteId OPTIONAL | string | Unique quote identifier for reference |
availablePaymentMethods OPTIONAL | array | Payment methods available for this quote. Each entry has paymentTypeId, name, and icon |
Error Responses
| Code | HTTP | Message |
|---|---|---|
| OFFRAMP_QUOTES_FAILED | 500 | Failed to get sell quotes |
Examples
- cURL
- JavaScript
- Python
curl "https://api.zenpayz.com/payment/api/v1/off-ramp/quotes?source=btc_bitcoin&destination=usd&amount=0.01"
const params = new URLSearchParams({
source: 'btc_bitcoin',
destination: 'usd',
amount: '0.01',
});
const response = await fetch(
`https://api.zenpayz.com/payment/api/v1/off-ramp/quotes?${params}`
);
const { data: quotes } = await response.json();
const best = quotes.find(q => q.recommended) || quotes[0];
console.log(`You receive: $${best.outputAmount} for ${best.inputAmount} BTC`);
import requests
response = requests.get(
"https://api.zenpayz.com/payment/api/v1/off-ramp/quotes",
params={
"source": "btc_bitcoin",
"destination": "usd",
"amount": "0.01",
},
)
quotes = response.json()["data"]
best = next((q for q in quotes if q["recommended"]), quotes[0])
print(f"You receive: ${best['outputAmount']} for {best['inputAmount']} BTC")
Next Steps
- Sell Checkout -- Create a sell checkout with the selected quote
- Sell Rates -- Get rates for multiple fiat destinations