Returns all possible connections between two chains.
curl --request GET \
--url https://li.quest/v1/connectionsimport requests
url = "https://li.quest/v1/connections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://li.quest/v1/connections', 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://li.quest/v1/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://li.quest/v1/connections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://li.quest/v1/connections")
.asString();require 'uri'
require 'net/http'
url = URI("https://li.quest/v1/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"connections": [
{
"fromChainId": 137,
"toChainId": 1,
"fromTokens": [
{
"address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
"chainId": 137
}
],
"toTokens": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"chainId": 1
},
{
"address": "0x0000000000000000000000000000000000000000",
"chainId": 1
}
]
}
]
}Connections
Returns all possible connections between two chains.
This endpoint gives information about all possible transfers between chains.
fromChain and toChain are required. Additional filters such as token, bridge, and exchange can be used to narrow the result further.
Information about which chains and tokens are supported can be taken from the response of the /v1/chains endpoint.
Information about which bridges and exchanges are supported can be taken from the response of the /v1/tools endpoint.
GET
/
v1
/
connections
Returns all possible connections between two chains.
curl --request GET \
--url https://li.quest/v1/connectionsimport requests
url = "https://li.quest/v1/connections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://li.quest/v1/connections', 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://li.quest/v1/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://li.quest/v1/connections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://li.quest/v1/connections")
.asString();require 'uri'
require 'net/http'
url = URI("https://li.quest/v1/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"connections": [
{
"fromChainId": 137,
"toChainId": 1,
"fromTokens": [
{
"address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
"chainId": 137
}
],
"toTokens": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"chainId": 1
},
{
"address": "0x0000000000000000000000000000000000000000",
"chainId": 1
}
]
}
]
}Headers
Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

