Get a quote
Price amount_in of from into to across the available venues. Use the returned id as quote_id when creating an order, before the quote’s expires_at.
Set format to formatted (the default) for decimal amounts and asset names such as bitcoin.btc, or raw for base-unit amounts and canonical asset identifiers. See the token list for registered asset names.
Choose optimal quoting for up to 10 seconds per venue, or fast for a 1.5-second cutoff. Set include_candidates for debugging details. Use either venue_allowlist or venue_blocklist to control which venues are considered.
To charge your own fee on the trade, set integrator_fee_bps and integrator_fee_recipient. See integrator fees.
Request example
const response = await fetch("https://api.rift.trade/quote", {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
format: "formatted",
from: "bitcoin.btc",
to: "ethereum.usdc",
amount_in: "0.01",
}),
});
const data = await response.json();
console.log(data);Parameters
Required parameters
fromstringAsset to sell, as <chain>.<asset>. The chain is a name (ethereum,
base, arbitrum, robinhood, ink, bitcoin, hyperliquid) or
evm:<chain id>. The asset is a symbol, a contract address, or eth
and btc for the native coin. Case does not matter.
tostringAsset to receive, in the same form as from.
amount_instringAmount of from to sell. A decimal in the asset's own units when
format is formatted, an integer in base units when raw.
Optional parameters
x-api-keystringheaderYour API key. Quotes made with it are attributed to your integrator id, whatever integrator_id the request sends, and held to its rate.
formatstringHow amounts and asset names are written in this request and in the
response. formatted writes amounts as decimals in the asset's own
units and assets as <chain name>.<symbol>; raw writes amounts as
base-unit integers and assets in canonical form, evm:<chain id>.<address>
on EVM chains. Defaults to formatted. Key on assets with raw: symbols
are presentation and may be reassigned.
Allowed: "raw""formatted"
Default: "formatted"
venue_allowliststring[]Quote only these venues. Empty means every venue. Cannot be combined
with venue_blocklist.
Default: []
Show child attributes
string · "aave", "across", "cctp", "chainflip", "cowswap", "euler", "flytrade", "hyperliquid", "kyberswap", "lifi", "mayan", "metric", "morpho", "near_intents", "nordstern", "okx", "relay", "rift_otc", "transit", "tydro", "ultrayield", "uniswap", "unit", "velora", "weth_contract", "xstocks"
venue_blockliststring[]Never quote these venues. Cannot be combined with venue_allowlist.
Default: []
Show child attributes
string · "aave", "across", "cctp", "chainflip", "cowswap", "euler", "flytrade", "hyperliquid", "kyberswap", "lifi", "mayan", "metric", "morpho", "near_intents", "nordstern", "okx", "relay", "rift_otc", "transit", "tydro", "ultrayield", "uniswap", "unit", "velora", "weth_contract", "xstocks"
quote_modestringoptimal gives every venue up to 10 seconds to answer, fast cuts
each one off at 1.5 seconds. Defaults to optimal.
Allowed: "fast""optimal"
Default: "optimal"
include_candidatesbooleanInclude every venue and route that was considered under
quote_candidates. Large, meant for debugging.
Default: false
integrator_idstring | nullIdentifies the integrator sending the request, for attribution.
Optional; 1 to 64 characters of letters, digits, ., _ and -.
Echoed in the quote and carried onto the order created from it. When
x-api-key is set, the key's integrator takes its place.
Default: null
Show child attributes
Any of: string 1
string
Any of: null 2
null
integrator_fee_bpsinteger | nullShare of the output paid to integrator_fee_recipient, in basis
points from 1 (0.01%) to 1000 (10%). Set together with
integrator_fee_recipient, or not at all.
Default: null
Show child attributes
Any of: integer 1
integer
Any of: null 2
null
integrator_fee_recipientstring | nullAddress on the to chain that receives the integrator fee. Set
together with integrator_fee_bps, or not at all.
Default: null
Show child attributes
Any of: string 1
string
Any of: null 2
null
Responses
The best executable quote
application/json
{
"id": "019a3c7e-5b1a-7c3e-9a51-6f3d2b8e4a10",
"from": "bitcoin.btc",
"to": "ethereum.usdc",
"amount_in": "0.01",
"estimated_amount_out": "997.130102",
"estimated_execution_cost": "1.38421",
"route": [
{
"type": "venue",
"venue": "chainflip",
"execution": {
"mode": "bitcoin"
},
"from": "bitcoin.btc",
"to": "ethereum.usdc",
"amount_in": "0.01",
"amount_out": "998.514312"
},
{
"type": "delivery",
"amount_in": "998.514312",
"execution_cost": "1.38421",
"integrator_fee": "0",
"amount_out": "997.130102"
}
],
"expires_at": "2026-10-31T19:10:00Z",
"venue_allowlist": [],
"venue_blocklist": [],
"integrator_fee_bps": null,
"integrator_fee_recipient": null,
"format": "formatted",
"integrator_id": null
}formatstringrequiredThe format every amount and asset name in this response is written in.
Allowed: "raw""formatted"
idstringrequiredIdentifier to pass as quote_id when creating the order.
uuid
fromstringrequiredAsset sold, written per format.
tostringrequiredAsset received, written per format.
amount_instringrequiredThe amount quoted, echoed in format.
estimated_amount_outstringrequiredExpected amount of to delivered to the order's to_address, after
every venue and delivery cost and the integrator fee: the amount_out
of the route's delivery step.
estimated_execution_coststringrequiredThe network fees the router pays to execute the order, in to.
routeobject[]requiredThe route in execution order: a venue step for each venue leg, then
the delivery step into to_address.
Show child attributes
One of: venue
A venue leg.
venuestringrequiredVenue that executes this step.
Allowed: "aave""across""across_swap""cctp_fast""cctp_hyperliquid_fast""cctp_hyperliquid_standard""cctp_standard""chainflip""cowswap""euler""flytrade""hyperliquid_spot""kyberswap""lifi_fast""lifi_standard""mayan""mayan_swap""metric""morpho""nordstern""near_intents""okx""relay""rift_otc""transit""tydro""ultrayield_deposit""ultrayield_withdrawal""uniswap""unit""velora""weth_contract""xstocks"
executionobjectrequiredHow the step runs: on Bitcoin, on an EVM chain with vault-funded gas, on an EVM chain with router-funded gas, or on HyperCore.
Show child attributes
One of: bitcoin
Runs on Bitcoin.
modestringrequiredValue: "bitcoin"
One of: evm
Runs on an EVM chain.
chainintegerrequiredEVM chain id.
int32
modestringrequiredValue: "evm"
One of: hyperliquid
Runs on HyperCore.
modestringrequiredValue: "hyperliquid"
fromstringrequiredAsset entering the step, written per format.
tostringrequiredAsset leaving the step, written per format.
amount_instringrequiredAmount of from entering the step: the quote's amount_in for the
first step, the previous step's amount_out after that. A step on
Bitcoin or HyperCore pays its chain's own fee out of it (the Bitcoin
miner fee, the HyperCore account activation) before the venue trades
the rest, so its rate includes that fee.
amount_outstringrequiredAmount of to leaving the step, handed to the next step or to the
delivery.
typestringrequiredValue: "venue"
One of: delivery
The transfer of the route's output into to_address. Always the last
step.
amount_instringrequiredAmount of to handed to delivery: the last venue step's amount_out.
execution_coststringrequiredThe network fees the router pays to execute the order, in to.
integrator_feestringrequiredAmount of to paid to integrator_fee_recipient: integrator_fee_bps
of amount_in less execution_cost, rounded down. Zero without a fee,
and when the recipient cannot receive it: below a Bitcoin output's dust
floor, or a HyperCore address with no account.
amount_outstringrequiredAmount that arrives at to_address. This is estimated_amount_out.
typestringrequiredValue: "delivery"
expires_atstringrequiredInstant after which the quote is refused on order creation.
date-time
venue_allowliststring[]requiredVenues quoting was restricted to; empty when it was not.
Show child attributes
string · "aave", "across", "cctp", "chainflip", "cowswap", "euler", "flytrade", "hyperliquid", "kyberswap", "lifi", "mayan", "metric", "morpho", "near_intents", "nordstern", "okx", "relay", "rift_otc", "transit", "tydro", "ultrayield", "uniswap", "unit", "velora", "weth_contract", "xstocks"
venue_blockliststring[]requiredVenues excluded from quoting; empty when none were.
Show child attributes
string · "aave", "across", "cctp", "chainflip", "cowswap", "euler", "flytrade", "hyperliquid", "kyberswap", "lifi", "mayan", "metric", "morpho", "near_intents", "nordstern", "okx", "relay", "rift_otc", "transit", "tydro", "ultrayield", "uniswap", "unit", "velora", "weth_contract", "xstocks"
integrator_fee_bpsinteger | nullThe integrator_fee_bps the quote was asked with, or null.
Show child attributes
Any of: integer 1
integer
Any of: null 2
null
integrator_fee_recipientstring | nullThe integrator_fee_recipient the quote was asked with, or null.
Show child attributes
Any of: string 1
string
Any of: null 2
null
integrator_idstring | nullThe integrator the quote is attributed to: the API key's when
x-api-key was set, otherwise the request's integrator_id, or null.
Show child attributes
Any of: string 1
string
Any of: null 2
null
quote_candidatesobject | nullEvery venue and route considered, with timings and failures. Present
only when include_candidates was set.
Show child attributes
Any of: object 1
Everything the quoter considered, for debugging. Direct venues under
single_hop, multi-venue routes under multi_hop.
single_hopobjectrequiredThe venues able to quote the pair directly and what each answered.
Show child attributes
setup_errorstring | nullWhy no direct venue was asked, when execution costs could not be
priced: pricing timed out, pricing unavailable for <asset> (a
temporary outage) or no price available for <asset> (the asset has
no price).
candidatesobject[]requiredOne entry per venue able to quote the pair directly.
Show child attributes
venuestringrequiredThe venue able to quote the pair directly.
Allowed: "aave""across""across_swap""cctp_fast""cctp_hyperliquid_fast""cctp_hyperliquid_standard""cctp_standard""chainflip""cowswap""euler""flytrade""hyperliquid_spot""kyberswap""lifi_fast""lifi_standard""mayan""mayan_swap""metric""morpho""nordstern""near_intents""okx""relay""rift_otc""transit""tydro""ultrayield_deposit""ultrayield_withdrawal""uniswap""unit""velora""weth_contract""xstocks"
elapsed_msintegerrequiredMilliseconds until the venue answered or was cut off.
uint64 · min: 0
bestbooleanrequiredWhether this candidate is the quote that was returned.
One of: quoted
The venue answered; quote is the costed result and costing_audit
the raw answer it was derived from.
quoteobjectrequiredThe priced route shared by the quote response and every candidate.
Show child attributes
idstringrequiredIdentifier to pass as quote_id when creating the order.
uuid
fromstringrequiredAsset sold, written per format.
tostringrequiredAsset received, written per format.
amount_instringrequiredThe amount quoted, echoed in format.
estimated_amount_outstringrequiredExpected amount of to delivered to the order's to_address, after
every venue and delivery cost and the integrator fee: the amount_out
of the route's delivery step.
estimated_execution_coststringrequiredThe network fees the router pays to execute the order, in to.
routeobject[]requiredThe route in execution order: a venue step for each venue leg, then
the delivery step into to_address.
Show child attributes
See the OpenAPI specification for the complete schema.
expires_atstringrequiredInstant after which the quote is refused on order creation.
date-time
venue_allowliststring[]requiredVenues quoting was restricted to; empty when it was not.
Show child attributes
See the OpenAPI specification for the complete schema.
venue_blockliststring[]requiredVenues excluded from quoting; empty when none were.
Show child attributes
See the OpenAPI specification for the complete schema.
integrator_fee_bpsinteger | nullThe integrator_fee_bps the quote was asked with, or null.
Show child attributes
Any of: integer 1
See the OpenAPI specification for the complete schema.
Any of: null 2
See the OpenAPI specification for the complete schema.
integrator_fee_recipientstring | nullThe integrator_fee_recipient the quote was asked with, or null.
Show child attributes
Any of: string 1
See the OpenAPI specification for the complete schema.
Any of: null 2
See the OpenAPI specification for the complete schema.
costing_auditobjectrequiredThe venue's raw answer before execution costs were applied.
Show child attributes
venuestringrequiredThe venue that answered.
Allowed: "aave""across""across_swap""cctp_fast""cctp_hyperliquid_fast""cctp_hyperliquid_standard""cctp_standard""chainflip""cowswap""euler""flytrade""hyperliquid_spot""kyberswap""lifi_fast""lifi_standard""mayan""mayan_swap""metric""morpho""nordstern""near_intents""okx""relay""rift_otc""transit""tydro""ultrayield_deposit""ultrayield_withdrawal""uniswap""unit""velora""weth_contract""xstocks"
observed_amount_instringrequiredAmount the venue was asked to price.
observed_amount_outstringrequiredAmount the venue said it would return for it.
statusstringrequiredValue: "quoted"
One of: failed
The venue refused or errored.
errorstringrequiredstatusstringrequiredValue: "failed"
One of: timed_out
The venue did not answer within the quote_mode deadline.
statusstringrequiredValue: "timed_out"
One of: not_asked
The venue was never asked because execution costs could not be
priced; single_hop.setup_error says why.
statusstringrequiredValue: "not_asked"
multi_hopobjectrequiredThe graph search over intermediate assets and its outcome.
Show child attributes
hopsinteger | nullFewest venue steps of any path. Null when no path exists.
uint · min: 0
pathsintegerrequiredNumber of candidate paths found, up to the hop limit.
uint · min: 0
completebooleanrequiredWhether every path was enumerated, false when the search hit its limit.
setup_errorstring | nullWhy execution costs could not be priced, when that left no route
quoted, in the same words as single_hop.setup_error.
rankobject | nullHow the paths were ranked before the best of them were quoted live. Absent when no path exists or execution costs could not be priced.
Show child attributes
Any of: object 1
The estimates the paths were ranked by.
elapsed_msintegerrequiredMilliseconds the ranking took.
uint64 · min: 0
edgesobject[]requiredEvery step any path takes, estimated once at the quote's value in the step's input asset.
Show child attributes
fromstringrequiredAsset entering the step, written per format.
tostringrequiredAsset leaving the step, written per format.
amount_instring | nullThe amount the step was estimated for. Absent when the quote's value
could not be converted into from.
venuestring | nullThe venue whose answer estimated the step. Absent when no venue did.
Show child attributes
Any of: string 1
See the OpenAPI specification for the complete schema.
Any of: null 2
See the OpenAPI specification for the complete schema.
amount_outstring | nullEstimated amount of to leaving the step, handed to the next step or
to delivery.
sampled_atinteger | nullUnix time the cached answer behind the estimate was sampled. Absent when the venue was asked live.
uint64 · min: 0
attemptsobject[]Every venue ranking asked for the step, with its answer. Absent when ranking asked none.
Show child attributes
See the OpenAPI specification for the complete schema.
routesobject[]requiredThe best-ranked paths, best first, at most 20.
Show child attributes
assetsstring[]requiredThe assets along the path, from from to to, written per format.
Show child attributes
See the OpenAPI specification for the complete schema.
venuesstring[][]requiredThe venues that can serve each step, in order.
Show child attributes
See the OpenAPI specification for the complete schema.
estimated_amount_outstringrequiredEstimated amount of to delivered to the order's to_address, after
every venue and delivery cost.
confirmedbooleanrequiredWhether the path was quoted live. Its result is under routes when
every step answered, and its failed step under attempts otherwise.
Any of: null 2
null
attemptsobject[]requiredEvery venue quote requested while confirming the best-ranked paths.
Show child attributes
roundintegerrequiredPosition of the hop in the route, counted from zero.
uint · min: 0
fromstringrequiredAsset entering the hop, written per format.
tostringrequiredAsset leaving the hop, written per format.
amount_instringrequiredAmount the hop was priced for.
venuestringrequiredThe venue asked.
Allowed: "aave""across""across_swap""cctp_fast""cctp_hyperliquid_fast""cctp_hyperliquid_standard""cctp_standard""chainflip""cowswap""euler""flytrade""hyperliquid_spot""kyberswap""lifi_fast""lifi_standard""mayan""mayan_swap""metric""morpho""nordstern""near_intents""okx""relay""rift_otc""transit""tydro""ultrayield_deposit""ultrayield_withdrawal""uniswap""unit""velora""weth_contract""xstocks"
elapsed_msintegerrequiredMilliseconds until the venue answered or was cut off.
uint64 · min: 0
One of: quoted
The venue answered; step is the costed hop.
stepobjectrequiredOne venue leg of the route.
Show child attributes
venuestringrequiredVenue that executes this step.
Allowed: "aave""across""across_swap""cctp_fast""cctp_hyperliquid_fast""cctp_hyperliquid_standard""cctp_standard""chainflip""cowswap""euler""flytrade""hyperliquid_spot""kyberswap""lifi_fast""lifi_standard""mayan""mayan_swap""metric""morpho""nordstern""near_intents""okx""relay""rift_otc""transit""tydro""ultrayield_deposit""ultrayield_withdrawal""uniswap""unit""velora""weth_contract""xstocks"
executionobjectrequiredHow the step runs: on Bitcoin, on an EVM chain with vault-funded gas, on an EVM chain with router-funded gas, or on HyperCore.
Show child attributes
One of: bitcoin
Runs on Bitcoin.
See the OpenAPI specification for the complete schema.
One of: evm
Runs on an EVM chain.
See the OpenAPI specification for the complete schema.
One of: hyperliquid
Runs on HyperCore.
See the OpenAPI specification for the complete schema.
fromstringrequiredAsset entering the step, written per format.
tostringrequiredAsset leaving the step, written per format.
amount_instringrequiredAmount of from entering the step: the quote's amount_in for the
first step, the previous step's amount_out after that. A step on
Bitcoin or HyperCore pays its chain's own fee out of it (the Bitcoin
miner fee, the HyperCore account activation) before the venue trades
the rest, so its rate includes that fee.
amount_outstringrequiredAmount of to leaving the step, handed to the next step or to the
delivery.
statusstringrequiredValue: "quoted"
One of: failed
The venue refused or errored.
errorstringrequiredstatusstringrequiredValue: "failed"
One of: timed_out
The venue did not answer within the deadline.
statusstringrequiredValue: "timed_out"
routesobject[]requiredEach complete path and whether it produced a quote.
Show child attributes
venuesstring[]requiredThe venue of each hop, in order.
Show child attributes
string · "aave", "across", "across_swap", "cctp_fast", "cctp_hyperliquid_fast", "cctp_hyperliquid_standard", "cctp_standard", "chainflip", "cowswap", "euler", "flytrade", "hyperliquid_spot", "kyberswap", "lifi_fast", "lifi_standard", "mayan", "mayan_swap", "metric", "morpho", "nordstern", "near_intents", "okx", "relay", "rift_otc", "transit", "tydro", "ultrayield_deposit", "ultrayield_withdrawal", "uniswap", "unit", "velora", "weth_contract", "xstocks"
assetsstring[]requiredThe assets along the path, from from to to, written per format.
Show child attributes
string
bestbooleanrequiredWhether this route is the quote that was returned.
One of: quoted
Every hop quoted; quote is the costed route.
quoteobjectrequiredThe priced route shared by the quote response and every candidate.
Show child attributes
idstringrequiredIdentifier to pass as quote_id when creating the order.
uuid
fromstringrequiredAsset sold, written per format.
tostringrequiredAsset received, written per format.
amount_instringrequiredThe amount quoted, echoed in format.
estimated_amount_outstringrequiredExpected amount of to delivered to the order's to_address, after
every venue and delivery cost and the integrator fee: the amount_out
of the route's delivery step.
estimated_execution_coststringrequiredThe network fees the router pays to execute the order, in to.
routeobject[]requiredThe route in execution order: a venue step for each venue leg, then
the delivery step into to_address.
Show child attributes
See the OpenAPI specification for the complete schema.
expires_atstringrequiredInstant after which the quote is refused on order creation.
date-time
venue_allowliststring[]requiredVenues quoting was restricted to; empty when it was not.
Show child attributes
See the OpenAPI specification for the complete schema.
venue_blockliststring[]requiredVenues excluded from quoting; empty when none were.
Show child attributes
See the OpenAPI specification for the complete schema.
integrator_fee_bpsinteger | nullThe integrator_fee_bps the quote was asked with, or null.
Show child attributes
Any of: integer 1
See the OpenAPI specification for the complete schema.
Any of: null 2
See the OpenAPI specification for the complete schema.
integrator_fee_recipientstring | nullThe integrator_fee_recipient the quote was asked with, or null.
Show child attributes
Any of: string 1
See the OpenAPI specification for the complete schema.
Any of: null 2
See the OpenAPI specification for the complete schema.
statusstringrequiredValue: "quoted"
One of: failed
A hop failed; error is what stopped the route.
errorstringrequiredstatusstringrequiredValue: "failed"
Any of: null 2
null

