cURL
curl https://api.relayer.fi/v1/action/tokens/base/uniswap \
-H "Authorization: ApiKey $RELAYER_API_KEY"const response = await fetch(`https://api.relayer.fi/v1/action/tokens/base/uniswap`, {
headers: { Authorization: `ApiKey ${process.env.RELAYER_API_KEY}` },
});
// Returns the protocol's token list for the chain — useful for hydrating
// dropdowns in custom widget UIs.import requests
url = "https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}', 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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}",
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: <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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyWidget Actions
Retrieve protocol token list for a chain
Returns the token list for a given protocol on a specific chain. Use ‘all’ for the chain parameter to fetch tokens on every supported chain.
GET
/
action
/
tokens
/
{chain}
/
{protocol}
cURL
curl https://api.relayer.fi/v1/action/tokens/base/uniswap \
-H "Authorization: ApiKey $RELAYER_API_KEY"const response = await fetch(`https://api.relayer.fi/v1/action/tokens/base/uniswap`, {
headers: { Authorization: `ApiKey ${process.env.RELAYER_API_KEY}` },
});
// Returns the protocol's token list for the chain — useful for hydrating
// dropdowns in custom widget UIs.import requests
url = "https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}', 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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}",
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: <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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/action/tokens/{chain}/{protocol}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Use this format: ApiKey <your_api_key>
Path Parameters
Chain identifier. Accepts numeric chain IDs (e.g. '43114'), chain slugs (e.g. 'avalanche'), or 'all' to fetch every supported chain.
Example:
"all"
DEX protocol identifier (e.g. lfj, pangolin).
Example:
"lfj"
Response
Tokens retrieved successfully.
⌘I