Collateral inventory
/stats/collateralHow many unspent boxes match the configured collateral script and token, what they hold in total, and what they bid. This is protocol-wide inventory — not this client's spendable balance, not mining income, and no promise that the local miner can use any given box.
fees is the live bid book. A miner spends whichever collateral box pays it most, so the
distribution there is what a lender is bidding against and fees.bestNanoErg is the bid to
beat. Read it with /collateral/active, which names the individual boxes behind it.
Each background read looks at up to 1,000 boxes; hitting that cap sets partial and reports
only what was scanned. Check status and observedAt before showing the numbers as current:
loading and disabled responses hold placeholders, and a failed refresh keeps the previous
inventory under an unavailable status. The request never refreshes the inventory itself.
Responses
200The cached inventory, with freshness and completeness.CollateralStats▶
statusstringrequiredFreshness of the inventory. Only
readyis current as of the last successful check.one ofloadingdisabledreadystaleunavailableobservedAtinteger · int64When the inventory was read, in Unix milliseconds. Absent before the first successful read.
▶
sourceMiningCursorThe processed chain point a statistics result was read from.
heightintegerrequiredblockIdstringrequiredparentIdstringrequiredtimestampinteger · int64requiredThe block's own timestamp in Unix milliseconds, not the time the client read it.
boxesintegerrequiredUnspent collateral boxes seen. A partial result counts only what was scanned.
0 – 1000nanoErgstringrequiredExact total nanoERG in those boxes. Not a wallet balance and not mining income.
decimal stringpartialbooleanrequiredTrue when the scan hit its cap, or no complete observation exists yet.
▶
feesCollateralFeeStatsrequiredThe priority bids carried by the observed boxes — the book a miner picks from, since a miner spends whichever box pays it most.
Percentiles cover every observed box, floor and bid alike, because that is the distribution a lender competes against. While most boxes sit at the floor the median is
0, which is the honest answer rather than a gap in the data.bestNanoErgis the bid to beat.atFloorintegerrequiredBoxes bidding nothing.
0 – …biddingintegerrequiredBoxes offering the finder something.
0 – …unreadableintegerrequiredBoxes whose R4 could not be read. Always 0 in practice — the contract writes it — and a non-zero value means the inventory counts more boxes than the distribution does.
0 – …totalNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringbestNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringmedianNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringp90NanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal string▶
bucketsCollateralFeeBucket[]requiredThe floor band first, then quarters of break-even, then everything above it.
fromNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringtoNanoErgstringAbsent on the open-ended top band, which holds every bid above break-even.
decimal stringboxesintegerrequired0 – …
errorstringShort failure summary. Details stay in the client log.