Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-audit-seo-quality-1775466652.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Yield Endpoints
Endpoints for retrieving liquidity pool information and APR data across multiple DEX protocols.Get Pools Information
Retrieves detailed information about liquidity pools including APR, TVL, volume, and fee data. Endpoint:POST /{chainId}/yield/pools
Path Parameters
- chainId (string, required): The blockchain network ID (e.g.,
1,100)
Request Body
Array of pool addresses to query. Pass an empty array[] to fetch all available pools.
- Empty array returns all pools (up to result limit)
- With addresses returns only specified pools
- Maximum: 1000 pool addresses
Response Fields
| Field | Type | Description |
|---|---|---|
| contract_address | string | Pool contract address |
| chain_id | number | Blockchain network ID |
| project | string | Liquidity provider / DEX protocol name |
| apr | number | Annual Percentage Rate for liquidity providers |
| fee | number | Pool fee tier as a percentage |
| tvl | number | Total Value Locked in USD |
| volume | number | Trading volume in the last 24 hours (USD) |
Code Examples
Fetch all pools:Response Example
Get Average APR by Project
Retrieves the average APR for each liquidity provider/DEX protocol. Endpoint:GET /{chainId}/yield/pools-average-apr
Path Parameters
- chainId (string, required): The blockchain network ID (e.g.,
1,100)
Code Examples
Response Example
Notes
Supported DEX Protocols
The API aggregates data from multiple liquidity providers:- Uniswap V2/V3: Concentrated liquidity pools
- Balancer: Weighted and stable pools
- Curve: Stablecoin and wrapped token pools
- Sushiswap: AMM pools
- CoW AMM: Native CoW Protocol liquidity
- Others: Additional DEX protocols based on availability
APR Calculation
APR represents the yield liquidity providers earn through:- Fee income: Trading fees collected by the pool
- Incentives: Token rewards (if applicable)
- Time period: Calculated over rolling time windows
- Precision: Rounded to 6 decimal places
TVL and Volume
Both metrics are denominated in USD:- TVL: Snapshot of current liquidity
- Volume: 24-hour rolling trading volume
Result Limit
The pools endpoint has a maximum result limit of 1000 pools. When fetching all pools (empty array), results are limited to the top pools by TVL.Caching
- Pools Average APR: Cached for 6 hours (21,600 seconds)
- Pools Info: Queries are cached at the database level for performance
Fee Tiers
| Protocol | Fee Tiers | Description |
|---|---|---|
| Uniswap V3 | 0.01%, 0.05%, 0.3%, 1% | Multiple tier options |
| Balancer | Variable | Dynamic fees |
| Curve | 0.04% typical | Low fees for stables |
| Sushiswap | 0.3% | Fixed fee |
Use Cases
Yield Comparison Dashboard:Best Practices
- Cache appropriately: Respect cache headers to reduce load
- Batch queries: Request multiple pools in a single call
- Handle missing data: Some pools may have incomplete information
- Consider impermanent loss: APR doesn’t account for IL
- Verify data: Cross-reference with protocol interfaces for critical decisions