Pool-wide fee history
/dex/fees/historyAccumulator-derived pool fees from a background snapshot, bucketed by height. Defaults to the cached last 21600 blocks (approximately 30 days), with 720-block buckets. Cumulative values start at the requested window, not pool genesis, and retain accumulator integer rounding. Check partial and stats for coverage and freshness. Stale data remains available with partial: true; requests never perform node reads.
Query parameters
frominteger · int32First block height to include; defaults to stats.windowStartHeight and cannot precede it.
tointeger · int32Last block height to include; defaults to stats.sourceHeight and cannot exceed it.
bucketinteger · int32default 720Positive bucket size in blocks, limited to at most 500 points.
Responses
200Bucketed fee history for the poolLDFeeHistory▶
▶
historyLDFeeHistoryPoint[]requiredheightinteger · int32requiredBlock height at the end of this bucket
timestampinteger · int64Unix milliseconds at the end of this bucket. Absent if unresolved.
periodXstringrequirednanoERG fees taken during this bucket. Decimal string.
periodYstringrequiredcumulativeXstringrequirednanoERG fees taken from the start of the range to here. Decimal string.
cumulativeYstringrequired
partialbooleanrequiredTrue when the history scan could not cover the requested window or the snapshot is stale. Values are derived from accumulator differences with integer rounding, not payment receipts.
▶
statsDexStatsViewstatusstringrequiredFreshness only. Coverage is a separate question — read
historyCompleteand a graph'spartial.one ofdisabledloadingreadystaleunavailableupdatedAtinteger · int64When the last successful refresh began, in Unix milliseconds, before it read the node.
sourceHeightinteger · int32sourceBlockIdstringThe chain tip checked before and after the read. Current price and activity can also include the mempool.
windowStartHeightinteger · int32Earliest height you can ask for, max(0,
sourceHeight- 21600).coverageStartHeightinteger · int32Oldest retained pool snapshot, including a predecessor where one exists.
historyCompletebooleanWhether the history read reached the start of the index, or a predecessor, before the requested window.
refreshingbooleanrequiredrestoredbooleanrequiredLoaded from disk. Stale until a node read succeeds, and never overwrites newer live data.
errorstringShort refresh failure message. Details stay in the client log.
400Invalid range or bucket size, or a range outside the cached height window.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503No cached snapshot; statistics are loading, unavailable, or disabled. Retry-After is 5 seconds.DexStatsUnavailable▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
▶
statsDexStatsViewrequiredstatusstringrequiredFreshness only. Coverage is a separate question — read
historyCompleteand a graph'spartial.one ofdisabledloadingreadystaleunavailableupdatedAtinteger · int64When the last successful refresh began, in Unix milliseconds, before it read the node.
sourceHeightinteger · int32sourceBlockIdstringThe chain tip checked before and after the read. Current price and activity can also include the mempool.
windowStartHeightinteger · int32Earliest height you can ask for, max(0,
sourceHeight- 21600).coverageStartHeightinteger · int32Oldest retained pool snapshot, including a predecessor where one exists.
historyCompletebooleanWhether the history read reached the start of the index, or a predecessor, before the requested window.
refreshingbooleanrequiredrestoredbooleanrequiredLoaded from disk. Stale until a node read succeeds, and never overwrites newer live data.
errorstringShort refresh failure message. Details stay in the client log.
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description