V3 Depth Price History Chart#
Use this endpoint when you want to view the liquidity depth distribution or historical price trends of a V3 Pool. Pass in the investment product ID, chart type (depth chart or price history chart), and time range. Returns the corresponding depth/price data list for rendering liquidity distribution charts or price candlestick charts. Only applicable to V3 Pool type investment products.
URL: GET /api/v6/defi/product/depth-price/chart
Request Parameters#
| Field | Type | Required | Default | Explanation |
|---|---|---|---|---|
| investmentId | String | Yes | — | Investment product ID (integer string) |
| chartType | String | No | DEPTH | Chart type: DEPTH=depth chart, PRICE=price history chart |
| timeRange | String | No | DAY | Only used when chartType=PRICE. Time range: DAY=24h, WEEK=1W |
Request Examples#
Example 1: Query Depth Chart (default, last 24h)#
GET /api/v6/defi/product/depth-price/chart?investmentId=1589649169Example 2: Query Price History Chart (last 1 week)#
GET /api/v6/defi/product/depth-price/chart?investmentId=1589649169&chartType=PRICE&timeRange=WEEKResponse Parameters#
Returns an Array, each element has the following structure:
| Field | Type | Explanation |
|---|---|---|
| tick | Integer | Tick index (has value in depth chart, empty in price history chart) |
| liquidity | String | Liquidity at this tick (has value in depth chart) |
| liquidityNet | String | Net liquidity at this tick (has value in depth chart) |
| token0Price | String | Depth chart: token0 price at this tick; Price history chart: historical token0 price at this timestamp |
| token1Price | String | Depth chart: token1 price at this tick; Price history chart: historical token1 price at this timestamp |
| timestamp | Long | Timestamp in milliseconds (only has value in price history chart) |
Response Examples#
Depth Chart (chartType=DEPTH)#
Json
{
"code": 0,
"msg": "",
"data": [
{
"tick": -32932,
"liquidity": "1234567890123456",
"liquidityNet": "500000000000000",
"token0Price": "0.9985",
"token1Price": "1.0015"
},
{
"tick": -32931,
"liquidity": "1234567890123456",
"liquidityNet": "0",
"token0Price": "0.9986",
"token1Price": "1.0014"
}
]
}
Price History Chart (chartType=PRICE)#
Json
{
"code": 0,
"msg": "",
"data": [
{
"token0Price": "0.9985",
"token1Price": "1.0015",
"timestamp": 1741737600000
},
{
"token0Price": "0.9990",
"token1Price": "1.0010",
"timestamp": 1741651200000
}
]
}
Error Example: Non-V3 Pool Investment Product#
Json
{
"code": 84032,
"msg": "This api is only supported for V3 DEX Pool products",
"data": null
}