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

Quote a provision resize

post/dex/provisions/{boxId}/resize/check

Quote changing a provision's size without closing it. A resize also flushes pending fees.

Path parameters

  • boxIdstringrequired

    UTXO id of the provision box

Request body

LDResizeRequest · application/json
  • newSharesstringrequired

    Size the provision should become. Must be positive — a resize to zero is a redemption. Decimal string.

  • maxAmountXstring

    Most you will contribute on the ERG side, when increasing. Decimal string.

  • maxAmountYstring

    Most you will contribute on the token side, when increasing. Decimal string.

  • minAmountXstring

    Least you will take back on the ERG side, when decreasing. Decimal string.

  • minAmountYstring

    Least you will take back on the token side, when decreasing. Decimal string.

  • expectedPoolBoxIdstring

    The pool box this was quoted against

  • expectedVaultBoxIdstring

    Vault box the quote was made against. A resize also flushes.

  • expectedProvisionBoxIdstring

    The provision box this was quoted against

Responses

200Quote for the requested resizeLDResizeQuote▶
  • oldSharesstringrequired
  • newSharesstringrequired
  • deltastringrequired

    Change in shares; positive adds liquidity, negative removes it. Decimal string.

  • increasingbooleanrequired

    True when adding liquidity. Decides which bounds apply on execute.

  • amountXstringrequired

    nanoERG the pool takes when increasing, or returns when decreasing. Decimal string.

  • amountYstringrequired

    Token side of the same. Decimal string.

  • nextEntryXstringrequired

    Entry the resized provision must carry, chosen so nothing already earned is lost. Decimal string.

  • nextEntryYstringrequired
  • withinMinSupplybooleanrequired
400Malformed body, or `newShares` is not a different positive size.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

404No live provision with that id.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

409The provision moved. Re-read to find its current box id.LDStateChangedResponse▶
  • errorintegerrequired
  • reasonstringrequired
  • detailstringrequired

    What moved, and what it moved to

  • poolBoxIdstring

    Current pool box id

  • vaultBoxIdstring

    Current vault box id

  • provisionBoxIdstring

    Current provision box id

503Node unavailable. Retry.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

defaultErrorApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousClaim settled fees for a provisionNext →Resize a provision
Request
curl -X POST "http://localhost:9000/dex/provisions/{boxId}/resize/check" \
  -H "Content-Type: application/json" \
  -d '{ "newShares": "20000000000", "maxAmountX": "31875000000", "maxAmountY": "963000000", "minAmountX": "21250000000", "minAmountY": "642000000", "expectedPoolBoxId": "a1f4c2e8b7d93052416fbc8e07d21935a8c4f60b2e91d7385c06a4b1f2e83d97", "expectedVaultBoxId": "88c297f99da7172f6aa20efbead69aa40e2b7734a1873d66ca1db6b19d214db6", "expectedProvisionBoxId": "ce00d6e0f4fd3390c0519bb0d24824e1e6b06978163f4845a7cf2c1c7d8f1b65" }'
Response
{
  "oldShares": "12500000000",
  "newShares": "20000000000",
  "delta": "7500000000",
  "increasing": true,
  "amountX": "31875000000",
  "amountY": "963000000",
  "nextEntryX": "29632000000000000000000000",
  "nextEntryY": "892400000000000000000000",
  "withinMinSupply": true
}