API latency and optimization guide
/quote
and /routes
/quote
for faster responses. It returns a single best route. It combines route finding and transaction generation into a single call which cuts down on client to server latency./routes
to retrieve multiple route options. Those calls are quite fast to show results to the user quickly. In order to execute one of the routes a call to/stepTransaction
is needed to generate the transaction data.false
. You pass the skipSimulation
flag as a query parameter to the /quote
or /stepTransaction
endpoint:
swapStepTimingStrategies
: applied when requesting same chain exchangesrouteTimingStrategies
: applied on the full route that can consist of multiple tools (e.g. swap+bridge)minWaitTime
existsWhen this strategy is applied, we give all tool 600ms (minWaitTimeMs) to return a result. If we received 4 or more (startingExpectedResults) results during this time we return those and don’t wait for other tools.
If less than 4 results are present we wait another 300ms and check if now at least 3 results are present.
POST /v1/advanced/routes
requests:
GET /v1/quote
requests: