Skip to main content
POST
/
api
/
v1
/
quote
Quote a price and fee for the specified order parameters.
curl --request POST \
  --url https://api.cow.fi/mainnet/api/v1/quote \
  --header 'Content-Type: application/json' \
  --data '
{
  "kind": "sell",
  "sellAmountBeforeFee": "1234567890",
  "sellToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
  "buyToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
  "from": "0x6810e776880c02933d47db1b9fc05908e5386b96",
  "validFor": 123,
  "receiver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
  "appData": "{\"version\":\"0.9.0\",\"metadata\":{}}",
  "appDataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "sellTokenBalance": "erc20",
  "buyTokenBalance": "erc20",
  "priceQuality": "verified",
  "signingScheme": "eip712",
  "onchainOrder": false,
  "timeout": 123
}
'
{
  "quote": {
    "sellToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
    "buyToken": "0x6810e776880c02933d47db1b9fc05908e5386b96",
    "sellAmount": "1234567890",
    "buyAmount": "1234567890",
    "validTo": 123,
    "appData": "{\"version\":\"0.9.0\",\"metadata\":{}}",
    "feeAmount": "1234567890",
    "gasAmount": "150000",
    "gasPrice": "15000000000",
    "sellTokenPrice": "0.0004",
    "kind": "buy",
    "partiallyFillable": true,
    "receiver": "0x6810e776880c02933d47db1b9fc05908e5386b96",
    "appDataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "sellTokenBalance": "erc20",
    "buyTokenBalance": "erc20",
    "signingScheme": "eip712"
  },
  "expiration": "1985-03-10T18:35:18.814523Z",
  "verified": true,
  "from": "0x6810e776880c02933d47db1b9fc05908e5386b96",
  "id": 123,
  "protocolFeeBps": "2"
}

Body

application/json

The order parameters to compute a quote for.

Choose one request shape based on two decisions: how you specify the order size, and whether expiry is relative (validFor) or absolute (validTo). Use sellAmountBeforeFee when you want to quote from a total sell budget, sellAmountAfterFee when you already know the exact sell amount that should land on the order, or buyAmountAfterFee when you want an exact buy target.

kind
enum<string>
required
Available options:
sell
sellAmountBeforeFee
string
required

The total amount that is available for the order. From this value, the fee is deducted and the buy amount is calculated.

Example:

"1234567890"

sellToken
string
required

ERC-20 token to be sold

Example:

"0x6810e776880c02933d47db1b9fc05908e5386b96"

buyToken
string
required

ERC-20 token to be bought

Example:

"0x6810e776880c02933d47db1b9fc05908e5386b96"

from
string
required

20 byte Ethereum address encoded as a hex with 0x prefix.

Example:

"0x6810e776880c02933d47db1b9fc05908e5386b96"

validFor
integer

Number (uint32) of seconds that the order should be valid for.

receiver
string

An optional address to receive the proceeds of the trade instead of the owner (i.e. the order signer).

Example:

"0x6810e776880c02933d47db1b9fc05908e5386b96"

appData

AppData which will be assigned to the order.

Expects either a string JSON doc as defined on AppData or a hex encoded string for backwards compatibility.

When the first format is used, it's possible to provide the derived appDataHash field.

Example:

"{\"version\":\"0.9.0\",\"metadata\":{}}"

appDataHash
string

The hash of the stringified JSON appData doc.

If present, appData field must be set with the aforementioned data where this hash is derived from.

In case they differ, the call will fail.

Example:

"0x0000000000000000000000000000000000000000000000000000000000000000"

sellTokenBalance
enum<string>
default:erc20

Where should the sellToken be drawn from?

Available options:
erc20,
internal,
external
buyTokenBalance
enum<string>
default:erc20

Where should the buyToken be transferred to?

Available options:
erc20,
internal
priceQuality
enum<string>
default:verified

How good should the price estimate be?

Fast: The price estimate is chosen among the fastest N price estimates. Optimal: The price estimate is chosen among all price estimates. Verified: The price estimate is chosen among all verified/simulated price estimates.

NOTE: Orders are supposed to be created from verified or optimal price estimates.

Available options:
fast,
optimal,
verified
signingScheme
enum<string>
default:eip712

How was the order signed?

Available options:
eip712,
ethsign,
presign,
eip1271
onchainOrder
any
default:false

Flag to signal whether the order is intended for on-chain order placement. Only valid for non ECDSA-signed orders."

timeout
integer

User provided timeout in milliseconds. Can only be used to reduce the response time for quote requests if the default is too slow as values greater than the default will be capped to the default. Note that reducing the timeout can result in worse quotes because the reduced timeout might be too slow for some price estimators.

Response

Quoted order parameters and quote metadata.

An order quote returned by the backend, including base order parameters plus quote metadata such as expiration and id.

If your integration applies client-side slippage or partner fees before signing, recompute the signing amounts before order creation.

quote
object
required

The quoted order parameters returned by the backend. These values can be signed directly only if they are submitted unchanged. If you apply client-side slippage or partner fees, recompute the signing amounts first.

expiration
string
required

Expiration date of the offered fee. Order service might not accept the fee after this expiration date. Encoded as ISO 8601 UTC.

Example:

"1985-03-10T18:35:18.814523Z"

verified
boolean
required

Whether it was possible to verify that the quoted amounts are accurate using a simulation.

from
string

The address of the trader for whom the quote was requested.

Example:

"0x6810e776880c02933d47db1b9fc05908e5386b96"

id
integer

Quote ID linked to a quote to enable providing more metadata when analysing order slippage.

protocolFeeBps
string

Protocol fee in basis points (e.g., "2" for 0.02%). This represents the volume-based fee policy. Only present when a volume fee is configured.

Example:

"2"

Last modified on March 17, 2026