Pool price history
/dex/price/historyReserve-ratio price over a range from a background snapshot. The series ends at the live pool price observed during the refresh, which may differ from a later /dex/pool request and may include mempool state. Ranges use two-minute target block times. Check partial and stats for coverage and freshness. Stale data remains available with partial: true; requests never perform node reads.
Query parameters
rangestringdefault "24H"1H | 24H | 7D | 30DHow far back to go
bucketinteger · int32Positive bucket size in blocks. Defaults to about 60 buckets; at most 500 points including range boundaries.
Responses
200Price series for the requested rangeLDPriceHistory▶
rangestringrequiredThe range served, echoed back
changePctnumber · doublerequiredSigned fraction across the range; 0.018 is +1.8%
partialbooleanrequiredTrue when the series does not span the whole range or the snapshot is stale.
▶
historyLDPricePoint[]requiredheightinteger · int32requiredtimestampinteger · int64Unix milliseconds. Absent if unresolved.
pricenumber · doublerequiredToken per ERG with the token's decimals applied. A display value — recompute from the reserves if you need it exact.
reservesXstringrequirednanoERG the AMM traded with at this point. Decimal string.
reservesYstringrequiredRaw token units the AMM traded with at this point. Decimal string.
▶
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.
400Unknown `range`, or a `bucket` that would return too many points.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