# TWAP

### TWAP (Time-Weighted Average Price)

A **TWAP order** divides a large order into many smaller sub-orders and executes them gradually over a selected period of time.\
This helps you achieve a more stable average price, reduce market impact, and avoid large slippage spikes, especially useful when entering or exiting big positions or when you want a smooth DCA-like execution.

TWAP works for both Spot and Perpetual markets on Supercexy.

{% embed url="<https://youtu.be/fxDyPEFF8Cs>" %}

***

### How to Open a TWAP Order

1. **Select “TWAP”**\
   Choose TWAP from the order type menu.
2. **Choose Long or Short**\
   Decide whether you want to accumulate (long) or distribute (short) your position.
3. **Enter Quantity or USDC Value**
   * **Quantity:** fixed amount of the asset per sub-order.
   * **USDC Value:** dynamic sizing; each sub-order calculates the correct amount of asset based on *the live price* at execution time.
4. **Set Running Time**\
   You can choose the duration of the TWAP using:
   * **Hours/Mins**, or
   * **Months/Days**\
     This allows durations from a few minutes all the way to **multiple months**.
5. **Set Execution Frequency**\
   Choose how often each sub-order executes (e.g., every 10s, 15s, 30s, 1m, etc.).
6. **Optional Controls**
   * **Set Min/Max Price:** define price boundaries for allowable execution.
   * **Reduce Only:** only closes or scales down positions; never opens new ones.
7. **Confirm**\
   The TWAP begins automatically and continues until the entire duration is completed.

***

### Advantages of TWAP on Supercexy

#### 1. Extended Duration (Minutes → Months)

You can run long-term automated strategies that are **not possible on Hyperliquid**, which only supports short-duration TWAPs.

#### 2. Custom Execution Frequency

Choose exactly how often each sub-order executes (e.g., every 10s, 15s, 30s, 1m, etc.).\
This level of frequency customization is an additional feature provided by Supercexy’s execution layer, and is not configurable in the standard Hyperliquid interface.

#### 3. Dynamic Sizing

When using USDC as sizing:

* Each sub-order calculates the correct amount of the asset based on the exact price at execution.
* Example:\
  “Buy $500 HYPE every minute for 5 minutes” will always try to buy exactly $500 worth of HYPE each time, regardless of price movement.

#### 4. Min/Max Price Control

You can define:

* A minimum price you’re willing to pay
* A maximum price you’re willing to pay

Your TWAP will only execute within those boundaries.

#### 5. Private Execution

TWAPs are monitored and executed in Supercexy’s private infrastructure:

* Your TWAPs are not visible to the public orderbook
* Only executed trades appear on the Hyperliquid blockchain
* Prevents front-running and orderbook signaling

#### 6. Ideal for Large Orders and DCA

TWAP reduces market impact and gives you smoother execution over time:

* Great for accumulation
* Great for distribution
* Great for automated long-term strategies
* Works in both spot and perps


---

# 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://supercexy.gitbook.io/supercexy-docs/trading/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.
