API Overview
The CoW Protocol BFF (Backend for Frontend) API provides a suite of services designed to enhance the user experience for frontend applications interacting with the CoW Protocol.Base URL
The API is accessible at:API Architecture
The BFF API is built on Fastify and provides endpoints organized into several key areas:- Tokens: Token information, pricing, and holder data
- Accounts: User balances and allowances with real-time updates
- Markets: Slippage tolerance recommendations for trading pairs
- Simulation: Transaction simulation using Tenderly
- Yield: Pool information and APR data from various DEX protocols
- Affiliate: Affiliate program management and statistics
- Notifications: Push notification subscriptions and delivery
- Hooks: CoW Hooks analytics from Dune Analytics
- Miscellaneous: Utility endpoints including API version and proxies
Chain Support
The API supports multiple blockchain networks. Chain IDs are specified in the path for most endpoints:1- Ethereum Mainnet100- Gnosis Chain11155111- Sepolia Testnet
mainnet- Ethereum Mainnetgnosis- Gnosis Chainsepolia- Sepolia Testnet
Response Format
All API responses are in JSON format. Successful responses return the requested data with appropriate HTTP status codes (200, 201, etc.). Error responses include a message field describing the error:Rate Limiting
The API implements caching headers to optimize performance. Check theCache-Control header in responses to understand caching behavior.
Getting Started
To get started with the API:- Choose the appropriate endpoint for your use case
- Construct the request URL with the correct chain ID
- Make an HTTP request (GET, POST, etc.)
- Handle the JSON response
API Documentation
Detailed documentation for each endpoint category is available in the following pages:- Authentication - No authentication required for public endpoints
- Token Endpoints - Token prices and holder data
- Account Endpoints - User balances with SSE support
- Market Endpoints - Slippage tolerance calculations
- Simulation Endpoints - Transaction simulation
- Yield Endpoints - Pool and APR information
- Affiliate Endpoints - Affiliate program management
- Notification Endpoints - Push notifications
- Hooks Endpoints - CoW Hooks analytics data
- Miscellaneous Endpoints - Utility endpoints