Quotes
Estimate how much a user will receive for a given input amount. Always quote before showing a number — rates and minimums move with market conditions.
Request body
Name Type Required Description fromstring required Lowercase payin currency ticker. tostring required Lowercase payout currency ticker. amountFromstring required Decimal string (e.g. `"0.01"`). The amount the user will send. modestring optional Defaults to `"float"`. `"fixed"` is on the [roadmap](/docs/roadmap) and currently returns 400.
Example
const res = await fetch ( `${ BASE }/v1/quotes` , {
method: 'POST' ,
headers: { 'Authorization' : AUTH , 'Content-Type' : 'application/json' },
body: JSON . stringify ({ from: 'btc' , to: 'eth' , amountFrom: '0.01' }),
});
const { quote } = await res. json ();
console. log ( `User receives ~${ quote . amountUserReceives } ${ quote . to }` );
Response
{
"quote" : {
"from" : "btc" ,
"to" : "eth" ,
"amountFrom" : "0.01" ,
"amountTo" : "0.1532" ,
"networkFee" : "0.0021" ,
"amountUserReceives" : "0.1511" ,
"rate" : "15.32" ,
"fee" : "0.001" ,
"min" : "0.0008" ,
"max" : "5.0" ,
"mode" : "float"
}
}
Response fields
Name Type Description amountTostring Estimated payout **before** subtracting `networkFee`. networkFeestring On-chain fee for the outbound transfer, in the payout currency. amountUserReceivesstring The number to display to the user. Equal to `amountTo - networkFee`. We compute this for you so the math is right. ratestring Exchange rate used (before fees). feestring Liquidity provider fee in the payout currency. minstring Minimum payin for this pair. maxstring Maximum payin for this pair. modestring Always `"float"` in v1.
Notes
Always show amountUserReceives as the headline number. Showing raw amountTo over-promises by networkFee.
Quotes are indicative , not locked. The final amount on POST /v1/swaps may differ slightly because we re-quote at swap creation time.
For locked rates, fixed-rate mode is on the roadmap .
Errors
Type / code When validation_error (amount_below_min, HTTP 400, param: amountFrom)amountFrom is below the pair's minimum. Error message includes the minimum.validation_error (amount_above_max, HTTP 400, param: amountFrom)amountFrom is above the pair's maximum. Error message includes the maximum.validation_error (pair_unsupported, HTTP 400, param: pair)The from/to pair is not currently available for float-rate quotes. validation_error (field: 'mode')mode: 'fixed' — not supported in v1.validation_error (other)Missing field or invalid currency. authentication_error (unauthenticated)Missing/invalid Authorization header. rate_limit_error (rate_limited)Per-credential limit exceeded. See Rate limits . upstream_error (provider_credential_pending, HTTP 503)Your dedicated liquidity key is still being activated. Quotes will succeed once activation completes. upstream_error (upstream_empty_quote, HTTP 502)Genuine upstream issue (rare — usually amount_below_min / amount_above_max is returned instead when our pair-bounds lookup succeeds). Back off and retry. upstream_error (other)Generic liquidity-layer issue. Back off and retry.