> ## 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 Threshold Cooldown

> When the liquidation threshold may next move while the market carries debt

Reports whether the market's liquidation threshold may move now and, if not, when it may. While debt is outstanding the market refuses a second threshold move inside 24 hours of the previous one, on top of the 10 percentage point step per update that [Update Market Config](https://docs.trusset.org/endpoints/lending/update-config.md) describes. Read this before building a threshold change.

The clock starts at the last configuration write that changed the threshold. A write that leaves the threshold where it is never counts. A debt-free market is not held to the cooldown, but the move it makes starts the clock all the same, so a threshold set just before the first loan opens cannot move again for a day once that loan exists.

The last move and the debt are both read from the chain: the market stamps the time of every write that changes the threshold, and the cooldown counts from that stamp, exactly as the contract does. The lending index only adds the transaction and the threshold that write set.

## Path Parameters

**marketId** `string` *required*

The market's record ID, as `id` on [List Markets](https://docs.trusset.org/endpoints/lending/list-markets.md), not its contract address. See [Market IDs](https://docs.trusset.org/endpoints/lending/list-markets.md#market-ids).

## Response Fields

**data** `object`

**supported** `boolean`

`true`: the market enforces the cooldown. `null` when it could not be read.

**cooldownSeconds** `integer`

`86400`.

**debtOutstanding** `boolean`

Whether the market has a borrowed amount or pending liquidation debt. `null` when the chain read failed.

**stampRead** `boolean`

Whether the market's own record of its last threshold move was read. `null` when it could not be read.

**indexed** `boolean`

Whether the lending index answered for the transaction details of the last move. `null` when there is no move to describe. The cooldown never depends on it.

**lastMovedAt** `integer`

Unix seconds of the last configuration write that changed the threshold, as the market recorded it, or `null` when it has recorded none. `lastMovedAtIso` is the same as ISO 8601.

**lastMovedTxHash** `string`

That transaction, or `null` when the index does not have it yet.

**lastThresholdBps** `integer`

The threshold that write set, in basis points, or `null` when the index does not have it yet.

**nextAllowedAt** `integer`

Unix seconds from which the threshold may move again: `lastMovedAt` plus 24 hours. `null` when no move is known. `nextAllowedAtIso` is the same as ISO 8601.

**cooldownRunning** `boolean`

`true` when the market carries debt and `nextAllowedAt` is still ahead.

**canMoveNow** `boolean`

The opposite of `cooldownRunning`. `null` when the stamp, the debt or the chain time could not be read, so the answer is unknown.

**secondsUntilAllowed** `integer`

Seconds until `nextAllowedAt` while the cooldown runs, otherwise `0`.

**note** `string`

The rule in words. `null` when `supported` could not be read.

> [!WARNING]
>
> When `canMoveNow` is `null`, a chain read failed and `cooldownRunning` reads `false`. The contract still refuses a move inside the day, so a configuration write built then can revert `ConfigChangeTooSoon`. Read again before building.

```bash cURL theme={null}
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/threshold-cooldown" \
  -H "X-API-Key: trusset_your_key_here"
```

```typescript TypeScript theme={null}
const res = await fetch(
  `https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/threshold-cooldown`,
  { headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
if (!data.canMoveNow) {
  console.log(`The threshold may move again at ${data.nextAllowedAtIso}`);
}
```

```json Response - Cooldown Running theme={null}
{
  "success": true,
  "data": {
    "supported": true,
    "cooldownSeconds": 86400,
    "debtOutstanding": true,
    "stampRead": true,
    "indexed": true,
    "lastMovedAt": 1794096000,
    "lastMovedAtIso": "2026-11-07T07:20:00.000Z",
    "lastMovedTxHash": "0x9a3c6e1f4b7d02a58c1e4f7b9d2a6c0e3f5b8d1a4c7e0f3b6d9a2c5e8b1d4f72",
    "lastThresholdBps": 8000,
    "nextAllowedAt": 1794182400,
    "nextAllowedAtIso": "2026-11-08T07:20:00.000Z",
    "cooldownRunning": true,
    "canMoveNow": false,
    "secondsUntilAllowed": 50400,
    "note": "While debt is outstanding the liquidation threshold moves at most once every 24 hours, still within ten points per update; a configuration write that leaves the threshold unchanged never counts."
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `NO_MARKET_ADDRESS` | `400` | The market has no on-chain address recorded |
| `CHAIN_UNAVAILABLE` | `503` | The chain could not be read just now. Retry shortly |
| `THRESHOLD_COOLDOWN_READ_FAILED` | `500` | The cooldown could not be read for a reason no other code covers |
| `MISSING_MARKET_ID` | `400` | `marketId` is longer than 100 characters |
| `MARKET_NOT_FOUND` | `404` | No market with this ID on your instance |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.