Chains and Tokens Reference

Overview

Before creating payment requests, you need to know which blockchain networks (chains) and receiving tokens are supported by Unter. This reference covers all endpoints for discovering available chains and tokens.

All chains and tokens endpoints are public - no authentication required.

Chains

List All Supported Chains

Get a list of all active mainnet blockchain networks supported by Unter.

GET /api/public/chains

Query Parameters:

Parameter
Type
Default
Description

include_tokens

boolean

false

Include active tokens for each chain in the response

Examples:

# Get all chains
curl https://api.unter.tech/api/public/chains

# Get all chains with their tokens
curl https://api.unter.tech/api/public/chains?include_tokens=true

Response:

{
  "data": [
    {
      "id": 1,
      "slug": "ethereum",
      "name": "Ethereum",
      "symbol": "ETH",
      "chain_id": 1,
      "type": "evm",
      "explorer_url": "https://etherscan.io",
      "is_active": true,
      "is_testnet": false
    },
    {
      "id": 2,
      "slug": "polygon",
      "name": "Polygon",
      "symbol": "MATIC",
      "chain_id": 137,
      "type": "evm",
      "explorer_url": "https://polygonscan.com",
      "is_active": true,
      "is_testnet": false
    },
    {
      "id": 3,
      "slug": "solana",
      "name": "Solana",
      "symbol": "SOL",
      "chain_id": null,
      "type": "solana",
      "explorer_url": "https://explorer.solana.com",
      "is_active": true,
      "is_testnet": false
    }
  ]
}

With tokens included:

{
  "data": [
    {
      "id": 1,
      "slug": "ethereum",
      "name": "Ethereum",
      "symbol": "ETH",
      "chain_id": 1,
      "type": "evm",
      "explorer_url": "https://etherscan.io",
      "is_active": true,
      "is_testnet": false,
      "tokens": [
        {
          "id": 1,
          "symbol": "ETH",
          "name": "Ethereum",
          "contract_address": null,
          "decimals": 18,
          "logo_url": "https://cryptologos.cc/logos/ethereum-eth-logo.png",
          "is_native": true,
          "is_stablecoin": false,
          "is_active": true,
          "chain_id": 1
        },
        {
          "id": 2,
          "symbol": "USDC",
          "name": "USD Coin",
          "contract_address": "0xA0b86a33E6441b8bE791C6611e17F9eA7e5Db0e8",
          "decimals": 6,
          "logo_url": "https://cryptologos.cc/logos/usd-coin-usdc-logo.png",
          "is_native": false,
          "is_stablecoin": true,
          "is_active": true,
          "chain_id": 1
        }
      ]
    }
  ]
}

Get Single Chain Details

Get detailed information about a specific blockchain network.

GET /api/public/chains/{id}

Path Parameters:

Parameter
Type
Description

id

integer

The chain ID from Unter's database

Query Parameters:

Parameter
Type
Default
Description

include_tokens

boolean

false

Include active tokens for this chain

Examples:

# Get Ethereum chain details
curl https://api.unter.tech/api/public/chains/1

# Get Polygon chain with tokens
curl https://api.unter.tech/api/public/chains/2?include_tokens=true

Response:

{
  "data": {
    "id": 1,
    "slug": "ethereum",
    "name": "Ethereum", 
    "symbol": "ETH",
    "chain_id": 1,
    "type": "evm",
    "explorer_url": "https://etherscan.io",
    "is_active": true,
    "is_testnet": false
  }
}

Tokens

List Tokens for a Chain

Get all tokens available on a specific blockchain network.

GET /api/public/chains/{chainId}/tokens

Path Parameters:

Parameter
Type
Description

chainId

integer

The chain ID from Unter's database

Query Parameters:

Parameter
Type
Default
Description

stablecoins_only

boolean

false

Show only stablecoin tokens

Examples:

# Get all curated tokens on Ethereum
curl https://api.unter.tech/api/public/chains/1/tokens

# Get only stablecoins on Ethereum
curl https://api.unter.tech/api/public/chains/1/tokens?stablecoins_only=true

Response:

{
  "data": [
    {
      "id": 1,
      "symbol": "ETH",
      "name": "Ethereum",
      "contract_address": null,
      "decimals": 18,
      "logo_url": "https://cryptologos.cc/logos/ethereum-eth-logo.png",
      "is_native": true,
      "is_stablecoin": false,
      "is_active": true,
      "chain_id": 1,
      "chain": {
        "id": 1,
        "slug": "ethereum",
        "name": "Ethereum"
      }
    },
    {
      "id": 2,
      "symbol": "USDC",
      "name": "USD Coin",
      "contract_address": "0xA0b86a33E6441b8bE791C6611e17F9eA7e5Db0e8",
      "decimals": 6,
      "logo_url": "https://cryptologos.cc/logos/usd-coin-usdc-logo.png",
      "is_native": false,
      "is_stablecoin": true,
      "is_active": true,
      "chain_id": 1,
      "chain": {
        "id": 1,
        "slug": "ethereum",
        "name": "Ethereum"
      }
    },
    {
      "id": 3,
      "symbol": "USDT",
      "name": "Tether USD",
      "contract_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
      "decimals": 6,
      "logo_url": "https://cryptologos.cc/logos/tether-usdt-logo.png",
      "is_native": false,
      "is_stablecoin": true,
      "is_active": true,
      "chain_id": 1,
      "chain": {
        "id": 1,
        "slug": "ethereum",
        "name": "Ethereum"
      }
    }
  ]
}

Understanding Chain Types

Unter supports different blockchain types, each with different characteristics:

EVM Chains

  • Type: "evm"

  • Examples: Ethereum, Polygon, Binance Smart Chain

  • Address Format: 42-character hex string starting with 0x

Solana

  • Type: "solana"

  • Address Format: 32-44 character Base58 string

Understanding Token Types

Native Tokens

  • Property: is_native: true

  • Contract Address: null (no contract address)

  • Examples: ETH on Ethereum, MATIC on Polygon, SOL on Solana

  • Purpose: Used for gas fees and as the native currency

Token Contracts

  • Property: is_native: false

  • Contract Address: Non-null contract address

  • Examples: USDC, USDT, DAI

  • Purpose: ERC-20 tokens, SPL tokens, etc.

Stablecoins

  • Property: is_stablecoin: true

  • Examples: USDC, USDT, DAI, BUSD

  • Purpose: Price-stable cryptocurrencies typically pegged to USD

Best Practices

1. Cache Chain and Token Data

Chain and token information doesn't change frequently, so cache it to improve performance:

2. Validate Chain/Token Combinations

Always verify that a token exists on the specified chain before creating payment requests:

Last updated