Look up provision NFTs
/dex/provisions/nftWhich of up to 100 tokens own a provision on a listed LithosDex pool, of either kind. A deposit's NFT has the id of the pool box the deposit spent, so a token is checked against that box first; a pool creator's NFT is named by the pool's genesis. The pool's provisions are read once for every token naming it. Each token comes back once, with provisionNft false when it owns none. When it owns one, the answer carries the pool, the provision, its share of the reserves now and how it was minted. A redeemed token owned a provision since closed. Answers hold for one block: a second request at the same tip reads nothing from the node. Open, so it can check tokens held anywhere.
Request body
LDNftLookupRequest · application/jsontokenIdsstring[]required
Responses
200One entry per distinct token id, in lower caseLDNftLookupList▶
▶
nftsLDNftLookup[]requiredtokenIdstringrequiredprovisionNftbooleanrequiredWhether this token owns a provision on a listed pool
▶
poolLDPoolSummaryOne LithosDex pool as the index last read it. Amounts are decimal strings in base units.
poolNFTstringrequiredkindstringrequiredn2tis ERG against a token,t2ttoken against tokenone ofn2tt2tutxoIdstringrequiredThe pool box the index read
inclusionHeightinteger · int32required▶
tokenXLDPoolTokenrequiredOne side of a pool. A verified token's name, ticker and decimals come from the client's verified list; any other token's from the node's token index, where whoever minted the token chose them.
tokenIdstringrequiredToken id, or
ERGfor the X side of an ERG/token poolnamestringtickerstringShort symbol. Verified tokens and ERG only.
decimalsinteger · int32verifiedbooleanrequired
▶
tokenYLDPoolTokenrequiredOne side of a pool. A verified token's name, ticker and decimals come from the client's verified list; any other token's from the node's token index, where whoever minted the token chose them.
tokenIdstringrequiredToken id, or
ERGfor the X side of an ERG/token poolnamestringtickerstringShort symbol. Verified tokens and ERG only.
decimalsinteger · int32verifiedbooleanrequired
reservesXstringrequiredreservesYstringrequiredpendingXstringrequiredFees awaiting a flush to the vault
pendingYstringrequiredsupplystringrequiredShares issued
▶
feeParamsLDFeeParamsrequiredFee numerators over
feeDenom.dexFeeNumstays in the pool;ergFeeNum/tokenFeeNumare set aside for liquidity providers.dexFeeNuminteger · int64requiredergFeeNuminteger · int64requiredtokenFeeNuminteger · int64requiredfeeDenominteger · int64requiredDenominator of every numerator above
provTokensLeftstringrequiredDeposits the pool can still take, one provision token each
pricenumber · doubleUnits of Y per unit of X at display decimals. Absent when either side's decimals are unknown.
verifiedbooleanrequiredWhether the client's verified list names this pool
genesisCheckedbooleanrequiredWhether this pool's genesis was checked. False for verified pools, which are checked by hand, and while the node could not be read.
problemsstring[]requiredGenesis facts this pool breaks. Any one can let the pool be drained.
warningsstring[]requiredRisks short of that, such as too little ERG to survive storage rent.
▶
provisionLDProvisionA liquidity provision box, with both what it has earned and what it can currently be paid.
boxIdstringrequiredProvision box id. Changes on every claim and resize.
ownerNFTstringrequiredToken that owns this provision. Unchanged by claims and resizes.
sharesstringrequiredLP shares this provision represents. Decimal string.
entryXstringrequiredAccumulator this provision last settled at. Decimal string.
entryYstringrequiredToken side of the same. Decimal string.
valuestringrequirednanoERG held by the provision box. Decimal string.
createdHeightinteger · int32requiredshareOfSupplynumber · doublerequiredaccruedXstringrequiredERG earned according to the pool, including fees not yet flushed. This is the figure to show a provider as "earned". Decimal string.
accruedYstringrequiredToken side of the same. Decimal string.
claimableXstringrequiredERG that can be paid out now. Never negative. Decimal string.
claimableYstringrequiredToken side of the same. Decimal string.
unflushedXstringrequiredaccruedX less claimableX — what a flush would release. Decimal string.
unflushedYstringrequiredToken side of the same. Decimal string.
canClaimbooleanrequiredWhether a claim would be accepted right now.
awaitingFlushbooleanrequiredTrue when nothing can be claimed until the next flush. Normal after a deposit or resize; not an error.
redeemOrderBoxIdstringPresent when an outstanding redeem order holds this provision's
ownerNFT. The provision cannot be claimed, resized or redeemed directly until that order fills or is cancelled.
amountXstringThe provision's share of the pool's X reserve now. nanoERG for an ERG/token pool.
amountYstringThe provision's share of the pool's Y reserve now
redeemedbooleanThe token owned a provision on this pool that has since been closed
▶
mintedLDNftMintHow a provision NFT was minted: by a deposit, or by its pool's genesis for the pool's creator
heightintegerrequiredsharesstringrequiredShares the provision was created with
amountXstringrequiredWhat went in on the X side, nanoERG for an ERG/token pool. For a genesis, the whole reserve, a millionth of which stays locked
amountYstringrequiredgenesisbooleanrequired
lastClaimedHeightintegerThe block that last recreated the provision with moved entries, by a claim or a resize. Absent while it has never been claimed. A refresh keeps the entries but recreates the box, so after one this is the refresh's block.
refreshBountyNanoErgstringToken/token provisions only: what a refresh may take from the provision box's ERG now
refreshableHeightintegerThe first block anyone may refresh the provision box, renewing its age before storage rent
400The request is malformed, names more than 100 tokens, or has an id that is not 64 hex characters.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503The pool index is still building, the node is unavailable, or a pool has more provisions than one scan reads. Never returns a partial answer.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