Wallet balances and lending status
/wallet/balancesapi_keySpendable 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.
primaryAddressstringrequiredThe wallet's main P2PK address, where change and swept rewards land
nanoErgsstringrequiredUnreserved ERG available to spend right now, unclaimed coinbases excluded — the figure a join quote's
affordNowis decided against. Decimal string.▶
tokensWalletToken[]requiredEvery token the wallet holds, including LIT.
tokenIdstringrequirednamestringdecimalsinteger · int32amountstringrequiredRaw token units held. Decimal string.
▶
collateralWalletCollateralStatusrequiredThe 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.
autoCollateralizebooleanrequiredWhether 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 · int32requiredConfigured ceiling on live positions owned by this wallet
maxJoinsPerRuninteger · int32requiredMost 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 · int32requiredWallet addresses dedicated to lending
maxPermitPerJoinLitstringrequiredThe permit price above which automated joins stop. Decimal string.
ownPositionsQueuedinteger · int32requiredownPositionsLiveinteger · int32requiredownBudgetRemaininginteger · int32requiredHow many more positions the configured exposure budget allows
freeLenderKeysinteger · int32requiredKeys with status FREE — positions that can be opened without deriving a new key. A join needs one key per position.
keysDerivableinteger · int32requiredFurther keys the client may derive before reaching
maxLenderKeys. A join of N positions is possible whenfreeLenderKeys + keysDerivable >= N.▶
lenderKeysCollateralLenderKeyStatus[]requiredaddressstringrequiredstatusstringrequiredFREE 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 ofFREEQUEUEDACTIVERETIRINGpositioninteger · int64Queue position, when QUEUED
▶
positionsCollateralPositionSummary[]requiredkindstringrequiredone ofQUEUEDLIVEboxIdstringrequiredpositioninteger · int64Queue position, when QUEUED
principalNanoErgsstringrequiredDecimal string.
permitLitstringrequiredPermit paid at join. Present for QUEUED positions only.
carriedLitstringLIT carried on the box — emission plus permit together. Present for LIVE positions only. Decimal string.
creationHeightinteger · int32required
▶
rewardsCollateralRewardSummaryrequiredThis wallet's locked coinbase rewards
boxesinteger · int32requiredReward boxes held, including ones still behind the timelock
unlockedBoxesinteger · int32requiredHow many are spendable now
totalNanoErgsstringrequiredEvery reward box together. Decimal string.
unlockedNanoErgsstringrequiredThe part past its timelock. Decimal string.
blocksUntilFirstUnlockinteger · int32Blocks until the earliest still-locked box matures. Absent when none are locked.
403Missing or wrong api_keyApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503Node or wallet unavailable — it may be locked. Retry.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description