Get service metadata
curl --request GET \
--url https://tx-builder-testnet.avantisfi.com/v2/metaimport requests
url = "https://tx-builder-testnet.avantisfi.com/v2/meta"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://tx-builder-testnet.avantisfi.com/v2/meta', 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://tx-builder-testnet.avantisfi.com/v2/meta",
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://tx-builder-testnet.avantisfi.com/v2/meta"
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://tx-builder-testnet.avantisfi.com/v2/meta")
.asString();require 'uri'
require 'net/http'
url = URI("https://tx-builder-testnet.avantisfi.com/v2/meta")
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{
"ok": true,
"data": {
"chainId": 123,
"addresses": {},
"eip712": {
"trading": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"referral": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"signatureFormat": "<string>"
},
"enums": {
"openOrderType": {},
"marginUpdateType": {},
"priceSourcing": {},
"limitOrderType": {},
"triggerType": {}
},
"units": {
"price": "<string>",
"leverage": "<string>",
"slippagePercent": "<string>",
"coinExposure": "<string>",
"usdc": "<string>",
"intentDeadline": "<string>",
"delegateExpiry": "<string>"
},
"defaults": {
"executionFeeWei": "<string>",
"intentDeadlineMs": 123,
"slippagePercent": "<string>"
},
"glossary": {}
}
}{
"ok": false,
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<unknown>"
}
}Meta
Get service metadata
Call once at startup. Returns everything a client needs to encode and sign correctly without hard-coding anything: chainId, contract addresses, both EIP-712 signing domains (trading and referral), enum mappings, unit conventions (which fields are seconds vs milliseconds, on-chain scaling), and service defaults.
GET
/
v2
/
meta
Get service metadata
curl --request GET \
--url https://tx-builder-testnet.avantisfi.com/v2/metaimport requests
url = "https://tx-builder-testnet.avantisfi.com/v2/meta"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://tx-builder-testnet.avantisfi.com/v2/meta', 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://tx-builder-testnet.avantisfi.com/v2/meta",
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://tx-builder-testnet.avantisfi.com/v2/meta"
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://tx-builder-testnet.avantisfi.com/v2/meta")
.asString();require 'uri'
require 'net/http'
url = URI("https://tx-builder-testnet.avantisfi.com/v2/meta")
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{
"ok": true,
"data": {
"chainId": 123,
"addresses": {},
"eip712": {
"trading": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"referral": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"signatureFormat": "<string>"
},
"enums": {
"openOrderType": {},
"marginUpdateType": {},
"priceSourcing": {},
"limitOrderType": {},
"triggerType": {}
},
"units": {
"price": "<string>",
"leverage": "<string>",
"slippagePercent": "<string>",
"coinExposure": "<string>",
"usdc": "<string>",
"intentDeadline": "<string>",
"delegateExpiry": "<string>"
},
"defaults": {
"executionFeeWei": "<string>",
"intentDeadlineMs": 123,
"slippagePercent": "<string>"
},
"glossary": {}
}
}{
"ok": false,
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"details": "<unknown>"
}
}⌘I