# TWAP Orders

## Introduction to TWAP Orders

TWAP (Time-weighted Average Price) is a common order type that breaks a large order into smaller trades executed at regular intervals, aiming to minimize the order’s impact on the market price. It’s especially useful for users applying a dollar-cost averaging (DCA) strategy, allowing consistent token purchases over time.&#x20;

TWAP is most effective when the order size is large relative to market liquidity or during periods of high price volatility without a clear upward or downward trend. &#x20;

When taking profit on Voting and Liquidity Rewards, TWAP orders are particularly useful as they offer several key benefits that optimize your potential returns:

* Reduced Market Impact: TWAP slices a big sell order into smaller, evenly spaced trades over time, preventing sudden, large sell-offs that can push the token’s price down sharply. This helps avoid unfavorable price slippage.
* Average Price Execution: Instead of selling all tokens at once, which might trigger price dips, TWAP aims to achieve an average execution price close to the time-weighted market price over the specified period, leading to more optimal outcomes.
* Lower Signaling Risk: By breaking orders into smaller chunks, TWAP reduces the chance that other market participants detect a large sell intention and react negatively, which can otherwise move prices against the seller.

{% hint style="success" %}
Pro Tip: To maximize your returns and minimize market price impact, it’s strongly advised to use TWAP orders when selling Voting and Liquidity Rewards. This approach benefits all parties involved: the seller achieves more optimal returns, the project’s token experiences less price volatility, and it supports the long-term sustainability of the Blackhole protocol.
{% endhint %}

### How to set up a TWAP Order

1. On the main swap page, select the TWAP option:

<figure><img src="/files/U5OXQIrUA5H2RDArlGOm" alt=""><figcaption></figcaption></figure>

2. Choose the tokens you want to swap and receive for this trade.&#x20;

<figure><img src="/files/lsQw8NY0dhPzZzguZ2xJ" alt=""><figcaption></figcaption></figure>

In this example we chose to sell 50,000 BLACK as the "Swap" token and USDC as the "For" token, meaning we want to sell 50,000 BLACK for USDC.\
\
3\. TWAP-market or TWAP-limit order

You can select between a TWAP-market orders, which executes all trades at the current market price, and TWAP-limit orders, which only executes trades if they are within your specified price limit. To enable TWAP-limit orders, simply toggle on the Limit Price option:

<figure><img src="/files/PpmY8CvyNrYzkj61UzJ3" alt=""><figcaption></figcaption></figure>

4. TWAP settings

* **Limit Price**: if you have selected the limit price option, you can enter the limit price manually:

<figure><img src="/files/gxqdfgGJ8GHe97mHYKyk" alt=""><figcaption></figcaption></figure>

&#x20;           In addition you can also set the buy/sell toggle depending on your scenario:

<figure><img src="/files/ypf84NOtRd4cXe51Lci6" alt=""><figcaption></figcaption></figure>

* Total Trades

Here, you can set the number of individual trades your order will be divided into. Increasing the number of trades reduces the price impact, helping you achieve better execution prices. However, more trades also mean higher total gas fees:

<figure><img src="/files/v1NbRzfMB87KAPffqC3j" alt=""><figcaption></figcaption></figure>

Based on your entry, the token amount per trade is calculated automatically.

* Trade Interval

Sets the time gap between each individual trade. The minimum trade interval is 5 minutes to cater    for allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.&#x20;

<figure><img src="/files/o0RxCVmIBx7PZ1RHTwYa" alt=""><figcaption></figcaption></figure>

The estimated time is calculated based on your entries for Total Trades and Trade Interval.&#x20;

5. Provide Allowance

Before you can submit your TWAP order, you have to provide allowance to the Blackhole Protocol.

<figure><img src="/files/gXQqJ8dPinUrI41SrQWI" alt=""><figcaption></figcaption></figure>

6. Once the allowance transaction completed succesfully, you can place your TWAP order:

<figure><img src="/files/nQXFZjnKv9eBK3nAZ6j3" alt=""><figcaption></figcaption></figure>

After your transaction is processed, you can track your order’s status in the order history section under “Open Orders.”


---

# 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.blackhole.xyz/protocol-design/how-to-swap/twap-orders.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.
