> For the complete documentation index, see [llms.txt](https://docs.dexpal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexpal.io/for-partners/schemas/twap-config.md).

# TWAP Config

Execution parameters for a TWAP (time-weighted average price) order. Present in [`orders`](/for-partners/endpoints/user-orders.md) when `orderType` is `twap`.

## Schema

| Field            | Type    | Required | Description                                                                                                              |
| ---------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `intervals`      | integer | yes      | Number of sub-orders the TWAP splits into.                                                                               |
| `intervalSecs`   | integer | yes      | Seconds between each sub-order execution.                                                                                |
| `maxSlippagePct` | number  | yes      | Maximum allowed slippage per interval as a percentage. `0.5` = 0.5%. If slippage exceeds this, the sub-order is skipped. |

## Example

```json
{
  "intervals": 10,
  "intervalSecs": 60,
  "maxSlippagePct": 0.5
}
```

## Notes

* Total execution duration = `intervals × intervalSecs`. The example above executes over 10 minutes.
* Each sub-order is approximately `totalSize / intervals` in size.
* Not all DEXes expose TWAP config via API — omit if unavailable.
