Skip to main content

CoW Protocol Services

Off-chain backend services for CoW Protocol — the decentralized trading protocol with batch auctions that protect traders from MEV on Ethereum and EVM networks.

Quick Start

Get the services running locally in minutes

1

Clone the repository

Clone the CoW Protocol Services repository and navigate to the project directory.
git clone https://github.com/cowprotocol/services.git
cd services
2

Start the playground environment

Launch the complete development stack using Docker Compose. This includes all services, PostgreSQL database, and a forked blockchain network.
docker compose -f playground/docker-compose.fork.yml up --build
The playground requires an RPC endpoint. Configure ETH_RPC_URL in playground/.env before starting.
3

Access the services

Once the services are running, you can interact with them:
  • Orderbook API: http://localhost:8080
  • CoW Swap UI: http://localhost:8000
  • CoW Explorer: http://localhost:8001
  • Database Admin: http://localhost:8082
The test mnemonic is: test test test test test test test test test test test junk
4

Submit your first order

Use the Orderbook API to submit a test order or interact with the CoW Swap UI in your browser.
curl -X POST http://localhost:8080/api/v1/orders \
  -H "Content-Type: application/json" \
  -d @order.json
Watch the logs in autopilot, driver, and baseline services to see the auction and settlement flow in action.

Core Services

Explore the backend services that power CoW Protocol

Orderbook

HTTP API for order submission, queries, and validation. Users and frontends interact with this service to place and track orders.

Autopilot

Protocol driver that manages auctions, determines order inclusion, and coordinates the solver competition every ~12-15 seconds.

Driver

Executes solutions on-chain by fetching liquidity, encoding calldata, simulating transactions, and submitting settlements.

Solver

Internal solver engine with baseline strategies for finding optimal routes and matching orders in batch auctions.

API Endpoints

RESTful APIs for interacting with CoW Protocol services

Orderbook API

Create orders, query order status, get fee estimates, and fetch quotes across all supported chains.

Autopilot API

Retrieve solvable orders and auction parameters for solver integration.

Driver API

Submit solutions, reveal bids, and execute settlements in the protocol.

Solver API

Internal solver interface for baseline and custom solving strategies.

Development Resources

Everything you need to contribute and deploy

Local Setup

Configure your development environment and install dependencies

Testing

Run unit tests, database tests, and end-to-end tests with cargo nextest

Playground

Use the Docker Compose playground for local development and debugging

Contributing

Code style, PR guidelines, and how to contribute to the project

Configuration

Environment variables and service configuration options

Database

PostgreSQL setup, migrations, and schema management

Ready to dive in?

Start exploring the architecture, spin up the services locally, or jump straight into the API documentation.

Get Started Now