EVM chains and their policy
curl --request GET \
--url https://router.raze.bot/evm/chains \
--header 'x-api-key: <api-key>'import requests
url = "https://router.raze.bot/evm/chains"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://router.raze.bot/evm/chains', 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://router.raze.bot/evm/chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://router.raze.bot/evm/chains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://router.raze.bot/evm/chains")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.raze.bot/evm/chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"stage": "trading",
"runtime": "rust",
"eventSource": {
"selected": "rpc,raze",
"raze": {
"connected": true,
"reconnects": 0,
"messages": 27,
"events": 11,
"duplicates": 0,
"rejected": 0,
"subscriptions": 1,
"lastError": null,
"lastEventAgoMs": 38347,
"lagMs": 576,
"watched": 1
}
},
"chains": [
{
"slug": "base",
"chainId": 8453,
"name": "Base",
"nativeSymbol": "ETH",
"wrappedNative": "0x4200000000000000000000000000000000000006",
"status": "tradable",
"configured": {
"rpcHttp": true,
"rpcWs": true,
"rpcArchive": false
},
"capabilities": {
"quote": true,
"build": true,
"streaming": true
},
"hubs": [
{
"symbol": "WETH",
"address": "0x4200000000000000000000000000000000000006"
},
{
"symbol": "USDC",
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
],
"policy": {
"quoteTtlSecs": 15,
"deadlineSecs": 60,
"gasHeadroomPct": 120,
"minPriorityFeeWei": "1000000"
},
"stream": {
"connected": true,
"reconnects": 0,
"messages": 92,
"events": 92,
"duplicates": 0,
"rejected": 0,
"subscriptions": 2,
"lastError": null,
"lastEventAgoMs": 449,
"lagMs": 475
},
"lastRpcError": null
}
]
}{
"error": {
"code": "unauthorized",
"message": "missing or unknown API key (send it as x-api-key)"
}
}{
"error": {
"code": "rate_limited",
"message": "too many requests"
}
}EVM
EVM chains
Per chain: whether it can trade now (status, capabilities), the hub tokens routes go
through, and the policy quotes and builds follow: how long a quote can be built
(quoteTtlSecs), the swap’s deadline after the build (deadlineSecs), the gas headroom
over the simulated gas (gasHeadroomPct) and the least tip a build sets
(minPriorityFeeWei). stream, eventSource and lastRpcError describe the router’s own
feeds: read them for diagnosis, do not build on them.
GET
/
evm
/
chains
EVM chains and their policy
curl --request GET \
--url https://router.raze.bot/evm/chains \
--header 'x-api-key: <api-key>'import requests
url = "https://router.raze.bot/evm/chains"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://router.raze.bot/evm/chains', 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://router.raze.bot/evm/chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://router.raze.bot/evm/chains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://router.raze.bot/evm/chains")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.raze.bot/evm/chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"stage": "trading",
"runtime": "rust",
"eventSource": {
"selected": "rpc,raze",
"raze": {
"connected": true,
"reconnects": 0,
"messages": 27,
"events": 11,
"duplicates": 0,
"rejected": 0,
"subscriptions": 1,
"lastError": null,
"lastEventAgoMs": 38347,
"lagMs": 576,
"watched": 1
}
},
"chains": [
{
"slug": "base",
"chainId": 8453,
"name": "Base",
"nativeSymbol": "ETH",
"wrappedNative": "0x4200000000000000000000000000000000000006",
"status": "tradable",
"configured": {
"rpcHttp": true,
"rpcWs": true,
"rpcArchive": false
},
"capabilities": {
"quote": true,
"build": true,
"streaming": true
},
"hubs": [
{
"symbol": "WETH",
"address": "0x4200000000000000000000000000000000000006"
},
{
"symbol": "USDC",
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
}
],
"policy": {
"quoteTtlSecs": 15,
"deadlineSecs": 60,
"gasHeadroomPct": 120,
"minPriorityFeeWei": "1000000"
},
"stream": {
"connected": true,
"reconnects": 0,
"messages": 92,
"events": 92,
"duplicates": 0,
"rejected": 0,
"subscriptions": 2,
"lastError": null,
"lastEventAgoMs": 449,
"lagMs": 475
},
"lastRpcError": null
}
]
}{
"error": {
"code": "unauthorized",
"message": "missing or unknown API key (send it as x-api-key)"
}
}{
"error": {
"code": "rate_limited",
"message": "too many requests"
}
}policy holds the numbers quotes and builds follow on each chain: how long a quote can be built, the swap’s deadline, the gas headroom and the least tip a build sets. Guide: EVM swaps.Authorizations
ApiKeyHeaderBearerApiKeyQuery
⌘I