Skip to main content
POST
Builds the transaction that releases escrowed collateral from the custody adapter to its holder. This applies to CUSTODY markets only. The adapter returns collateral when a repaid loan closes, when the borrower withdraws collateral, and when a liquidation releases the part it did not seize. The collateral token enforces its own compliance rules on that transfer, so the return can be refused. Typical causes are a holder no longer verified on the token’s register, a frozen address, a compliance module rejection, or a paused token. Rather than reverting the whole operation, the adapter escrows the amount against the holder’s address.
A claim is subject to the same token rules that blocked the original return. While the restriction stands, the claim reverts after the holder has paid gas. The compliance block on Get Loan names what the token currently blocks for the borrower. Lift that restriction first, then claim.
The transaction targets the custody adapter, not the market contract. claimEscrowedCollateral() takes no arguments and pays out the escrow of the wallet that signs it. Signing with any other wallet claims that wallet’s own escrow, or reverts when it has none. holderAddress only decides whose escrow is checked before the calldata is handed back. It does not appear in the transaction and cannot redirect the claim.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs. Must be a CUSTODY market.

Body Parameters

string
Address whose escrow is to be claimed, 0x followed by 40 hex characters. When supplied, the adapter’s escrow is read first. An empty escrow is refused with NO_ESCROWED_COLLATERAL, rather than handing back a transaction that reverts once paid for. If the escrow cannot be read, the calldata is still returned and escrowedCollateral is null.

Response Fields

This endpoint always returns calldata. There is no confirm call, and the claim adds no row to the position’s history in Trusset. Read the adapter balance afterwards with Get Escrowed Collateral to see that the claim went through.
object
The claim also reverts when the adapter holds less of the collateral token than the escrow records. The escrow entry stays intact on any revert, so the holder can retry once the cause is resolved.

Error Codes