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

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.layerswap.io/api/api-integration/deprecated-v1-api-reference/get-available-routes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
