Liquidations
Get Liquidation Config
Check whether a market can be liquidated and settled
GET
/
lending-external-securities
/
api
/
liquidations
/
{marketId}
/
config
curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": true,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": true,
"collateralTransferCode": null,
"saleRecipient": "0x5a72e0b41d3f8c62079ae4b1d38f0c95261ba473",
"saleDeliveryChecked": true,
"saleDeliveryAllowed": true,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 184,
"seizureConfigured": true,
"isConfigured": true,
"canSeizeNow": true,
"canRealizeNow": true,
"blockedReason": null,
"stats": {
"totalLiquidations": 2,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 1
}
}
}
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": false,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": false,
"collateralTransferCode": 2,
"saleRecipient": null,
"saleDeliveryChecked": false,
"saleDeliveryAllowed": null,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 92,
"seizureConfigured": false,
"isConfigured": false,
"canSeizeNow": false,
"canRealizeNow": false,
"blockedReason": "The liquidation router is not an eligible holder of the collateral token.",
"stats": {
"totalLiquidations": 0,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 0
}
}
}
Returns the readiness of the liquidation path for a market: every gate
liquidate passes through, the onward delivery of seized collateral to the sale recipient, and aggregate liquidation counters.
Call this before relying on liquidation. A market can accept loans while its liquidation path is incomplete, which leaves bad debt with no remedy.
Realization is two hops with two different signers, so readiness carries two aggregates. seizureConfigured covers everything up to and including moving collateral to the router. isConfigured covers that and one thing more: the collateral must also be able to leave the router for the sale recipient.
Path Parameters
string
required
Market ID.
Query Parameters
string
Wallet to evaluate the role and signer checks against. Omit to use your instance’s registered wallet. Anything that is not a valid address is ignored.
Response Fields
object
Show child attributes
Show child attributes
string
Market ID.
string
Market contract.
string
This market’s liquidation router, resolved per market. Also present as
routerAddress.boolean
The router accepts liquidations originating from this market. Set by the factory at deployment.
boolean
The router can legally receive the collateral token under its ERC-3643 compliance rules, either as an allow-listed contract or as a verified identity. Without this, seizing collateral reverts.
boolean
The resolved signer holds
LIQUIDATOR_ROLE on the market, which calling liquidate requires. Null when it could not be read.boolean
The resolved signer holds
OPERATOR_ROLE on the router, which withdrawal and settlement require.string
The address the role checks were resolved against, or null when none was available.
boolean
Whether the collateral token would permit the seizure transfer to the router. Null when it could not be evaluated, which includes every
FREEZE market, where collateral is frozen in place rather than moved. collateralTransferChecked says whether the check ran, and collateralTransferCode carries the restriction code below.string
The recipient the lender of record fixed for onward sale, or null when none is set.
boolean
Whether the collateral token would permit the onward transfer from the router to that recipient.
saleDeliveryChecked and saleDeliveryCode accompany it.boolean
Whether the oracle price sits outside its window, which makes
liquidate revert. priceAge in seconds accompanies it.boolean
Every gate up to and including the seizure is satisfied.
boolean
seizureConfigured, plus onward delivery to the sale recipient.boolean
seizureConfigured and the price is not stale.boolean
isConfigured and the price is not stale.string
What the collateral token asks of the router, when it could be established.
boolean
true when LIQUIDATOR_ROLE is held by a connected liquidation bot rather than by a signer wallet. liquidatorBotAddress names it.string
The address the operator-role check ran against.
operatorDeclared says whether the market records a liquidation operator at all.boolean
Whether the sale recipient is fixed on the router.
saleRecipientRotatable says whether the router supports rotating it, and configuredSaleVenue and saleVenue name the destination that applies.boolean
Whether the seizure transfer probe ran.
collateralTransferCode and collateralTransferAmount accompany it, and saleDeliveryChecked, saleDeliveryCode and saleDeliveryAmount do the same for the onward transfer.integer
Seconds since the oracle was last priced.
boolean
true when at least one gate could not be read. unverifiedSections lists which, errors carries the same as objects, and unverifiedReason states it in one sentence. A failed read is never reported as a closed gate.boolean
true only when a gate was actually read and found closed. seizureBlockedConfirmed is the same restricted to the seizure gates.string
The first gate that fails, in words. Null when nothing blocks.
object
string
Present when the chain reads failed. The readiness fields and
stats are absent in that case.routerTokenEligible is reported as true when the collateral token exposes no identity registry and no contract allow-list, because eligibility cannot be evaluated without one. That is an unknown, not a pass. Confirm the router’s compliance status out of band for such markets.operatorRoleReady and liquidatorRoleReady are evaluated against signerAddress, or against your instance’s registered wallet when it is omitted. If the market’s lender of record named a different liquidationOperator, settlement runs through that wallet rather than this API and the flag reads false by design. Pass signerAddress to ask about that wallet instead.curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": true,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": true,
"collateralTransferCode": null,
"saleRecipient": "0x5a72e0b41d3f8c62079ae4b1d38f0c95261ba473",
"saleDeliveryChecked": true,
"saleDeliveryAllowed": true,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 184,
"seizureConfigured": true,
"isConfigured": true,
"canSeizeNow": true,
"canRealizeNow": true,
"blockedReason": null,
"stats": {
"totalLiquidations": 2,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 1
}
}
}
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": false,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": false,
"collateralTransferCode": 2,
"saleRecipient": null,
"saleDeliveryChecked": false,
"saleDeliveryAllowed": null,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 92,
"seizureConfigured": false,
"isConfigured": false,
"canSeizeNow": false,
"canRealizeNow": false,
"blockedReason": "The liquidation router is not an eligible holder of the collateral token.",
"stats": {
"totalLiquidations": 0,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 0
}
}
}
Transfer Restriction Codes
collateralTransferCode and saleDeliveryCode are the collateral token’s own transfer restriction codes. 0 means the transfer is permitted, and null means the check did not run.
| Code | Meaning | Lever that lifts it |
|---|---|---|
1 | The sender is not a verified holder on this token | Restore the holder’s verified status on the token’s identity registry |
2 | The receiver is not a verified holder on this token | Restore the receiver’s verified status on the token’s identity registry |
3 | The sender address is frozen on this token | Unfreeze the sender address |
4 | The receiver address is frozen on this token | Unfreeze the receiver address |
5 | The token compliance module rejects this transfer | Lift the restriction on the token’s compliance contract |
6 | The token is paused | Un-pause the token |
7 | The sender does not hold enough unfrozen balance | Release the sender’s frozen balance |
Error Codes
| Code | HTTP | Cause |
|---|---|---|
NO_MARKET_ADDRESS | 400 | The market has no on-chain address recorded |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
⌘I
curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": true,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": true,
"collateralTransferCode": null,
"saleRecipient": "0x5a72e0b41d3f8c62079ae4b1d38f0c95261ba473",
"saleDeliveryChecked": true,
"saleDeliveryAllowed": true,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 184,
"seizureConfigured": true,
"isConfigured": true,
"canSeizeNow": true,
"canRealizeNow": true,
"blockedReason": null,
"stats": {
"totalLiquidations": 2,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 1
}
}
}
{
"success": true,
"data": {
"marketId": "clx_secmarket_001",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"routerAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
"routerAuthorized": true,
"routerTokenEligible": false,
"liquidatorRoleReady": true,
"operatorRoleReady": true,
"signerAddress": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"collateralTransferChecked": true,
"collateralTransferAllowed": false,
"collateralTransferCode": 2,
"saleRecipient": null,
"saleDeliveryChecked": false,
"saleDeliveryAllowed": null,
"saleDeliveryCode": null,
"priceStale": false,
"priceAge": 92,
"seizureConfigured": false,
"isConfigured": false,
"canSeizeNow": false,
"canRealizeNow": false,
"blockedReason": "The liquidation router is not an eligible holder of the collateral token.",
"stats": {
"totalLiquidations": 0,
"pendingLiquidationDebt": "0.000000",
"totalAuctions": 0
}
}
}
