Quote and build
curl --request GET \
--url https://partners.route.fun/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://partners.route.fun/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://partners.route.fun/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partners.route.fun/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://partners.route.fun/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://partners.route.fun/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://partners.route.fun/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"requestId": "6d9f7109-69a0-4312-8107-7a5dc680b669",
"ok": true,
"block": {
"number": "101501566",
"hash": "0x251cd5d09313d0798e680f8d2daa4e70c1db7feb2d0521127c2b60c8743473b5"
},
"tokenIn": "0x5fc5360d0400a0fd4f2af552add042d716f1d168",
"tokenOut": "0x0000000000000000000000000000000000000000",
"amountIn": "25000000",
"amountOut": "11165741529706251",
"gas": "208324",
"gasCostOut": "4170229832000",
"netOut": "11161571299874251",
"tx": {
"to": "0x15dbb64b42eabe52a6ddc377e966f408756815be",
"data": "0x16c7ad17...",
"value": "0",
"chainId": 4663
},
"swap": {
"amountOut": "11165741529706251",
"fee": "2233148305941",
"feeBps": 2,
"netOut": "11163508381400310",
"minOut": "11107302083920371",
"deadline": 1793340251,
"recipient": "0x000000000000000000000000000000000000dead",
"executorGas": "443051",
"spender": "0x15dbb64b42eabe52a6ddc377e966f408756815be",
"executor": "entry"
},
"fee": {
"bps": 2,
"amount": "2233148305941",
"partnerBps": 0,
"partnerAmount": "0",
"amountOutAfterFees": "11163508381400310"
},
"swaps": [
{
"pool": "0x16679e2ac1a798865ecf1c1639e67693ddb1c220",
"source": "solidly-cl:0x1ac9db4a2608ba45d6127b1737949b51bb54b7f3",
"kind": "v3",
"tokenIn": "0x5fc5360d0400a0fd4f2af552add042d716f1d168",
"tokenOut": "0x0bd7d308f8e1639fab988df18a8011f41eacad73",
"amountIn": "25000000",
"amountOut": "11165350742430266"
}
]
}Swaps
Quote and build
Without recipient: the best route and output. With recipient: also tx (the unsigned transaction) and swap (the
terms it enforces). A transaction is returned only after it was run through Route’s contract at the quote block.
A partner key gets 400 Parameter not available for this key: <name> for any parameter it may not send. The public tier
drops parameters it does not support. With stream, the response is text/event-stream (see Streaming quotes).
GET
/
quote
Quote and build
curl --request GET \
--url https://partners.route.fun/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://partners.route.fun/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://partners.route.fun/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partners.route.fun/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://partners.route.fun/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://partners.route.fun/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://partners.route.fun/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"requestId": "6d9f7109-69a0-4312-8107-7a5dc680b669",
"ok": true,
"block": {
"number": "101501566",
"hash": "0x251cd5d09313d0798e680f8d2daa4e70c1db7feb2d0521127c2b60c8743473b5"
},
"tokenIn": "0x5fc5360d0400a0fd4f2af552add042d716f1d168",
"tokenOut": "0x0000000000000000000000000000000000000000",
"amountIn": "25000000",
"amountOut": "11165741529706251",
"gas": "208324",
"gasCostOut": "4170229832000",
"netOut": "11161571299874251",
"tx": {
"to": "0x15dbb64b42eabe52a6ddc377e966f408756815be",
"data": "0x16c7ad17...",
"value": "0",
"chainId": 4663
},
"swap": {
"amountOut": "11165741529706251",
"fee": "2233148305941",
"feeBps": 2,
"netOut": "11163508381400310",
"minOut": "11107302083920371",
"deadline": 1793340251,
"recipient": "0x000000000000000000000000000000000000dead",
"executorGas": "443051",
"spender": "0x15dbb64b42eabe52a6ddc377e966f408756815be",
"executor": "entry"
},
"fee": {
"bps": 2,
"amount": "2233148305941",
"partnerBps": 0,
"partnerAmount": "0",
"amountOutAfterFees": "11163508381400310"
},
"swaps": [
{
"pool": "0x16679e2ac1a798865ecf1c1639e67693ddb1c220",
"source": "solidly-cl:0x1ac9db4a2608ba45d6127b1737949b51bb54b7f3",
"kind": "v3",
"tokenIn": "0x5fc5360d0400a0fd4f2af552add042d716f1d168",
"tokenOut": "0x0bd7d308f8e1639fab988df18a8011f41eacad73",
"amountIn": "25000000",
"amountOut": "11165350742430266"
}
]
}The one call for quotes and swap transactions. Guides: build and execute, fees,
streaming, exclude, prefer and JIT, vault zaps,
gasless. Other EVM chains: the same call under a chain prefix.
Authorizations
Headers
Query Parameters
Response
Route found (and transaction built, if recipient was set).