Skip to Content
APIDeep AnalysisGet Liquidity Pool Change Trend

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

ParameterTypeRequiredDefaultDescription
poolstringYesLiquidity pool contract address
startTimestampintegerNoStart timestamp in milliseconds; must be later than 2022-11-21 08:00:00
endTimestampintegerNoCurrent timeEnd timestamp in milliseconds

4. Response

Top-level

FieldTypeRequiredDescriptionUnit/Precision
dataarrayRequiredArray of Sankey nodes
linksarrayRequiredArray of Sankey links

data[] element (node)

FieldTypeRequiredDescriptionUnit/Precision
namestringRequiredNode name (e.g. in, out, USDT 2023-02-06)
valuestringOptionalNode value (present for start-time nodes)USD

links[] element (link)

FieldTypeRequiredDescriptionUnit/Precision
sourcestringRequiredSource node name
targetstringRequiredTarget node name
valuestringRequiredFlow amountUSD

5. Errors

For HTTP status codes, see Common Errors. Key points for this endpoint:

  • Missing pool parameter: 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: