Get Buy Rates
Get exchange rates for multiple crypto destinations at once. Returns the best available rate per destination -- simpler than quotes when you just need pricing.
GET
https://api.zenpayz.com/payment/api/v1/on-ramp/ratesBearer · 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 | Fiat currency (e.g. usd) |
destinations REQUIRED | string | Comma-separated crypto IDs (e.g. btc_bitcoin,eth_ethereum) |
paymentMethod OPTIONAL | string | Filter by payment method |
country OPTIONAL | string | ISO country code |
amount OPTIONAL | string | Reference amount (default: 100) |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"source": "usd",
"destination": "btc_bitcoin",
"rate": 89285.71,
"paymentMethod": "creditcard",
"networkFee": 0.5,
"transactionFee": 3.99,
"minAmount": 20,
"maxAmount": 10000,
"timestamp": "2026-03-11T04:44:00.000Z"
},
{
"source": "usd",
"destination": "eth_ethereum",
"rate": 3200.50,
"paymentMethod": "creditcard",
"networkFee": 0.3,
"transactionFee": 3.99,
"minAmount": 20,
"maxAmount": 10000,
"timestamp": "2026-03-11T04:44:00.000Z"
}
],
"message": "Rates retrieved"
}
Response Fields
| Parameter | Type | Description |
|---|---|---|
source OPTIONAL | string | Fiat currency |
destination OPTIONAL | string | Crypto asset ID |
rate OPTIONAL | number | Exchange rate |
paymentMethod OPTIONAL | string | Best payment method for this rate |
networkFee OPTIONAL | number | Blockchain network fee |
transactionFee OPTIONAL | number | Processing fee |
minAmount OPTIONAL | number | Minimum allowed amount |
maxAmount OPTIONAL | number | Maximum allowed amount |
timestamp OPTIONAL | string | ISO 8601 timestamp |
Error Responses
| Code | HTTP | Message |
|---|---|---|
| RAMP_RATES_FAILED | 500 | Failed to get buy rates |
Examples
- cURL
- JavaScript
- Python
curl "https://api.zenpayz.com/payment/api/v1/on-ramp/rates?source=usd&destinations=btc_bitcoin,eth_ethereum,usdt_tron"
const params = new URLSearchParams({
source: 'usd',
destinations: 'btc_bitcoin,eth_ethereum,usdt_tron',
});
const response = await fetch(
`https://api.zenpayz.com/payment/api/v1/on-ramp/rates?${params}`
);
const { data: rates } = await response.json();
rates.forEach(r => {
console.log(`${r.destination}: ${r.rate} (fee: $${r.networkFee + r.transactionFee})`);
});
import requests
response = requests.get(
"https://api.zenpayz.com/payment/api/v1/on-ramp/rates",
params={
"source": "usd",
"destinations": "btc_bitcoin,eth_ethereum,usdt_tron",
},
)
rates = response.json()["data"]
for r in rates:
print(f"{r['destination']}: {r['rate']} (fee: ${r['networkFee'] + r['transactionFee']})")
Next Steps
- Buy Quotes -- Get detailed quotes with multiple options per pair
- Buy Prices -- Get simple price-per-unit