For the complete documentation index, see llms.txt. This page is also available as Markdown.

Discovery: chains, tokens, and pairs

Use the discovery endpoints to fetch supported chains, tokens, and tradeable pairs before building quote requests.

Step 0: Health check (optional)

Verify the gateway is up with GET /health (no auth required). See Health Check.

Step 1: List chains

Get all enabled chains to build chain selectors or validate fromChain / toChain.

curl -X GET 'https://api.gateway.zert.com/api/v1/chains' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response:

{
  "data": {
    "chains": [
      { "id": "eth-mainnet", "name": "Ethereum Mainnet" },
      { "id": "polygon-mainnet", "name": "Polygon" }
    ]
  },
  "meta": { "requestId": "...", "timestamp": "..." }
}

Use id values as chain identifiers in quote and status calls.

Step 2: List tokens (optional)

Filter tokens by chain or search by symbol/name. Use results to build token selectors and validate token availability.

Response includes data.tokens with fields like chain, symbol, name, address, decimals, and an optional nextCursor.

Step 3: List pairs (optional)

Get tradeable pairs for a chain or token to validate or suggest quote inputs.

Response includes data.pairs with fromChain, toChain, tokenIn, tokenOut, and an optional nextCursor.

Step 4: Request a quote

Use discovered chain identifiers and token identifiers in POST /quote:

Summary

Step
Endpoint
Purpose

0

GET /health

Optional health check (no auth)

1

GET /chains

Get supported chain identifiers

2

GET /tokens

Get tokens by chain or search

3

GET /pairs

Get tradeable pairs for validation or UX

4

POST /quote

Get route summaries for a swap idea

See Health Check, List Chains, List Tokens, List Pairs, and Request Quote for full parameters and responses.

Last updated