Get Liquidity Pool Change Trend
1. Overview & Typical Use
Returns a Sankey-style data structure showing fund inflows and outflows between two points in time for a liquidity pool. startTimestamp must be later than 2022-11-21 08:00:00, and endTimestamp must be earlier than the current time.
- Typical use: liquidity pool fund-flow visualization, Sankey chart rendering.
- When not to use: to query TVL history of a liquidity pool, use “Get Liquidity Pool Liquidity Change Chart” instead.
2. Endpoint & Authentication
GET /api/stableCoin/pool/trend
For Base URL and authentication, see Common Network & Authentication.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pool | string | Yes | — | Liquidity pool contract address |
startTimestamp | integer | No | — | Start timestamp in milliseconds; must be later than 2022-11-21 08:00:00 |
endTimestamp | integer | No | Current time | End timestamp in milliseconds |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
data | array | Required | Array of Sankey nodes | — |
links | array | Required | Array of Sankey links | — |
data[] element (node)
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
name | string | Required | Node name (e.g. in, out, USDT 2023-02-06) | — |
value | string | Optional | Node value (present for start-time nodes) | USD |
links[] element (link)
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
source | string | Required | Source node name | — |
target | string | Required | Target node name | — |
value | string | Required | Flow amount | USD |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- Missing
poolparameter: returns{"message":"pool is required"}. - Empty result is not an error: when no data exists, empty arrays are returned as a normal response.
Last updated on: