Skip to main content

Overview

When integrating with CoW Protocol, errors can occur at four distinct stages of the order lifecycle:
  1. Quoting — requesting a price quote from the API
  2. Signing — constructing and signing the order client-side
  3. Submission — posting the signed order to the orderbook
  4. Settlement — solver execution after the order is accepted
This reference documents every common error at each stage, along with its root cause and a concrete fix.
All API errors return a JSON body with an errorType and description field. Always parse the response body for details rather than relying solely on the HTTP status code.

Quoting Errors

These errors are returned by POST /api/v1/quote when requesting a price quote.
Fix:
  • Increase the sellAmountBeforeFee to a value that exceeds the estimated fee.
  • Try a different token pair with lower gas overhead.
  • Wait for lower gas conditions if trading on Ethereum mainnet.
Fix:
  • Verify both token addresses are correct and checksummed.
  • Confirm the tokens have on-chain liquidity (check on a DEX aggregator).
  • Try a smaller trade amount.
  • Try routing through a more liquid intermediate token (e.g., WETH or USDC) by splitting into two trades.
Fix:
  • Verify the token contract address is correct for the target chain.
  • Check whether the token is a fee-on-transfer or rebasing token, as these are generally not supported.
  • Consult the supported token list for the relevant network.
Fix:
  • Ensure all required fields are present: sellToken, buyToken, from, kind, and either sellAmountBeforeFee (for sell orders) or buyAmountAfterFee (for buy orders).
  • Validate that all addresses are valid, checksummed, 42-character hex strings.
  • Ensure amounts are passed as decimal strings (not hex), without decimals.
  • Use "sell" or "buy" for the kind field.
Fix:
  • Implement exponential backoff with jitter between retries.
  • Respect Retry-After headers when present.
  • Cache quote responses where appropriate to reduce request volume.
  • See the Common Patterns section for a recommended retry strategy.
Fix:
  • Retry the request with exponential backoff (start at 1 second, max 30 seconds).
  • If the error persists for more than a few minutes, check CoW Protocol status for outages.
  • Try the staging environment (barn.api.cow.fi) to determine if the issue is environment-specific.

Signing Errors

Signing errors occur client-side when constructing the EIP-712 typed data signature. These are not API responses but runtime errors in your signing code.
Signing errors are the most common integration issue. The EIP-712 domain and type definitions must match exactly what the settlement contract expects, or the order will be rejected on submission.
Fix:Use the correct domain parameters per chain:The domain must be:
The settlement contract address is the same across all supported chains, but the chainId must match the network you are submitting to.
Fix:Use the exact type definition:
Alternatively, use the SDK’s signOrder helper which handles this automatically. See the signing schemes reference for full details.
Fix:
  • Ensure the signer (private key or connected wallet) matches the from address used when requesting the quote.
  • When using a smart contract wallet (e.g., Safe), use the presign signing scheme instead of eip712.
  • Double-check that you are not mixing up accounts in a multi-wallet setup.

Submission Errors

These errors are returned by POST /api/v1/orders when submitting a signed order to the orderbook.
Fix:
  • Verify the signingScheme field matches how you actually signed (e.g., eip712, ethsign, presign).
  • Check the EIP-712 domain separator matches the target chain (see Signing Errors).
  • Ensure the signer address matches the order’s from/owner field.
  • If using ethsign, remember the message is prefixed with \x19Ethereum Signed Message:\n32 before hashing.
Fix:
  • Use the existing order’s UID to track its status via GET /api/v1/orders/{uid}.
  • If you need a new order, change at least one parameter (e.g., validTo, sellAmount, or appData) to produce a different UID.
Fix:
  • Check the owner’s on-chain balance of the sell token.
  • Ensure the balance covers sellAmount + feeAmount.
  • If the balance will be available by settlement time (e.g., from a pending transaction), note that the API validates balance at submission time.
Fix:
  • Approve the GPv2VaultRelayer contract (0xC92E8bdf79f0507f65a392b0ab4667716BFE0110) to spend the sell token.
  • The approval amount must be at least sellAmount + feeAmount.
  • For convenience, many integrations approve type(uint256).max.
The VaultRelayer address (0xC92E8bdf79f0507f65a392b0ab4667716BFE0110) is the same on all supported chains. Do not approve the Settlement contract (0x9008D19...) directly — it will not work.
Fix:
  • Request a fresh quote and submit promptly.
  • Increase the validity window by setting a later validTo timestamp (e.g., current time + 30 minutes).
  • Note that validTo is a Unix timestamp in seconds, not milliseconds.
Fix:
  • Verify you are converting human-readable amounts to the correct token decimals only once.
  • For a token with 18 decimals, 1.0 token = "1000000000000000000".
  • Amounts must be positive integer strings without decimal points.
Fix:
  • Upload the appData JSON document first via PUT /api/v1/app_data/{hash} before submitting the order.
  • Ensure the appData field in the order is the keccak256 hash of the uploaded JSON document.
  • If using the SDK, appData is handled automatically. For direct API usage, follow the appData specification.
Fix:
  • This is not a transient error. Contact the CoW Protocol team if you believe this is in error.
Fix:
  • Implement exponential backoff with jitter.
  • Batch order logic to avoid bursts.
  • See the Common Patterns section for retry strategy.

Settlement Errors

These are not API error responses. They occur after an order has been accepted into the orderbook, during the solver competition and on-chain settlement phase. Monitor order status via GET /api/v1/orders/{uid}.
Fix:
  • Widen slippage tolerance (e.g., from 0.5% to 1-2%).
  • Increase the validTo window to give solvers more time and more auction batches.
  • For illiquid pairs, consider using a limit order with a longer validity period.
  • Check that the buy/sell amounts are still within market range.
Fix:
  • Set partiallyFillable: true in the order to allow the order to be filled incrementally across multiple batches.
  • This is particularly useful for large orders relative to available liquidity.
Fix:
  • Check the cancellation source by querying GET /api/v1/orders/{uid} and inspecting the invalidated and onchainUser fields.
  • If the cancellation was unintentional, submit a new order.
  • On-chain cancellations are irreversible.

Common Patterns

HTTP Status Code Summary

If you are calling the API directly, use exponential backoff with jitter for transient errors (429, 500).
If you are using an official SDK, prefer the SDK’s built-in rate limiting and retry handling instead of reimplementing it here. See Rate Limits & Quotas for the SDK-specific guidance, and OrderBookApi for the TypeScript SDK configuration surface.
For raw HTTP integrations, a simple retry loop looks like this:

Debugging Orders

When an order is not behaving as expected:
  1. Query the order status via GET /api/v1/orders/{uid} and inspect the status field (open, fulfilled, expired, cancelled).
  2. Check the explorer at https://explorer.cow.fi/orders/{uid} for a visual breakdown of order state, fills, and solver competition results.
  3. Verify on-chain state — confirm the owner has sufficient balance and the VaultRelayer has adequate allowance.
  4. Check solver competition via GET /api/v1/solver_competition/{auction_id} to see if solvers attempted to include the order and why they may have excluded it.
The CoW Explorer at explorer.cow.fi is the fastest way to diagnose order issues. Paste any order UID to see its full lifecycle, including solver attempts and settlement transactions.
Last modified on March 17, 2026