> For the complete documentation index, see [llms.txt](https://learn.layerswap.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.layerswap.io/api/api-integration/deprecated-v1-api-reference/get-available-routes.md).

# 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.

<mark style="color:blue;">`GET`</mark> `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 | The supported blockchain network name to be filtered. [See available values.](/api/api-integration/deprecated-v1-api-reference/get-available-networks.md)                        |
| source           | String | The supported blockchain network name to be filtered. [See available values.](/api/api-integration/deprecated-v1-api-reference/get-available-networks.md)                        |
| destinationAsset | String | The currency name to be filtered. Example: USDT.                                                                                                                                 |

{% tabs %}
{% tab title="200: OK Arrays of possible routes" %}

```json
{
  "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
}
```

{% endtab %}
{% endtabs %}

### Raw request

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

### Raw response

```json
{
  "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
}

```
