API Reference
Tradable Pairs
List the corridors the router currently quotes, as a mapping of chain slugs to chain IDs. Production keys see the live roster; tfk_test_ keys additionally expose the sandbox networks.
GET
/
pairs
Tradable Pairs
curl --request GET \
--url https://api.tetrafi.io/api/v1/pairs \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tetrafi.io/api/v1/pairs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tetrafi.io/api/v1/pairs', 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.tetrafi.io/api/v1/pairs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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://api.tetrafi.io/api/v1/pairs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.tetrafi.io/api/v1/pairs")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tetrafi.io/api/v1/pairs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pairs": [
{
"input": {
"chainId": 10,
"address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"symbol": "USDC",
"decimals": 6
},
"output": {
"chainId": 8453,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6
},
"corridor": "optimism-base"
},
{
"input": {
"chainId": 8453,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6
},
"output": {
"chainId": 10,
"address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"symbol": "USDC",
"decimals": 6
},
"corridor": "base-optimism"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}OpenAPI
/specs/router-api.json get /pairs
openapi: 3.1.0
info:
title: TetraFi Router API
version: '1'
description: >-
Multi-source routing over every eligible execution source. One intent fans out across
direct DEX liquidity, the RFQ venue, bridges, issuers, and fiat rails, and comes back
as ranked executable candidates - each stating its own guarantees.
servers:
- url: https://api.tetrafi.io/api/v1/router
description: >-
Router namespace base URL. The chain is no longer part of the URL - every asset in an
intent names its network via chainId. The same host serves the sandbox: authenticate
with a tfk_test_ key to route against test corridors, tfk_live_ for production.
security:
- apiKeyAuth: []
paths:
/pairs:
get:
summary: Tradable Pairs
operationId: getPairs
description: >-
Lists the corridors the router currently quotes, expressed over the production chain
roster: ethereum (1), optimism (10), base (8453), and arc (5042). Authenticating with
a tfk_test_ key exposes the sandbox roster as well - arc-testnet (5042002), solana-devnet
(1399811151), and tron-shasta. Pair availability within the roster follows each
venue's listed assets.
servers:
- url: https://api.tetrafi.io/api/v1/router
responses:
'200':
description: Mapping of chain slugs to chain IDs across which tradable pairs are
quoted
content:
application/json:
schema:
type: object
additionalProperties:
type: integer
description: Chain slug mapped to chain ID for every network with at least
one tradable pair.
example:
ethereum: 1
optimism: 10
base: 8453
arc: 5042
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: Service-account API key (tfk_test_/tfk_live_).
Authorizations
Service-account API key (tfk_test_/tfk_live_).
Query Parameters
Keep only pairs with at least one counterparty pricing right now (status active).
Restrict to pairs whose input or output sits on this chain, e.g. 10 or 8453.
Restrict to one directional corridor slug, e.g. optimism-base.
Response
Successful Response
Every directional pair at least one workspace-eligible solver/LP currently quotes.
Show child attributes
Show child attributes
When this roster snapshot was computed. Coverage moves with LP inventory and listings - refresh at least daily rather than pinning it.
Number of pair entries returned.