Skip to content

Supported Chains API

Get information about all supported blockchain networks, including network status, capabilities, and integration details.

Endpoint

GET /v1/chains/supported

Authentication

This endpoint requires API key authentication:

Authorization: Bearer YOUR_API_KEY

Query Parameters

ParameterTypeRequiredDescription
statusstringFilter by status: "live", "testnet", "maintenance"
includeTestnetsbooleanInclude testnet networks (default: false)

Example Request

GET /v1/chains/supported?status=live&includeTestnets=false
Authorization: Bearer YOUR_API_KEY

Response Format

{
  "success": true,
  "data": {
    "chains": [
      {
        "chainId": 1,
        "name": "Ethereum",
        "shortName": "eth",
        "nativeCurrency": {
          "name": "Ethereum",
          "symbol": "ETH",
          "decimals": 18
        },
        "rpcUrls": ["https://eth.llamarpc.com"],
        "blockExplorerUrls": ["https://etherscan.io"],
        "status": "live",
        "capabilities": {
          "sourcePayments": true,
          "destinationSettlements": true,
          "tokenSwaps": true,
          "bridgeOperations": true
        },
        "metrics": {
          "blockTime": 12,
          "finality": 180,
          "avgGasPrice": "20000000000",
          "avgGasCostUsd": "15.50"
        },
        "integrations": {
          "dexes": ["uniswap-v3", "sushiswap", "1inch", "curve"],
          "bridges": ["across", "hop", "stargate"]
        },
        "logoUrl": "https://assets.cyberpay.org/chains/ethereum.png"
      },
      {
        "chainId": 137,
        "name": "Polygon",
        "shortName": "matic",
        "nativeCurrency": {
          "name": "Polygon",
          "symbol": "MATIC",
          "decimals": 18
        },
        "rpcUrls": ["https://polygon.llamarpc.com"],
        "blockExplorerUrls": ["https://polygonscan.com"],
        "status": "live",
        "capabilities": {
          "sourcePayments": true,
          "destinationSettlements": true,
          "tokenSwaps": true,
          "bridgeOperations": true
        },
        "metrics": {
          "blockTime": 2,
          "finality": 30,
          "avgGasPrice": "30000000000",
          "avgGasCostUsd": "0.05"
        },
        "integrations": {
          "dexes": ["quickswap", "sushiswap", "uniswap-v3", "curve"],
          "bridges": ["across", "hop", "stargate"]
        },
        "logoUrl": "https://assets.cyberpay.org/chains/polygon.png"
      }
    ],
    "metadata": {
      "totalChains": 2,
      "liveChains": 2,
      "testnetChains": 0,
      "lastUpdated": 1759231185
    }
  },
  "timestamp": "2024-01-01T00:00:00Z"
}

Supported Networks

Mainnet Networks

ChainChain IDStatusBlock TimeAvg Gas Cost
Ethereum1✅ Live~12s$15.50
Polygon137✅ Live~2s$0.05
Optimism10✅ Live~2s$0.50
Arbitrum42161✅ Live~1s$0.30
Base8453✅ Live~2s$0.25

Testnet Networks

ChainChain IDStatusPurpose
Ethereum Sepolia11155111✅ LiveDevelopment & Testing
Polygon Mumbai80001✅ LiveDevelopment & Testing
Optimism Sepolia11155420✅ LiveDevelopment & Testing
Arbitrum Sepolia421614✅ LiveDevelopment & Testing
Base Sepolia84532✅ LiveDevelopment & Testing

Network Capabilities

Capability Types

CapabilityDescription
sourcePaymentsCan be used as payment source
destinationSettlementsCan receive settlement payments
tokenSwapsDEX integrations available
bridgeOperationsCross-chain bridge support

Integration Types

TypeDescription
dexesDecentralized exchanges
bridgesCross-chain bridge protocols

Code Examples

JavaScript/TypeScript

import { CyberPaySDK } from '@cyberpay/sdk';
 
const sdk = new CyberPaySDK({
  apiKey: 'YOUR_API_KEY'
});
 
async function getSupportedChains() {
  try {
    const chains = await sdk.chains.getSupported({
      status: 'live',
      includeTestnets: false
    });
    
    console.log('Supported chains:', chains);
    
    // Filter chains by capability
    const swapChains = chains.chains.filter(
      chain => chain.capabilities.tokenSwaps
    );
    
    console.log('Chains with swap support:', swapChains);
    
    return chains;
  } catch (error) {
    console.error('Error fetching chains:', error);
  }
}
 
// Get chain by ID
async function getChainInfo(chainId: number) {
  try {
    const chains = await sdk.chains.getSupported();
    const chain = chains.chains.find(c => c.chainId === chainId);
    
    if (!chain) {
      throw new Error(`Chain ${chainId} not supported`);
    }
    
    return chain;
  } catch (error) {
    console.error('Error getting chain info:', error);
  }
}

React Hook Example

import { useState, useEffect } from 'react';
import { CyberPaySDK } from '@cyberpay/sdk';
 
export function useSupportedChains() {
  const [chains, setChains] = useState<any[]>([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);
  
  useEffect(() => {
    const fetchChains = async () => {
      try {
        const sdk = new CyberPaySDK({ 
          apiKey: process.env.REACT_APP_CYBERPAY_API_KEY 
        });
        
        const result = await sdk.chains.getSupported({
          status: 'live'
        });
        
        setChains(result.chains);
        setError(null);
      } catch (err: any) {
        setError(err.message);
      } finally {
        setLoading(false);
      }
    };
    
    fetchChains();
  }, []);
  
  return { chains, loading, error };
}

Network Status

Status Types

StatusDescription
liveFully operational
testnetTest network
maintenanceTemporary maintenance
deprecatedBeing phased out

Monitoring

We continuously monitor:

  • Block production consistency
  • Gas price trends
  • Bridge availability
  • DEX liquidity levels

Check real-time status at: status.cyberpay.org

Next Steps

Support