Three ways to integrate
Whether you need a quick drop-in solution or full control over the trading stack, there’s an integration path for you.
Compare approaches
| Approach | Best For | Language | Setup | Customization |
|---|---|---|---|---|
| Widget | Quick integration | JS | Minutes | Styling & config |
| SDK (TS) | Custom UIs | TypeScript | Hours | Full UI control |
| SDK (Py) | Bots & automation | Python | Hours | Programmatic |
| API | Backend services | Any | Days | Maximum |
Widget Integration
Widget
Pre-built trading interface you can embed in any web app
- Zero configuration — works immediately with sensible defaults
- Responsive design — adapts to any container size
- Multi-network — supports all CoW Protocol chains
- Themeable — customize colors and styling to match your brand
- Interactive configurator — preview and generate code at widget.cow.fi
SDK Integration
TypeScript SDK
TypeScript SDK with multiple levels of abstraction
- Multiple abstraction levels — from high-level trading functions to low-level API access
- Adapter support — works with Viem, Ethers v5, and Ethers v6
- Order management — create, sign, submit, and cancel orders
- All order types — market, limit, TWAP, and programmatic orders
When to use the SDK vs Widget
When to use the SDK vs Widget
Use the SDK when you need to:
- Build a completely custom trading UI
- Implement complex trading logic (programmatic orders, hooks)
- Integrate into a backend service or bot
- Support smart contract wallets with custom signing
- Ship quickly with minimal development
- Provide a standard swap experience
- Minimize maintenance burden
Python SDK (cow-py)
cow-py
Python SDK for trading bots, data analysis, and automation
web3.py and asyncio.
- One-call swaps —
swap_tokens()handles quoting, signing, and submission - Async/await — native asyncio support for concurrent operations
- Multi-chain — Ethereum, Gnosis, Arbitrum, Base, Polygon, Avalanche, BNB, Lens
- Type-safe — full type hints and Pydantic models
- Subgraph access — query trading data and analytics via GraphQL
API Integration
REST API
Direct HTTP access to the Orderbook API
- Full control — manage the entire order lifecycle via REST
- Language agnostic — works with any programming language
- Real-time data — access to orderbook state, auction data, and trade history
The API requires handling order signing, fee estimation, and settlement monitoring yourself. For most use cases, the SDK provides a more ergonomic experience while still giving you full control.