List chains
curl --request GET \
--url https://api.donate.gg/api/v2/chainsimport requests
url = "https://api.donate.gg/api/v2/chains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/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://api.donate.gg/api/v2/chains",
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://api.donate.gg/api/v2/chains"
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://api.donate.gg/api/v2/chains")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/chains")
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{
"items": [
{
"id": 101,
"name": "Solana",
"type": "solana",
"donationRelay": {
"address": "RLAYHr9TRFcKB2ubYQhspcnXiaGpaVzNQvHytt47RZu",
"settlementChainId": 101,
"bridge": null
}
},
{
"id": 8453,
"name": "Base",
"type": "evm",
"donationRelay": {
"address": "0x02A0d2a39732082b824a5A3D3b026C54d581DCC8",
"settlementChainId": 101,
"bridge": {
"settlementCurrency": "USDC",
"minimumAmountAtomic": "0",
"slippageBps": 300,
"reclaimAfterSeconds": 86400,
"methods": [
"donateNative",
"donateToken",
"donateTokenWithPermit"
]
}
}
}
],
"nextCursor": null
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Reference data
List chains
The chains a donation can be made on, with the contract or program a donation calls on each. This changes rarely: keep it for minutes, not per request. Public: no API key is needed. Send one to use your organization’s rate limit.
GET
/
v2
/
chains
List chains
curl --request GET \
--url https://api.donate.gg/api/v2/chainsimport requests
url = "https://api.donate.gg/api/v2/chains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/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://api.donate.gg/api/v2/chains",
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://api.donate.gg/api/v2/chains"
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://api.donate.gg/api/v2/chains")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/chains")
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{
"items": [
{
"id": 101,
"name": "Solana",
"type": "solana",
"donationRelay": {
"address": "RLAYHr9TRFcKB2ubYQhspcnXiaGpaVzNQvHytt47RZu",
"settlementChainId": 101,
"bridge": null
}
},
{
"id": 8453,
"name": "Base",
"type": "evm",
"donationRelay": {
"address": "0x02A0d2a39732082b824a5A3D3b026C54d581DCC8",
"settlementChainId": 101,
"bridge": {
"settlementCurrency": "USDC",
"minimumAmountAtomic": "0",
"slippageBps": 300,
"reclaimAfterSeconds": 86400,
"methods": [
"donateNative",
"donateToken",
"donateTokenWithPermit"
]
}
}
}
],
"nextCursor": null
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Was this page helpful?