Quotes
Get real-time pricing and exchange rates for transfers across traditional banking, mobile money, and cryptocurrency networks. Quotes provide transparent fee breakdowns, foreign exchange rates, and amount calculations for any supported rail-to-rail combination.
Overview
Quotes calculate pricing for transfers between any two payment rails, whether you're sending a specific amount or ensuring the recipient receives an exact amount. The API supports bidirectional quoting - specify either the source amount you want to send or the destination amount the recipient should receive.
Key Features:
- Bidirectional pricing - Quote by send amount or receive amount
- Multi-rail support - Any combination of bank, mobile money, and crypto rails
- Real-time rates - Live foreign exchange rates with transparent markup
- Dual-sided fees - Separate fee calculations for source and destination rails
- Time-bound validity - Quotes expire after 2 minutes to ensure rate accuracy
Create Quote
Generate a price quote for transfers between two payment rails with specified currencies and amounts.
POST /transfers/quote
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
source | object | ✅ | Source rail configuration |
destination | object | ✅ | Destination rail configuration |
Rail Configuration
Each rail configuration (source and destination) requires:
Field | Type | Required | Description |
---|---|---|---|
rail | string | ✅ | Payment rail identifier |
currency | string | ✅ | ISO 4217 currency code or crypto symbol |
amount | decimal | ✅ | Transfer amount (specify in source OR destination, not both) |
💡 Amount Specification: Provide the amount in either the source or destination configuration, with the other set to
0
. The API prioritizes source amounts - if both amounts are provided, the source amount will be used for the quote calculation.
For available rails and currencies, see the Rails and Channels documentation.
Send Amount Quote
Quote based on how much you want to send:
curl -X POST https://api.due.network/v1/transfers/quote \
-H "Authorization: Bearer your_api_key" \
-H "Due-Account-Id: your_account_id" \
-H "Content-Type: application/json" \
-d '{
"source": {
"rail": "ethereum",
"currency": "USDC",
"amount": "1000.00"
},
"destination": {
"rail": "sepa",
"currency": "EUR",
"amount": "0"
}
}'
Receive Amount Quote
Quote based on how much the recipient should receive:
curl -X POST https://api.due.network/v1/transfers/quote \
-H "Authorization: Bearer your_api_key" \
-H "Due-Account-Id: your_account_id" \
-H "Content-Type: application/json" \
-d '{
"source": {
"rail": "ach",
"currency": "USD",
"amount": "0"
},
"destination": {
"rail": "bank_africa",
"currency": "NGN",
"amount": "500000.00"
}
}'
Quote Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"source": {
"rail": "ethereum",
"currency": "USDC",
"amount": "1000.00",
"fee": "0.00"
},
"destination": {
"rail": "sepa",
"currency": "EUR",
"amount": "924.50",
"fee": "3.33"
},
"fxRate": 0.9278,
"fxMarkup": 50,
"expiresAt": "2024-03-15T10:32:15Z"
}
Response Fields
Field | Type | Description |
---|---|---|
token | string | JWT token representing this quote for transfer creation |
source | object | Source rail pricing details |
destination | object | Destination rail pricing details |
fxRate | number | Foreign exchange rate applied |
fxMarkup | integer | FX markup in basis points (bps) |
expiresAt | string | ISO 8601 timestamp when quote expires |
Rail Pricing Details
Field | Type | Description |
---|---|---|
rail | string | Payment rail identifier |
currency | string | Currency code |
amount | decimal | Calculated amount for this side |
fee | decimal | Rail-specific fees in the rail's currency |
Quote Expiration
Quotes are valid for 2 minutes from creation to ensure pricing accuracy, especially for volatile cryptocurrency and foreign exchange rates.
Best Practices:
- Create quotes as close to transfer execution as possible
- Monitor the
expiresAt
timestamp in your application - Request new quotes if the current quote has expired
- For crypto transfers, account for potential network congestion affecting timing
Expired Quote Handling:
If you attempt to create a transfer with an expired quote token, you'll receive a validation error requiring a fresh quote.
Error Responses
Channel Not Found (404)
{
"statusCode": 404,
"message": "Channel not found",
"code": "err_channel_not_found"
}
Amount Below Fee Threshold (400)
{
"statusCode": 400,
"message": "Fees exceeded the estimated quote. Please try again with a higher amount",
"code": "err_quote_limit_below_fee"
}
Updated 4 days ago