Get Available Networks

Before creating a swap, it's possible to programmatically retrieve available sources, destinations and assets for swaps. The endpoint is public and does not require any authorization.

GET https://api.layerswap.io/api/available_networks

Query Parameters

NameTypeDescription

version

String

Possible values “sandbox” | any. If a sandbox value is provided, only the Testnet networks will be returned. For any other values - only the Mainnet networks will be returned.

{
  "data": [
    {
      "name": "ARBITRUM_MAINNET",
      "display_name": "Arbitrum One",
      "chain_id": "42161",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDC",
          "display_name": "USDC.e",
          "refuel": true,
          "contract": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        }
      ]
    },
    {
      "name": "ARBITRUMNOVA_MAINNET",
      "display_name": "Arbitrum Nova",
      "chain_id": "42170",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        }
      ]
    },
    {
      "name": "STARKNET_MAINNET",
      "display_name": "StarkNet",
      "chain_id": "0x534e5f4d41494e",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDC",
          "display_name": "USDC",
          "refuel": false,
          "contract": "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
          "decimals": 18
        }
      ]
    },
    {
      "name": "OPTIMISM_MAINNET",
      "display_name": "Optimism",
      "chain_id": "10",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDT",
          "display_name": "USDT",
          "refuel": true,
          "contract": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
          "decimals": 6
        },
        {
          "asset": "USDC",
          "display_name": "USDC",
          "refuel": true,
          "contract": "0x7F5c764cBc14f9669B88837ca1490cCa17c31607",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        },
        {
          "asset": "OP",
          "display_name": "OP",
          "refuel": true,
          "contract": "0x4200000000000000000000000000000000000042",
          "decimals": 18
        }
      ]
    },
  ],
  "error": null
}

Raw request

curl -X 'GET' \
  'https://api.layerswap.io/api/available_networks'

Raw response

{
  "data": [
    {
      "name": "ARBITRUM_MAINNET",
      "display_name": "Arbitrum One",
      "chain_id": "42161",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDC",
          "display_name": "USDC.e",
          "refuel": true,
          "contract": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        }
      ]
    },
    {
      "name": "ARBITRUMNOVA_MAINNET",
      "display_name": "Arbitrum Nova",
      "chain_id": "42170",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        }
      ]
    },
    {
      "name": "STARKNET_MAINNET",
      "display_name": "StarkNet",
      "chain_id": "0x534e5f4d41494e",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDC",
          "display_name": "USDC",
          "refuel": false,
          "contract": "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
          "decimals": 18
        }
      ]
    },
    {
      "name": "OPTIMISM_MAINNET",
      "display_name": "Optimism",
      "chain_id": "10",
      "native_asset": "ETH",
      "currencies": [
        {
          "asset": "USDT",
          "display_name": "USDT",
          "refuel": true,
          "contract": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
          "decimals": 6
        },
        {
          "asset": "USDC",
          "display_name": "USDC",
          "refuel": true,
          "contract": "0x7F5c764cBc14f9669B88837ca1490cCa17c31607",
          "decimals": 6
        },
        {
          "asset": "ETH",
          "display_name": "ETH",
          "refuel": false,
          "contract": null,
          "decimals": 18
        },
        {
          "asset": "OP",
          "display_name": "OP",
          "refuel": true,
          "contract": "0x4200000000000000000000000000000000000042",
          "decimals": 18
        }
      ]
    },
  ],
  "error": null
}

Last updated

© 2023 Bransfer, Inc. All rights reserved.