LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Trading with orders
    • Providing liquidity
Run Lithos
  • Startup guide
    • Setting up an Ergo testnet node
  • Configuration
    • Node connection and security
    • Stratum and difficulty
    • Block packages
    • Batching and orders
    • Collateral and emission
    • Wallet and consolidation
    • Statistics and web panels
    • Synchronization and storage
    • Tasks and dispatchers
    • Failure modes
    • Reporting issues
Client API
  • Overview
    • getLithos client information
    • getList UTXO ids for blocks
    • getUTXO ids by block height
    • getBlock info by UTXO id
    • postBlock info for multiple UTXO ids
    • getGet a block's miner set
    • getList all pool blocks
    • getGet Lithos payouts
    • getStatistics overview
    • getMining and payment totals
    • getMining statistics by hour or day
    • getEstimate Lithos hashrate
    • getNetwork difficulty by epoch
    • getThis client's own hashrate
    • getThis client's hashrate over time
    • getThis client's payouts and claims
    • getCollateral inventory
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour locked block rewards
    • postClaim unlocked block rewards
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • getLithosDex fee vault state
    • getList your outstanding orders
    • postQuote a swap order
    • postPlace a swap order
    • postQuote a deposit order
    • postPlace a deposit order
    • postQuote a redeem order
    • postPlace a redeem order
    • postCancel an order
    • postQuote a swap
    • postQuote a swap by desired output
    • postExecute a swap
    • postQuote a liquidity deposit
    • postDeposit liquidity
    • postQuote a liquidity redemption
    • postRedeem liquidity
    • getList liquidity provisions
    • postClaim settled fees for a provision
    • postQuote a provision resize
    • postResize a provision
    • postCheck a pending fee flush
    • postFlush pending fees to the vault
    • getPool-wide fee history
    • getPool price history
    • getRecent pool activity
    • getFee history for one provision
    • getWallet balances and lending status
    • getGet Stratum information
    • getGet candidate settings
    • getGet difficulty commitment
    • postCommit a difficulty
    • getGet best NISP at height
Lithos

A decentralized mining pool protocol on Ergo. Miners build their own blocks; contracts pay them for proven work.

Live on Ergo mainnet
Protocol
  • How Lithos works
  • Mining on Lithos
  • NISPs
  • Emissions
  • LFSM contracts
Run Lithos
  • Startup guide
  • Configuration
  • LithosDex
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. Open source under the MIT licence.λίθος — stone
Docs/Client API/Lithos Dex

Pool-wide fee history

get/dex/fees/history

Accumulator-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 · int32

    First block height to include; defaults to stats.windowStartHeight and cannot precede it.

  • tointeger · int32

    Last block height to include; defaults to stats.sourceHeight and cannot exceed it.

  • bucketinteger · int32default 720

    Positive bucket size in blocks, limited to at most 500 points.

Responses

200Bucketed fee history for the poolLDFeeHistory▶
  • ▶
    historyLDFeeHistoryPoint[]required
    • heightinteger · int32required

      Block height at the end of this bucket

    • timestampinteger · int64

      Unix milliseconds at the end of this bucket. Absent if unresolved.

    • periodXstringrequired

      nanoERG fees taken during this bucket. Decimal string.

    • periodYstringrequired
    • cumulativeXstringrequired

      nanoERG fees taken from the start of the range to here. Decimal string.

    • cumulativeYstringrequired
  • partialbooleanrequired

    True 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.

  • ▶
    statsDexStatsView
    • statusstringrequired

      Freshness only. Coverage is a separate question — read historyComplete and a graph's partial.

      one ofdisabledloadingreadystaleunavailable
    • updatedAtinteger · int64

      When the last successful refresh began, in Unix milliseconds, before it read the node.

    • sourceHeightinteger · int32
    • sourceBlockIdstring

      The chain tip checked before and after the read. Current price and activity can also include the mempool.

    • windowStartHeightinteger · int32

      Earliest height you can ask for, max(0, sourceHeight - 21600).

    • coverageStartHeightinteger · int32

      Oldest retained pool snapshot, including a predecessor where one exists.

    • historyCompleteboolean

      Whether the history read reached the start of the index, or a predecessor, before the requested window.

    • refreshingbooleanrequired
    • restoredbooleanrequired

      Loaded from disk. Stale until a node read succeeds, and never overwrites newer live data.

    • errorstring

      Short refresh failure message. Details stay in the client log.

400Invalid range or bucket size, or a range outside the cached height window.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

503No cached snapshot; statistics are loading, unavailable, or disabled. Retry-After is 5 seconds.DexStatsUnavailable▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

  • ▶
    statsDexStatsViewrequired
    • statusstringrequired

      Freshness only. Coverage is a separate question — read historyComplete and a graph's partial.

      one ofdisabledloadingreadystaleunavailable
    • updatedAtinteger · int64

      When the last successful refresh began, in Unix milliseconds, before it read the node.

    • sourceHeightinteger · int32
    • sourceBlockIdstring

      The chain tip checked before and after the read. Current price and activity can also include the mempool.

    • windowStartHeightinteger · int32

      Earliest height you can ask for, max(0, sourceHeight - 21600).

    • coverageStartHeightinteger · int32

      Oldest retained pool snapshot, including a predecessor where one exists.

    • historyCompleteboolean

      Whether the history read reached the start of the index, or a predecessor, before the requested window.

    • refreshingbooleanrequired
    • restoredbooleanrequired

      Loaded from disk. Stale until a node read succeeds, and never overwrites newer live data.

    • errorstring

      Short refresh failure message. Details stay in the client log.

defaultErrorApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousFlush pending fees to the vaultNext →Pool price history
Request
curl -X GET "http://localhost:9000/dex/fees/history"
Response
{
  "history": [
    {
      "height": 1312460,
      "timestamp": 1765432100000,
      "periodX": "210000000",
      "periodY": "6350000",
      "cumulativeX": "8420000000",
      "cumulativeY": "254300000"
    }
  ],
  "partial": false,
  "stats": {
    "status": "disabled",
    "updatedAt": 0,
    "sourceHeight": 0,
    "sourceBlockId": "string",
    "windowStartHeight": 0,
    "coverageStartHeight": 0,
    "historyComplete": true,
    "refreshing": true,
    "restored": true,
    "error": "string"
  }
}