> For the complete documentation index, see [llms.txt](https://docs.thena.fi/thena/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thena.fi/thena/the-spot-dex/twap-order.md).

# TWAP Order

Introduction to dTWAP

TWAP (Time-weighted Average Price) is a common order type used in CeFi that breaks an order into smaller trade sizes and executes them at regular intervals. The main goal of a TWAP order is to reduce the order’s price impact. It can also be useful if a user wants to implement a dollar-cost averaging strategy (DCA) and buy a certain token on a consistent schedule (i.e. once a month).

Therefore, TWAP is best used when the order size is large compared to the available liquidity, or when a user anticipates a high price volatility period with no clear up or downward trend.

THENA has integrated the dTWAP protocol, powered by Orbs, that brings this order type to DeFi in a decentralized manner. Users can use this tool to create dTWAP orders by following the directions below.&#x20;

## :bulb: How to set-up TWAP Orders ?

1. **Prerequisites:** Ensure you have a Web3-enabled browser and sufficient balance in your wallet to cover the order amount and gas fees.
2. **Navigate to TWAP:** Select ‘TWAP’ from [thena.fi/swap](http://thena.fi/swap)&#x20;

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXenF6Dj8siGhWwCp1knN2kfWx_P9NVSRHQUCLIOqXI7huB9YeYQyTW_ZnAbwRtth9x5SieuKsykmyvJI_7wytciBxlkRWGrNAigwgGfo8B50R-Ba4FlHeUXzIrOOhaZ09qsHKu3seZnabusw7yqlbhLnYkL?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
3. **Select Token:** Choose the token pair you wish to make a swap on. As an example, we will swap from WBNB to THE.

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdmXmhA1hkBVGpUCnth_X9e_Dxb5rv00IXz4DgJx8tWuWwNtNRAj9Vp0d2abtyM-W8hpeYKhJv414nZ6w1Nm55SjCSnLF_Uym0E_6QpOEIbPG8DgR0rO68UaBIDO8MOqFMNx5lbwNzPzGWFaDy-RTM7yRQ?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
4. **Enter Order Details:**

* **Enter token swap quantity:** Enter the amount of token you would like to swap. Your trade size should be at least 50 USD.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfEhDAOIhudzGr2nXlaikx3xKMdtzJ2wwtaZFfwxfGfenLmHLO1bgPRGWNF0ZHhW2EVYgQwcWdpg6ZfaFhHvSqxywqJgIZWzZlDRfRjwz73DgfBi92kAigKPrmtudXawQgrQWGya_FcdbJRoTN3ujHKAbgC?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>

* **Limit Price:** By enabling this option, you can set the highest price for trades in your order. Trades will only be executed when the limit price you set is equal or lower than spot price.

  <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXe8Zbi5Z_ggoF1dtaNobhmZchyoigSUuYzdsSetYHEHt5JnIGihQnkEZStf3mDsRa3PAkMdXd6vhAmh6RI7MTJ4DcIQE1lfSV3sUzm2PUzIRpnhNJ3TqjZj8PQtCzWgoixGOCZFuHfcNHLcCSsk0s1VxSs?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
* **Trade Interval:** Enter the time interval between each trade execution.&#x20;

\*Note that this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, so the actual time may vary.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXclLR9_8gim_qSK-fVO2oqF-tKcj4b7swQLM-53CbQNgrClYrH-5dyGUATeXpv6Nf83xLdd7Mh5X55YxFQNNWEs0yIs0oNN9hDjYFLdgCFuHogBRFRsniO7S1DzZn15mM6NUSB1vKqCKJh_nga6NH889XDQ?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>

* **Max Duration:** Set the total duration over which your full order should be executed. Your order may be completed earlier than this time, partially completed, or not completed at all. This can depend on factors like the price you set, the frequency of trades, and current market conditions.

  <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXeH1mNfjClYyg9M6PTX_A2KRmzKZcJJE_koRsEc_B10OKpLAMvMZECzWLhZ27euiGHJUTuZFNyFNKvQiEeXJoKUjqS6XJGncaHXYKmmPEjdN-vX4l9_KaklMTB94WxQbweQQccVkJhLzVc3XGBucmI5Y0xF?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>

5. **Review Your Order:**

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXeGm-Oa1GP-zKp4txzk-9K4n5AVs2S6rcx96_F_rYmcThHa957oF2fR7i-S3Ab0-z2XYndNGQZhAKegZUOwsbsWYxR5DapRWoLSOOiXfCD0eSjBPtyZufckLRlGcA4BbFBjav-6PUXXJ9l7rUnBVePxcQk?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
6. **Approve Order:** Click ‘Approve’ and confirm the transaction from your wallet.&#x20;

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfUG9DdwA7NuIRcFFokFUvX0y8Tpf7cC8aTGLtlggcvnuOaNzjFTzszlbGJp040nsZbhTlC4hp56LhhJk404ptLPKtx7EMIEuDhcTwHGpkvnglLdJFud2OOmtuvblGgE7rH39QhRgNbJvEJqdpqi83RTyU?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
7. Once your transaction is approved, your TWAP order will run in the background. You can view the order history and progress on the page.&#x20;

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXf8lLgoT08A8XGc6oitU88h5uTiXZotmNE6gMugvvdwUaum8f8RheoX1CLIgIyNZ351BIfl4dqrOBGLq_6D9dz-QYUW1TMIq5mIJ8UPo5WXnk-k_W4jt0ArvZYB_VfseYX4cdXuMQXetfS22MaSpPWVR24C?key=xM5JAS6wk0CyvR1l-mKEOw" alt="" width="375"><figcaption></figcaption></figure>
