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/Wallet

Wallet balances and lending status

get/wallet/balancesapi_key

Spendable ERG, token balances, and — under collateral — lender keys, queued and live positions, locked block rewards, and the self-collateralization settings in effect.

nanoErgs is the ERG available to spend right now: unreserved wallet boxes plus matured block rewards. Reading balances and lending status in one call means both describe the same instant.

Responses

200Current wallet balances and lending statusWalletBalances▶

This client's wallet, for both LithosDex and the collateral market. One call so a page does not have to stitch two together, and so both halves describe the same instant.

  • primaryAddressstringrequired

    The wallet's main P2PK address, where change and swept rewards land

  • nanoErgsstringrequired

    Unreserved ERG available to spend right now, unclaimed coinbases excluded — the figure a join quote's affordNow is decided against. Decimal string.

  • ▶
    tokensWalletToken[]required

    Every token the wallet holds, including LIT.

    • tokenIdstringrequired
    • namestring
    • decimalsinteger · int32
    • amountstringrequired

      Raw token units held. Decimal string.

  • ▶
    collateralWalletCollateralStatusrequired

    The collateral-market half of the wallet. Lender keys are the expensive part to compute, so the client serves them from a short-lived cache rather than rescanning per request.

    • autoCollateralizebooleanrequired

      Whether the client joins the queue on its own timer. While this is true the client refuses manual joins — the automated pass owns lender-key selection, and a manual join can take a key it is already using. Turn it off in the client config to join by hand.

    • maxOwnCollateralinteger · int32required

      Configured ceiling on live positions owned by this wallet

    • maxJoinsPerRuninteger · int32required

      Most positions one automated pass creates. Does not bound a manual join, which is limited by free lender keys, the exposure budget and the wallet balance.

    • maxLenderKeysinteger · int32required

      Wallet addresses dedicated to lending

    • maxPermitPerJoinLitstringrequired

      The permit price above which automated joins stop. Decimal string.

    • ownPositionsQueuedinteger · int32required
    • ownPositionsLiveinteger · int32required
    • ownBudgetRemaininginteger · int32required

      How many more positions the configured exposure budget allows

    • freeLenderKeysinteger · int32required

      Keys with status FREE — positions that can be opened without deriving a new key. A join needs one key per position.

    • keysDerivableinteger · int32required

      Further keys the client may derive before reaching maxLenderKeys. A join of N positions is possible when freeLenderKeys + keysDerivable >= N.

    • ▶
      lenderKeysCollateralLenderKeyStatus[]required
      • addressstringrequired
      • statusstringrequired

        FREE has no position and can join. QUEUED is waiting in the queue. ACTIVE holds a live collateral box. RETIRING held one until recently and cannot be reused yet. Only FREE keys are available to a join. One key holds at most one position; a second position under a key already in the active set is forfeited.

        one ofFREEQUEUEDACTIVERETIRING
      • positioninteger · int64

        Queue position, when QUEUED

    • ▶
      positionsCollateralPositionSummary[]required
      • kindstringrequired
        one ofQUEUEDLIVE
      • boxIdstringrequired
      • positioninteger · int64

        Queue position, when QUEUED

      • principalNanoErgsstringrequired

        Decimal string.

      • permitLitstringrequired

        Permit paid at join. Present for QUEUED positions only.

      • carriedLitstring

        LIT carried on the box — emission plus permit together. Present for LIVE positions only. Decimal string.

      • creationHeightinteger · int32required
    • ▶
      rewardsCollateralRewardSummaryrequired

      This wallet's locked coinbase rewards

      • boxesinteger · int32required

        Reward boxes held, including ones still behind the timelock

      • unlockedBoxesinteger · int32required

        How many are spendable now

      • totalNanoErgsstringrequired

        Every reward box together. Decimal string.

      • unlockedNanoErgsstringrequired

        The part past its timelock. Decimal string.

      • blocksUntilFirstUnlockinteger · int32

        Blocks until the earliest still-locked box matures. Absent when none are locked.

403Missing or wrong api_keyApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

503Node or wallet unavailable — it may be locked. 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

← PreviousFee history for one provisionNext →Get Stratum information
Request
curl -X GET "http://localhost:9000/wallet/balances" \
  -H "api_key: $LITHOS_API_KEY"
Response
{
  "primaryAddress": "3WwbzR34YmLRy3Z6WLON5hBBkX8Zm1gUHmC7tEXDNRJfHBqhsZr",
  "nanoErgs": "182400000000",
  "tokens": [
    {
      "tokenId": "86e272f770aa4ef48ad7e6d6dbe98b5069edd8383a403a8edb3ceed8a3d5cea3",
      "name": "LIT",
      "decimals": 4,
      "amount": "5420000000"
    }
  ],
  "collateral": {
    "autoCollateralize": false,
    "maxOwnCollateral": 10,
    "maxJoinsPerRun": 5,
    "maxLenderKeys": 32,
    "maxPermitPerJoinLit": "30000000000000",
    "ownPositionsQueued": 3,
    "ownPositionsLive": 7,
    "ownBudgetRemaining": 0,
    "freeLenderKeys": 4,
    "keysDerivable": 12,
    "lenderKeys": [
      {
        "address": "3WwbQFz3vgi8ChY9dM1haQLGDeQYe5U9z98bwWW4TqxxEAvyYu5y",
        "status": "ACTIVE",
        "position": 411
      }
    ],
    "positions": [
      {
        "kind": "QUEUED",
        "boxId": "ce00d6e0f4fd3390c0519bb0d24824e1e6b06978163f4845a7cf2c1c7d8f1b65",
        "position": 411,
        "principalNanoErgs": "2915000000",
        "permitLit": "19380000000",
        "carriedLit": "19380000000",
        "creationHeight": 484102
      }
    ],
    "rewards": {
      "boxes": 4,
      "unlockedBoxes": 2,
      "totalNanoErgs": "12000000000",
      "unlockedNanoErgs": "6000000000",
      "blocksUntilFirstUnlock": 0
    }
  }
}