Examples
https://swap.cow.fi- CoW Swap main page (swapis default page)https://swap.cow.fi/#/swap-swappagehttps://swap.cow.fi/#/limit-limitorders pagehttps://swap.cow.fi/#/100/swap-swappage on Gnosis chain networkhttps://swap.cow.fi/#/100/limit/WXDAI/COW- Create alimitorder to sellWXDAIforCOWhttps://swap.cow.fi/#/1/swap/WETH/COW?sellAmount=100- Swap100 WETHforCOWhttps://swap.cow.fi/#/1/swap/WETH/COW?buyAmount=10000&recipient=vitalik.eth- Buy onswapsending the outcome to a custom recipient (can be either address or ens)https://swap.cow.fi/#/100/limit/WETH/WXDAI?sellAmount=2&buyAmount=6000- Create a limit order to sell2 WETHfor6000 WXDAI
Query Parameters
Even though the main page isswap, each page has it’s own specific URL parameters that can be set, in addition to global parameters that are used on all pages. Parameters not applicable to a page will have no effect on UI settings.
Fortunately, the swap and limit pages have the same URL query parameters!
URL links format
Swap
https://swap.cow.fi/#/<chainId>/swap/<sellTokenSymbolOrAddress>/<buyTokenSymbolOrAddress>?recipient=<recipient>&sellAmount=<sellAmount>&buyAmount=<buyAmount>
Limit
https://swap.cow.fi/#/<chainId>/limit/<sellTokenSymbolOrAddress>/<buyTokenSymbolOrAddress>?recipient=<recipient>&sellAmount=<sellAmount>&buyAmount=<buyAmount>
Global parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
theme | String | (determined by browser) | Sets theme to dark or light mode. |
Swap / limit parameters
All parameters are optional. If a parameter is not set, the default value will be used.
| Parameter | Type | Default | Description |
|---|---|---|---|
chainId | Integer | 1 - Ethereum Mainnet | Supported blockchains |
sellTokenSymbolOrAddress | Token symbol or address | Wrapped native token symbol for the current network (for Mainnet: WETH) | Sell token symbol or address |
buyTokenSymbolOrAddress | Token symbol or address | Buy token symbol or address | |
recipient | address | undefined | Valid Ethereum account address |
sellAmount | Integer or Float | undefined | Amount of sell token to sell |
buyAmount | Integer or Float | undefined | Amount of buy token to buy |
Each chain has a native token and it’s wrapped version. Native tokens are needed to pay any applicable transaction fees.Native and wrapped tokens per chain:
- Ethereum Mainnet:
WETH- wrappedETH - Gnosis chain:
WXDAI- wrappedXDAI - Arbitrum one:
WETH- wrappedETH - Base:
WETH- wrappedETH - Avalanche:
WAVAX- wrappedAVAX - Polygon:
WPOL- wrappedPOL - Lens:
WGHO- wrappedGHO - BNB:
WBNB- wrappedBNB - Linea:
WETH- wrappedETH - Plasma:
WXPL- wrappedXPL - Ink:
WETH- wrappedETH - Sepolia:
WETH- wrappedETH