Prepare CoW Order for Signing
cow_prepare_orderGenerate EIP-712 typed data to sign a CoW Protocol order. Use after getting a quote to build the order structure for signing and submission.
Instructions
Prepare an order for signing with EIP-712.
This generates the typed data structure needed to sign a CoW Protocol order. Use this after getting a quote from cow_get_quote.
Args:
network: The blockchain network
sellToken, buyToken: Token addresses or symbols
sellAmount, buyAmount, feeAmount: Amounts from the quote
validTo: Expiration timestamp from the quote
from: The address that will sign the order
kind: Order kind (sell/buy)
partiallyFillable: Whether partial fills are allowed
receiver: Optional receiver (defaults to from)
appData: Optional app data hash
Returns:
EIP-712 typed data JSON
Foundry cast command to sign the order
curl command to submit the signed order
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | The address that will sign and own the order | |
| kind | No | Order kind | sell |
| appData | No | Optional app data hash (defaults to empty) | |
| network | No | The network to prepare the order for | mainnet |
| validTo | Yes | Unix timestamp when order expires (from quote.validTo) | |
| buyToken | Yes | The token to buy (address or symbol) | |
| receiver | No | Optional receiver address (defaults to from) | |
| buyAmount | Yes | The minimum amount to buy in wei | |
| feeAmount | Yes | The fee amount in wei (from quote) | |
| sellToken | Yes | The token to sell (address or symbol) | |
| sellAmount | Yes | The exact amount to sell in wei | |
| partiallyFillable | No | Whether the order can be partially filled |