Building an integration? The API Integration Guide has the complete step-by-step fee computation with code examples. This page explains the concepts behind the fee model.
How fees work
CoW Protocol does not charge fees as a separate transaction. Instead, fees are embedded in the trade itself — deducted from the amounts you’re already swapping. This means:- Sell orders: fees reduce the buy amount you receive
- Buy orders: fees increase the sell amount you pay
Fee types
Fee pipeline
Fees are applied in a specific order, transforming the raw spot price into the final signed amounts:Current protocol fee parameters
For full definitions and calculation formulas, see Fees (Governance).
Understanding the quote response
The/quote API response is the starting point for understanding fees:
What you sign vs. what you see
For a sell order, the amounts signed into the order are:sellAmount= spot price amount (=quote.sellAmount + quote.feeAmount)buyAmount= minimum to receive after all fees and slippage
sellAmount= maximum to pay after all fees and slippagebuyAmount= exact amount to receive (= spot price)
Retrieving fee data for accounting
On-chain,feeAmount is set to zero in the order struct. This confuses many integrators looking for fee data. The actual fees are embedded in the price difference between the quoted and executed amounts.
To get fee breakdowns for a filled order:
1. Query the order details
executedSellAmount, executedBuyAmount, executedSellAmountBeforeFees, and executedFeeAmount — these reflect the actual settlement values.
2. Query the solver competition
3. Use the CoW Explorer
Visithttps://explorer.cow.fi/orders/{ORDER_UID} for a visual breakdown of the order’s fee components and settlement details.
For programmatic accounting, the TypeScript SDK and Python SDK provide typed access to order details including executed amounts and fees.
Related resources
- How Intents Are Formed — Full fee pipeline with code and diagrams
- Fees (Governance) — Current fee parameters and definitions
- Partner Fee — How integrator fees work
- Error Reference — Fee-related errors (
SellAmountDoesNotCoverFee)