Skip to main content
Dollar-cost averaging (DCA) is a strategy where you invest a fixed amount at regular intervals, regardless of price. CoW Protocol’s TWAP (Time-Weighted Average Price) orders are ideal for this — they split a large trade into smaller parts executed at regular intervals.

How DCA via TWAP Works

A TWAP order splits your total sell amount into N equal parts, each executed at a fixed interval:
Each part executes at the best available market price at that moment. The result is a position accumulated at the average price over the period.
TWAP orders are programmatic orders created via the ComposableCoW framework. They require a Safe wallet and the Watch Tower to monitor and submit each part.

Strategy Design

Before creating the order, decide on your DCA parameters:
Each TWAP part must be large enough to be economically viable for solvers. On mainnet, parts under ~$100 equivalent may not fill reliably. On L2s (Arbitrum, Base), smaller amounts work due to lower gas costs.

Using the CoW Swap UI

The simplest way to create a DCA strategy is through the CoW Swap interface:
1

Connect your Safe wallet

TWAP orders require a Safe wallet. Connect via swap.cow.fi.
2

Select TWAP order type

Click the order type selector and choose TWAP.
3

Configure the order

  • Select your sell token (e.g., USDC) and buy token (e.g., WETH)
  • Enter the total amount to sell
  • Set the number of parts and time interval
  • Review the per-part amount and total duration
4

Set price protection

Optionally set a minimum price to avoid buying at extreme levels. This applies to each individual part.
5

Submit the order

Review and sign the transaction from your Safe. The Watch Tower will automatically submit each part at the scheduled time.
For a detailed walkthrough of TWAP in the UI, see the TWAP tutorial.

Using the TypeScript SDK

Using the Python SDK

The Python SDK has first-class TWAP support through the Twap class:

Scheduling a Future DCA

To start the DCA at a specific time (e.g., next Monday):

Cancelling a DCA

Price Protection

The buy_amount parameter serves as price protection — it sets the minimum total amount of buy tokens you’ll receive across all parts. Each individual part gets a proportional minimum:
If the market price exceeds your limit for a particular part, that part won’t execute during its window and will be skipped.
Setting a very tight buy_amount (close to market price) risks parts not executing. For DCA, a wider limit (e.g., 10–20% below market) is typically preferred — the goal is consistent accumulation, not price precision.

Monitoring

Track your DCA execution through:
  1. CoW Explorer — search for your Safe address to see each part as it fills
  2. OrderBook API — query GET /api/v1/account/{address}/orders for order status
  3. Python SDK polling — use twap.poll() to check the current part status (see TWAP Orders)

Prerequisites

1

Safe wallet

TWAP orders require a Safe with the ComposableCoW ExtensibleFallbackHandler configured. See the ComposableCoW setup guide.
2

Token approval

Approve the CoW Protocol Vault Relayer to spend your sell token from the Safe.
3

Sufficient balance

Ensure the Safe holds the full sell amount before the TWAP starts.

Next Steps

Last modified on March 12, 2026