Get Available Routes

Before creating a swap, it's possible to programmatically retrieve all possible supported routes. The endpoint is public and does not require any authorization.

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

Query Parameters

Name
Type
Description

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.

sourceAsset

String

The currency name to be filtered. Example: USDT.

destination

String

source

String

destinationAsset

String

The currency name to be filtered. Example: USDT.

{
  "data": [
    {
      "source": "STARKNET_MAINNET",
      "source_asset": "USDC",
      "destination": "OPTIMISM_MAINNET",
      "destination_asset": "USDC"
    },
    {
      "source": "STARKNET_MAINNET",
      "source_asset": "ETH",
      "destination": "OPTIMISM_MAINNET",
      "destination_asset": "ETH"
    }
  ],
  "error": null
}

Raw request

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

Raw response

{
  "data": [
    {
      "source": "STARKNET_MAINNET",
      "source_asset": "USDC",
      "destination": "OPTIMISM_MAINNET",
      "destination_asset": "USDC"
    },
    {
      "source": "STARKNET_MAINNET",
      "source_asset": "ETH",
      "destination": "OPTIMISM_MAINNET",
      "destination_asset": "ETH"
    }
  ],
  "error": null
}

Last updated

© 2023 Bransfer, Inc. All rights reserved.