pledges.list gives you the fact pattern the entry needs: who pledged, to whom, how much, in which transaction, and whether the pledge still stands.
Read the standing pledges
pledges.list takes the market’s contract address, not its market ID. The SDK accepts the address in lowercase or correctly checksummed, and refuses a mixed-case address whose checksum fails before sending anything.
collateralDecimals comes from markets.get, which answers only for an instance that holds the market’s record. Without one, read decimals() on the collateral token.
Each pledge carries holder, pledgee, currentAmount, and the block, timestamp and transaction of the lock that created it in lockedAt. currentAmount is the figure a standing register entry describes. amount is the high-water mark of everything ever locked under the reference.
Filter on active, not on endedAt alone. includeEnded: false still returns a pledge whose whole amount was withdrawn or split away, because the adapter emits no ending for that. Such a pledge reads currentAmount: "0", active: false and endedAt: null.
The list comes oldest first, 50 at a time by default. Page with offset and a limit from 1 to 200.
Check what the list covers
The records are rebuilt from the adapter’s own events, so the response describes the chain, not a Trusset ledger. Reading the list advances the scan, which is why a first call on a market with a long history can return a partial list. Read the parts ofindex rather than complete alone. scannedToBlock well behind the chain head means the scan has not caught up, so call again. A reason of THROTTLED is a normal answer: the scan runs at most once a minute per market, and the stored records are returned meanwhile. unparsedLogsThisScan above zero is informational and does not mean a pledge is missing. Reading the index explains every case.
deliverableAmount is the one figure read live from the adapter on each call. When it falls short of currentAmount, the pledge carries deliverableShortfall and deliverableUncertain: true. A live read that failed sets deliverableReadFailed. shortfalls counts these over the page returned, not over the whole market.
Watch for the end of a pledge
endedAt is null while the pledge stands.
A partial seizure without a release is not an ending. It lands in
changes as ENFORCED and the pledge keeps standing for the remainder. In a CUSTODY market, a return the token refuses is escrowed in the adapter for the holder to claim, and the pledge still reads RELEASED.
changes lists everything after the lock was created, oldest first, and keeps the last 100. Each entry has a kind, an amount, a block and a txHash.
A
FREEZE_SHORTFALL does not reduce currentAmount. The holder held that part unencumbered before the market let go of it, which matters when the register entry is reconciled.
Tie a pledge to a loan
No method maps a pledge’sref back to a loan. Join on lockedAt.txHash against the market’s transaction history, which records the same hash for the loan that created the lock. holder is the borrower.
markets.transactions takes the market ID, so this join is open only to an instance that holds the market’s record.
Who can read a market
Access is decided per market, not per key. A market opens to an instance that holds an active record of it. That is the issuer instance that deployed it, and the lender of record’s instance once its adoption is confirmed. It also opens to an instance whose verified wallet is nominated on it. A refusal withNOT_NOMINATED or WALLET_NOT_CONFIGURED is a statement about this instance’s access to this market. A 503 such as PLEDGE_INDEX_UNAVAILABLE says only that a read failed: it says nothing about the market, and the SDK retries it. An address that is not a market on this instance’s lending factory is refused with MARKET_NOT_V2.
