> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krokoswap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 池子

> 查询池子信息和流动性分布

# Pools API

查询 V3 流动性池子的信息。

## GET /api/v1/pools/v3/find

查找特定代币对的所有 V3 池子（每个手续费等级一个）。

### 参数

| 参数       | 类型       | 必填 | 描述      |
| -------- | -------- | -- | ------- |
| `token0` | `string` | 是  | 第一个代币地址 |
| `token1` | `string` | 是  | 第二个代币地址 |

### 响应

```json theme={null}
[
  {
    "address": "0x...",
    "fee": 500,
    "liquidity": "1234567890000000000",
    "sqrtPriceX96": "79228162514264337593543950336",
    "tick": 0,
    "price": "1.0"
  },
  {
    "address": "0x...",
    "fee": 3000,
    "liquidity": "9876543210000000000",
    "sqrtPriceX96": "79228162514264337593543950336",
    "tick": 0,
    "price": "1.0"
  }
]
```

***

## GET /api/v1/pools/:address/liquidity-distribution

获取 V3 池子的 tick 级别流动性分布数据。用于渲染深度图。

### 参数

| 参数        | 类型             | 必填 | 描述      |
| --------- | -------------- | -- | ------- |
| `address` | `string`（路径参数） | 是  | V3 池子地址 |

### 响应

```json theme={null}
{
  "poolAddress": "0x...",
  "tickLiquidity": [
    {
      "tick": -1000,
      "liquidityGross": "500000000000000000",
      "liquidityNet": "500000000000000000"
    },
    {
      "tick": -940,
      "liquidityGross": "300000000000000000",
      "liquidityNet": "-300000000000000000"
    }
  ],
  "stats": {
    "totalLiquidity": "800000000000000000",
    "totalPositions": 42
  }
}
```

| 字段               | 描述                                 |
| ---------------- | ---------------------------------- |
| `tick`           | 流动性发生变化的 tick 索引                   |
| `liquidityGross` | 引用此 tick 的总流动性                     |
| `liquidityNet`   | 穿越此 tick 时的净流动性变化（正值 = 增加，负值 = 减少） |

***

## 其他池子端点

| 端点                                          | 描述            |
| ------------------------------------------- | ------------- |
| `GET /api/v1/pools/:address/price`          | 当前池子价格        |
| `GET /api/v1/pools/:address/tvl`            | 总锁仓价值         |
| `GET /api/v1/pools/:address/volume`         | 交易量           |
| `GET /api/v1/pools/:address/apr`            | 年化收益率         |
| `GET /api/v1/pools/:address/positions`      | 活跃仓位          |
| `GET /api/v1/pools/:address/tick-liquidity` | 原始 tick 流动性数据 |
