Liquidations
Get Pending Liquidations
List liquidations awaiting settlement
GET
/
lending-external-securities
/
api
/
liquidations
/
{marketId}
/
pending-liquidations
curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/pending-liquidations" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/liquidations/${marketId}/pending-liquidations`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const overdue = data.pendingLiquidations.filter(l => {
const t = l.onChainData?.timestamp;
return t && Date.now() / 1000 - t > 7 * 86400;
});
{
"success": true,
"data": {
"pendingLiquidations": [
{
"id": "secliq_004",
"liquidationId": "14",
"marketLiquidationId": "2",
"marketId": "clx_secmarket_001",
"loanId": "7",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"collateralAmount": "220.000000000000000000",
"debtOwed": "21159.200000",
"tokenAddress": "0xabc...def",
"borrower": "0xabc...def",
"txHash": "0xabc...def",
"status": "PENDING",
"usdcProceeds": null,
"settledTxHash": null,
"createdAt": "2025-06-14T09:12:00.000Z",
"settledAt": null,
"onChainData": {
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"token": "0xabc...def",
"collateralAmount": "220.000000000000000000",
"collateralRemaining": "120.000000000000000000",
"debtOwed": "21159.200000",
"proceedsCollected": "9800.000000",
"borrower": "0xabc...def",
"lendingMarket": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"timestamp": 1718355120,
"settled": false,
"marketLiquidationId": "2"
}
}
],
"totalCount": 1,
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf"
}
}
Returns liquidations whose collateral sits at the router and has not yet been settled or written off. This is the operator work queue for the manual settlement workflow.
Before reading, the endpoint reconciles against the chain and adopts any on-chain liquidation the backend has not recorded, so a liquidation triggered outside this API still appears here.
Path Parameters
string
required
Market ID.
Response Fields
object
Show child attributes
Show child attributes
integer
Number of records returned. Capped at 100.
string
Router holding the collateral for this market.
array
Show child attributes
Show child attributes
string
Global router liquidation ID. Pass this to every settlement endpoint.
string
Market-local liquidation ID. Used by Handle Liquidation Timeout.
string
Market ID.
string
Loan that was liquidated.
string
Market contract.
string
Collateral seized at liquidation.
string
Debt the proceeds must cover.
string
Collateral token.
string
Borrower whose loan was liquidated.
string
Liquidation transaction hash. Reads
chain-adopted when the record was reconstructed from chain state and the original transaction could not be located.string
PENDING for every record in this list.string
ISO 8601 timestamp. Backdated to the on-chain liquidation time for adopted records.
object
Live router state, or null if the read failed.
On-Chain Data
onChainData is the authoritative view of what the router still holds.
object
Show child attributes
Show child attributes
string
Collateral originally received.
string
Collateral still held. Decreases as it is withdrawn for sale.
string
Debt to be covered, in borrow asset units.
string
Proceeds deposited so far, in borrow asset units. Increases with each reported partial sale.
string
Borrower address.
string
Market the liquidation came from.
string
Collateral token.
string
Router holding the position.
integer
Unix seconds the router received the collateral. This is when the 7 day write-off clock starts.
boolean
Whether the router considers the liquidation closed.
string
Market-local ID.
A router query for a liquidation ID that does not exist returns a zero-filled object rather than null. Treat
onChainData.timestamp === 0 as “not found”, not as a valid timestamp.Track progress with
collateralRemaining and proceedsCollected rather than status. Withdrawing collateral for sale and reporting partial sales both leave status at PENDING. Only settlement or write-off changes it.curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/pending-liquidations" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/liquidations/${marketId}/pending-liquidations`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const overdue = data.pendingLiquidations.filter(l => {
const t = l.onChainData?.timestamp;
return t && Date.now() / 1000 - t > 7 * 86400;
});
{
"success": true,
"data": {
"pendingLiquidations": [
{
"id": "secliq_004",
"liquidationId": "14",
"marketLiquidationId": "2",
"marketId": "clx_secmarket_001",
"loanId": "7",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"collateralAmount": "220.000000000000000000",
"debtOwed": "21159.200000",
"tokenAddress": "0xabc...def",
"borrower": "0xabc...def",
"txHash": "0xabc...def",
"status": "PENDING",
"usdcProceeds": null,
"settledTxHash": null,
"createdAt": "2025-06-14T09:12:00.000Z",
"settledAt": null,
"onChainData": {
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"token": "0xabc...def",
"collateralAmount": "220.000000000000000000",
"collateralRemaining": "120.000000000000000000",
"debtOwed": "21159.200000",
"proceedsCollected": "9800.000000",
"borrower": "0xabc...def",
"lendingMarket": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"timestamp": 1718355120,
"settled": false,
"marketLiquidationId": "2"
}
}
],
"totalCount": 1,
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/pending-liquidations" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/liquidations/${marketId}/pending-liquidations`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const overdue = data.pendingLiquidations.filter(l => {
const t = l.onChainData?.timestamp;
return t && Date.now() / 1000 - t > 7 * 86400;
});
{
"success": true,
"data": {
"pendingLiquidations": [
{
"id": "secliq_004",
"liquidationId": "14",
"marketLiquidationId": "2",
"marketId": "clx_secmarket_001",
"loanId": "7",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"collateralAmount": "220.000000000000000000",
"debtOwed": "21159.200000",
"tokenAddress": "0xabc...def",
"borrower": "0xabc...def",
"txHash": "0xabc...def",
"status": "PENDING",
"usdcProceeds": null,
"settledTxHash": null,
"createdAt": "2025-06-14T09:12:00.000Z",
"settledAt": null,
"onChainData": {
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"token": "0xabc...def",
"collateralAmount": "220.000000000000000000",
"collateralRemaining": "120.000000000000000000",
"debtOwed": "21159.200000",
"proceedsCollected": "9800.000000",
"borrower": "0xabc...def",
"lendingMarket": "0x70A0E25c7b768B87e658348B3b577678A173E038",
"timestamp": 1718355120,
"settled": false,
"marketLiquidationId": "2"
}
}
],
"totalCount": 1,
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf"
}
}
