Transaction Limits
Transaction limits define the minimum and maximum amounts allowed for deposits and withdrawals in each currency. These limits help ensure compliance with regulatory requirements and manage risk.
Understanding Limits
Transaction limits are returned as part of the Exchange Rates API response. When you query an exchange rate, the response includes limit information for the source currency.
Limit Types
| Limit Type | Description |
|---|---|
min_deposit_amount | Minimum amount required for a deposit transaction |
max_deposit_amount | Maximum amount allowed for a deposit transaction |
min_withdrawal_amount | Minimum amount required for a withdrawal transaction |
max_withdrawal_amount | Maximum amount allowed for a withdrawal transaction |
Getting Limits
Limits are automatically included when you fetch an exchange rate:
curl -X GET "/api/v1/exchange-rates?quote_type=DEPOSIT&source_currency=USD&target_currency=NGN&amount=100.00"The response includes limit information:
{
"min_deposit_amount": "10.00",
"max_deposit_amount": "10000.00",
"min_withdrawal_amount": "50.00",
"max_withdrawal_amount": "5000.00"
}Limit Validation
Always validate transaction amounts against limits before creating quotes or transactions:
function validateAmount(rate, amount, transactionType) {
const amountFloat = parseFloat(amount);
if (transactionType === 'DEPOSIT') {
const min = parseFloat(rate.min_deposit_amount);
const max = parseFloat(rate.max_deposit_amount);
if (amountFloat < min) {
throw new Error(`Amount must be at least ${min} ${rate.source_currency}`);
}
if (amountFloat > max) {
throw new Error(`Amount cannot exceed ${max} ${rate.source_currency}`);
}
} else if (transactionType === 'WITHDRAWAL') {
const min = parseFloat(rate.min_withdrawal_amount);
const max = parseFloat(rate.max_withdrawal_amount);
if (amountFloat < min) {
throw new Error(`Amount must be at least ${min} ${rate.source_currency}`);
}
if (amountFloat > max) {
throw new Error(`Amount cannot exceed ${max} ${rate.source_currency}`);
}
}
return true;
}Best Practices
- Check Limits Early - Validate amounts against limits before showing rates to users
- Display Limits - Show users the applicable limits in your UI
- Handle Errors - Provide clear error messages when limits are exceeded
- Currency-Specific - Remember that limits are currency-specific and may vary
Next Steps
- Exchange Rates API - Get limits as part of exchange rate queries
- Create Quote - Create quotes with validated amounts
- Transactions API - Track transactions that comply with limits