Chain identity and signing domain
curl --request GET \
--url https://api.gains.trade/v1/{chain}import requests
url = "https://api.gains.trade/v1/{chain}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.gains.trade/v1/{chain}', 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.gains.trade/v1/{chain}",
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.gains.trade/v1/{chain}"
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.gains.trade/v1/{chain}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gains.trade/v1/{chain}")
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{
"chain": "arbitrum",
"chainId": 123,
"diamond": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523",
"relayer": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523",
"testnet": true,
"signing": {
"domain": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523"
},
"fields": [
{
"name": "<string>",
"type": "<string>"
}
],
"emptyBodyHash": "<string>"
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}System
Chain identity and signing domain
Everything a client needs to sign requests for this chain without hard-coding addresses.
GET
/
v1
/
{chain}
Chain identity and signing domain
curl --request GET \
--url https://api.gains.trade/v1/{chain}import requests
url = "https://api.gains.trade/v1/{chain}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.gains.trade/v1/{chain}', 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.gains.trade/v1/{chain}",
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.gains.trade/v1/{chain}"
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.gains.trade/v1/{chain}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gains.trade/v1/{chain}")
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{
"chain": "arbitrum",
"chainId": 123,
"diamond": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523",
"relayer": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523",
"testnet": true,
"signing": {
"domain": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523"
},
"fields": [
{
"name": "<string>",
"type": "<string>"
}
],
"emptyBodyHash": "<string>"
}
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"details": {}
}Path Parameters
Available options:
arbitrum, base, polygon, megaeth, arbitrum-sepolia Example:
"arbitrum"
Response
Chain info
Available options:
arbitrum, base, polygon, megaeth, arbitrum-sepolia Example:
"arbitrum"
Gains Diamond, the EIP-712 verifying contract of this chain.
Pattern:
^0x[0-9a-fA-F]{40}$Example:
"0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523"
Hyperliquid facade relayer, the only sponsored path; null when the deployment serves the facade read-only. Native agents broadcast their own transactions.
Pattern:
^0x[0-9a-fA-F]{40}$Example:
"0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523"
Show child attributes
Show child attributes
