POST/{network}/api/v1/quote
Auth X-Hub-Key from API_HUB_KEYExecute
POST /run/cowswap/{network}/api/v1/quoteCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · heavy rate classSource billing freeRead-only MEV-protected swap quote returning estimated buyAmount, sellAmount, feeAmount, gas cost, and quote expiration without submitting an order.
Try this endpoint
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sX POST "https://openapihub.dev/run/cowswap/mainnet/api/v1/quote" \
-H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
-d '{"network": "mainnet", "sellToken": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "buyToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "kind": "sell", "sellAmountBeforeFee": "1000000000000000000"}'Parameters
| name | in | type | description | |
|---|---|---|---|---|
network | path | str | required | CoW Protocol network slug: mainnet, xdai, arbitrum_one, base, polygon, avalanche, bnb, linea, or sepolia (aliases such as ethereum, eth, gnosis, arbitrum, arb, bsc, or numeric chain IDs are normalized automatically). example: mainnet |
sellToken | body | str | required | ERC-20 address of the token to sell (body field). example: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
buyToken | body | str | required | ERC-20 address of the token to buy (body field). example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
from | body | str | required | Trader address used for quote simulation (body field). example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
kind | body | str | required | Order side: 'sell' or 'buy' (body field). default: sellexample: sell |
sellAmountBeforeFee | body | str | optional | Input amount in base units before protocol fee (required when kind='sell'). example: 1000000000000000000 |
buyAmountAfterFee | body | str | optional | Desired output amount in base units (required when kind='buy'). |
Response
type: object
pagination: none
sample: {
"quote": "object",
"from": "str",
"expiration": "str",
"id": "int",
"verified": "bool",
"protocolFeeBps": "str"
}