> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pacifica.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# TWAP

> This section covers creating, cancelling, and tracking TWAP orders on Pacifica.

A TWAP (time-weighted average price) order splits an amount into smaller market orders and sends them over a set duration. For how TWAP works in the app, see [TWAP](https://docs.pacifica.fi/trading-on-pacifica/order-types/classic/twap.md).

Pacifica runs TWAPs in two ways:

* **TWAP orders.** You create them with [Create TWAP order](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/create-twap-order.md). The matching engine runs them.
* **TWAP order strategies.** You create them with [Create order strategy](https://docs.pacifica.fi/api-documentation/api/rest-api/order-strategies/create-order-strategy.md) and `strategy_type` `twap`. They add a price limit and randomized slices. See [Strategy parameters](https://docs.pacifica.fi/api-documentation/api/rest-api/order-strategies/strategy-parameters.md#twap).

The `/api/v1/orders/twap` endpoints cover TWAP orders only. The `/api/v1/twaps` endpoints list both kinds together.

* [Create TWAP order](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/create-twap-order.md): This endpoint allows users to create a TWAP order that splits an amount into market orders over a set duration.
* [Cancel TWAP order](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/cancel-twap-order.md): This endpoint allows users to cancel an open TWAP order.
* [Get open TWAP orders](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/get-open-twap-orders.md): This endpoint allows users to get the open TWAP orders on their account.
* [Get TWAP order history](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/get-twap-order-history.md): This endpoint allows users to get a summarized TWAP order history.
* [Get TWAP order history by ID](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/get-twap-order-history-by-id.md): This endpoint allows users to get every event of one TWAP order.
* [Get TWAP records](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/get-twap-records.md): This endpoint allows users to list an account's running TWAPs, from both TWAP orders and TWAP order strategies.
* [Get TWAP record history](https://docs.pacifica.fi/api-documentation/api/rest-api/twap/get-twap-record-history.md): This endpoint allows users to list an account's finished TWAPs, from both TWAP orders and TWAP order strategies.

To stream TWAP orders, subscribe to [Account TWAP orders](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-twap-orders.md) and [Account TWAP order updates](https://docs.pacifica.fi/api-documentation/api/websocket/subscriptions/account-twap-order-updates.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.