CoW Protocol Custom Linking

Query Parameters

The CoW Protocol supports several different interfaces routing orders to it. CoW Swap, is the first interface developed on top of CoW Protocol, and the main protocol interface providing the best UI and UX. Here you will find two interfaces for trading: Swap and Limit orders, such front end supports URL query parameters to allow anyone to create a custom link to that particular front end.
Even though Swap is the main page of the front end, each page can have its own specific URL parameters that can be set, while global parameters are still used on all pages. Keep in mind that if a parameter is used on an incorrect page, this will have no effect on UI settings. Parameters not set with a URL parameter will be set to standard frontend defaults. Global# Parameter Type Description theme String Sets them to dark or light mode. Since you can use Swap or Limit orders, both of them use the same URL format, with which you can specify all the necessary parameters, such as: network id, assets for trading, recipient address, amount to sell or buy. Parameters not set with the URL parameter will be set by default.


Limit orders


All parameters are optional. - CoW Swap URL
1 - Ethereum Mainnet
Each network has a unique identifier, represented as an integer. Currently CoW Swap supports these networks: Ethereum Mainnet (networkId: 1), Gnosis chain (networkId: 100), Görli (networkId: 5)
Currency address or symbol
Wrapped native currency symbol for the current network (for Mainnet: WETH)
Currency to sell. An address or a symbol can be specified. For example: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 or WETH. Read below to understand what Wrapped native currency is.
Currency address or symbol
Currency to buy. An address or a symbol can be specified. For example: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 or WETH.
Valid Ethereum account address.
Integer or Float
Amount of currency to be sold. For example: 56000.201
Integer or Float
Amount of currency to buy. For example: 1208. Important: only one of sellAmount or buyAmount can be set for Swap. If both are set, only sellAmount will be used. In case of Limit orders, you can set both values and the price will be calculated automatically.

Wrapped native currency

Each network has a native currency and it's wrapped version. Native currency is needed to pay transaction fees. Native and wrapped currencies per network: - Ethereum Mainnet: WETH - wrapped ETH - Gnosis chain: WXDAI - wrapped XDAI - Görli: WETH - wrapped ETH

Example Usage

  • - CoW Swap main page (Swap is default)
  • - Swap page
  • - Limit orders page
  • - Swap page on Görli network
  • - Limit orders page on Gnosis chain network
  • - Swap COW to WETH
  • - Create a limit order to sell WXDAI for COW
  • - Swap 100 COW for WETH (by current market price)
  • - Create a limit order to sell 2 WETH for 6000 WXDAI