relayer_getCapabilities
curl --request POST \
--url https://api.gelato.cloud/rpc \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_getCapabilities",
"params": [
"1",
"137"
]
}
'import requests
url = "https://api.gelato.cloud/rpc"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_getCapabilities",
"params": ["1", "137"]
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 1, jsonrpc: '2.0', method: 'relayer_getCapabilities', params: ['1', '137']})
};
fetch('https://api.gelato.cloud/rpc', 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://api.gelato.cloud/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'relayer_getCapabilities',
'params' => [
'1',
'137'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gelato.cloud/rpc"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gelato.cloud/rpc")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"1": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
}
]
},
"137": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"decimals": 6
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}Relayer API Endpoints
relayer_getCapabilities
Returns the relayer’s capabilities and fee collector address for specified chains.
POST
/
rpc
relayer_getCapabilities
curl --request POST \
--url https://api.gelato.cloud/rpc \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_getCapabilities",
"params": [
"1",
"137"
]
}
'import requests
url = "https://api.gelato.cloud/rpc"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_getCapabilities",
"params": ["1", "137"]
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 1, jsonrpc: '2.0', method: 'relayer_getCapabilities', params: ['1', '137']})
};
fetch('https://api.gelato.cloud/rpc', 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://api.gelato.cloud/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'relayer_getCapabilities',
'params' => [
'1',
'137'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gelato.cloud/rpc"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gelato.cloud/rpc")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_getCapabilities\",\n \"params\": [\n \"1\",\n \"137\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"1": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
}
]
},
"137": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"decimals": 6
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}Headers
Gelato API key for authentication.
Body
application/json
Response
Successful response
Map of chain IDs to their capabilities
Show child attributes
Show child attributes
Example:
{
"1": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
}
]
},
"137": {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": [
{
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18
},
{
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"decimals": 6
}
]
}
}
⌘I