> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Liquidation Config

> Check whether a market can be liquidated and settled

Returns the readiness of the liquidation path for a market, broken into the three independent conditions that must all hold, plus 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.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="marketId" type="string">Market ID.</ResponseField>
    <ResponseField name="marketAddress" type="string">Market contract.</ResponseField>
    <ResponseField name="liquidationRouterAddress" type="string">This market's liquidation router, resolved per market.</ResponseField>
    <ResponseField name="isConfigured" type="boolean">True only when all three conditions below hold.</ResponseField>
    <ResponseField name="routerAuthorized" type="boolean">The router accepts liquidations originating from this market. Set by the factory at deployment.</ResponseField>
    <ResponseField name="routerTokenEligible" type="boolean">The router can legally receive the collateral token under its ERC-3643 compliance rules, either as an allowlisted contract or as a verified identity. Without this, seizing collateral reverts.</ResponseField>
    <ResponseField name="operatorRoleReady" type="boolean">The registered wallet holds `OPERATOR_ROLE` on the router, which withdrawal and settlement require.</ResponseField>

    <ResponseField name="stats" type="object">
      <Expandable>
        <ResponseField name="totalLiquidations" type="integer">Lifetime liquidations on this market.</ResponseField>
        <ResponseField name="pendingLiquidationDebt" type="string">Debt seized but not yet settled, in borrow asset units.</ResponseField>
        <ResponseField name="totalAuctions" type="integer">Lifetime Dutch auctions created.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="onChainError" type="string">Present when the chain reads failed. The readiness fields are absent in that case.</ResponseField>
  </Expandable>
</ResponseField>

<Warning>
  `routerTokenEligible` is reported as `true` when the market has no identity registry recorded, 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.
</Warning>

<Note>
  `operatorRoleReady` is evaluated against the registered wallet. If you nominated a different address as `liquidationOperator` at deployment, settlement runs through that wallet rather than this API and this flag will read `false` by design.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities/api/liquidations/{marketId}/config" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "marketId": "clx_secmarket_001",
      "marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
      "liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
      "isConfigured": true,
      "routerAuthorized": true,
      "routerTokenEligible": true,
      "operatorRoleReady": true,
      "stats": {
        "totalLiquidations": 2,
        "pendingLiquidationDebt": "0.000000",
        "totalAuctions": 1
      }
    }
  }
  ```

  ```json Response - Router Not Eligible theme={null}
  {
    "success": true,
    "data": {
      "marketId": "clx_secmarket_001",
      "marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
      "liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
      "isConfigured": false,
      "routerAuthorized": true,
      "routerTokenEligible": false,
      "operatorRoleReady": true,
      "stats": {
        "totalLiquidations": 0,
        "pendingLiquidationDebt": "0.000000",
        "totalAuctions": 0
      }
    }
  }
  ```
</ResponseExample>
