createTwapStrategy
Executes large orders by splitting them into smaller trades at regular intervals to reduce market impact and achieve an average price over a specified duration.
Instructions
Creates a TWAP strategy that splits a large order into smaller chunks and executes them evenly over a specified time period to minimize market impact.
When to use:
You need to execute a large order without moving the market significantly
You want to achieve an average price over a specific time window
You need to avoid detection by splitting orders over time
Execution behavior:
Total size is divided by (duration / interval) to calculate each order size
Orders are placed at regular intervals (or randomized if isRandom=true)
Each order can be market or limit order based on chase parameters
Strategy stops when duration expires or size is fully executed
Important notes:
Minimum recommended duration: 300 seconds (5 minutes) for limit orders
Set maxChasePrice or triggerPrice for price protection
Enable isRandom to prevent strategy pattern detection
Rate limit: 10 requests per second per UID
Agent hint: Use this endpoint when user wants to execute a large order over time to reduce market impact. This is ideal for "buy 10 BTC over the next 5 minutes" type requests. Do not use if user wants immediate execution - use regular order creation instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| symbol | Yes | ||
| side | Yes | ||
| size | Yes | ||
| strategyType | No | twap | |
| duration | Yes | ||
| interval | No | ||
| isRandom | No | ||
| triggerPrice | No | ||
| maxChasePrice | No | ||
| chaseDistance | No | ||
| chasePercentE4 | No | ||
| reduceOnly | No | ||
| positionIdx | No | 0 | |
| leverageType | No | 0 |