# TWAP

#### What is TWAP

TWAP is used to buy or sell an asset over a period of time rather than an instant execution.

It divides a large order into smaller, equal-sized orders spread out over a set period to minimize market impact

**When and Why to use TWAP**

* **For large orders**
* **In less liquid tokens**
* **To reduce market impact**
* **Acquiring tokens at avg price to reduce short term price fluctuations**

#### TWAP Market vs TWAP Limit Orders

**TWAP Market Orders**

When placing TWAP orders you can choose to place market orders. Such orders execute at the set frequency at then Market Price of the token. This gurantees the execution at the set frequency

**TWAP Limit Orders**

When placing the TWAP orders, if you select a limit price, then your orders execute at the set frequency only if the market price is at or better than the limit price, which helps you control the buy/sell price.

#### **Important Things to Consider**

* Your trades are not instant but spread over multiple small trades
* When placing market TWAP orders the execution price can be significantly different from order placement time.
* Make sure to use Limit Prices if you want to execute trades only above a certain price.
* A 17 BPS fee is applicable to faciliate your trades and is taken from the output token
* You would also pay a small fee to cover the gas fee paid by takers to execute this swap on your behalf

#### How To Place TWAP Orders

To place TWAP orders navigate to [Swap Page](https://app.kodiak.finance/#/swap?inputCurrency=BERA\&outputCurrency=0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce) and select TWAP.

* Enter the tokens to buy and sell with input token amount.
* You will see the output token amount with current best market price
* Toggle between the market price and the limit price. In this example we are placing a TWAP order to execute at market price
* Enter the frequency and total number of trades you want to execute.&#x20;
* Check the amount of token traded per trade
* Click on Place Order

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

* You can also set a Limit price for execution by including the gain percentage or the absolute price. In this example we will use Market Price.

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

* You will see a popup with order summary and a disclaimer you must read and accept to place your order.

* This will popup two transactions that you must sign

  * First is the Input Token allowance approval transaction
  * Place Order transaction

* You will see your submitted order like this.

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

* You can also navigate to the Order History section to find the order and manage it.

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


---

# 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://documentation.kodiak.finance/user-guide/twap.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.
