# Using Dynamic URL Parameters in TaoDex

This guide explains how builders, validators, and subnet owners can use dynamic URL parameters on [taodex.hotkeyswap.com](https://taodex.hotkeyswap.com/) to interact with the platform effectively.

With these parameters, you can predefine the input and output subnets, as well as select a validator dynamically, making it easier to share specific links and automate actions.

***

### URL Structure

TaoDEX supports the following URL parameters:

{% code overflow="wrap" fullWidth="true" %}

```markup
https://taodex.hotkeyswap.com/dtao?inputNetuid=<input_netuid>&outputNetuid=<output_netuid>&validator=<validator_ss58>
```

{% endcode %}

#### Parameters:

* **`inputNetuid`**: Represents the netuid of the input subnet.
* **`outputNetuid`**: Represents the netuid of the output subnet.
* **`validator`**: Represents the validator's SS58 address.

⚠️ **Important Rules:**

* Only **one** of `inputNetuid` or `outputNetuid` can be set at a time.
* If `inputNetuid` is set, `outputNetuid` must be empty, and vice versa.
* The URL dynamically updates as users interact with the UI.

***

### Examples

#### Example 1: Setting an Input Subnet

To preselect an **input subnet** with `netuid=8`:

{% code overflow="wrap" %}

```markup
https://taodex.hotkeyswap.com/dtao?inputNetuid=8
```

{% endcode %}

#### Example 2: Setting an Output Subnet

To preselect an **output subnet** with `netuid=8`:

{% code overflow="wrap" %}

```markup
https://taodex.hotkeyswap.com/dtao?outputNetuid=8
```

{% endcode %}

#### Example 3: Selecting a Validator

To preselect a **validator** with `RoundTable21`:

{% code overflow="wrap" %}

```markup
https://taodex.hotkeyswap.com/dtao?validator=5FFApaS75bv5pJHfAp2FVLBj9ZaXuFDjEypsaBNc1wCfe52v
```

{% endcode %}

#### Example 4: Full Configuration

Setting both an **output subnet and a validator**:

{% code overflow="wrap" %}

```markup
https://taodex.hotkeyswap.com/dtao?outputNetuid=8&validator=5FFApaS75bv5pJHfAp2FVLBj9ZaXuFDjEypsaBNc1wCfe52v
```

{% endcode %}

***

### How It Works

1. **URL Updates Dynamically**
   * As users change subnets or validators, the URL updates automatically.
   * Clicking "Switch" will swap input and output subnets while maintaining the correct URL structure.
2. **Sharing Links**
   * Users can copy and share the URL to direct others to the same subnet and validator selection.
3. **Developers & Integrations**
   * Projects can integrate TaoDEX with predefined URLs for seamless user experience.

***

### Troubleshooting

* If **both** `inputNetuid` and `outputNetuid` appear, one must be removed manually.
* If switching input and output doesn't reflect in the URL, refresh the page and try again.
* For support, contact us.

***

Hotkeyswap's TAO DEX dynamic URL system enhances usability, making it easy for traders, validators, and subnet owners to share specific configurations. Start using the URLs today at [**taodex.hotkeyswap.com**](https://taodex.hotkeyswap.com)!

**Happy Trading!**


---

# 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://docs.hotkeyswap.com/miscellaneous/technical-reference/custom-linking/using-dynamic-url-parameters-in-taodex.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.
