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

# Insurance Pool & ADL

Insurance Pool and Auto-Deleveraging (ADL) endpoints expose the current state of Ekiden's risk management system. These endpoints are intended for monitoring, analytics, and operational dashboards.

For real-time updates, subscribe to the corresponding public WebSocket topics.

## Insurance Pool

### Current State

```http theme={null}
GET /api/v1/market/insurance-pool?symbol=BTC-USDCx
```

Returns the current insurance pool state for the specified market.

Common response fields include:

* `pool_id`
* `pool_group_id`
* `cash_balance`
* `realized_pnl_cum`
* `unrealized_pnl`
* `base_equity`
* `equity`
* `group_redistribution_in`
* `group_redistribution_out`
* `group_adl_obligation`
* `adl_mode`
* `adl_trigger_reason`
* `latest_pnl_ratio`
* `updated_time`
* `inventory`

### History

```http theme={null}
GET /api/v1/market/insurance-pool/history?symbol=BTC-USDCx&start_time=1731541800000&end_time=1732146600000&limit=100
```

Supported query parameters:

| Parameter    | Description                              |
| ------------ | ---------------------------------------- |
| `symbol`     | Optional market symbol filter.           |
| `start_time` | Optional Unix timestamp in milliseconds. |
| `end_time`   | Optional Unix timestamp in milliseconds. |
| `limit`      | Maximum number of records to return.     |

***

## Auto-Deleveraging (ADL)

### Current State

```http theme={null}
GET /api/v1/market/adl-alert?symbol=BTC-USDCx
```

Returns the current ADL status for the specified market.

Common response fields include:

* `pool_id`
* `pool_group_id`
* `symbol`
* `adl_mode`
* `adl_trigger_reason`
* `latest_pnl_ratio`
* `equity`
* `updated_time`

### History

```http theme={null}
GET /api/v1/market/adl-alert/history?symbol=BTC-USDCx&start_time=1731541800000&end_time=1732146600000&limit=100
```

Supported query parameters:

| Parameter    | Description                              |
| ------------ | ---------------------------------------- |
| `symbol`     | Optional market symbol filter.           |
| `start_time` | Optional Unix timestamp in milliseconds. |
| `end_time`   | Optional Unix timestamp in milliseconds. |
| `limit`      | Maximum number of records to return.     |

***

## WebSocket Topics

Live updates are available on the public WebSocket endpoint:

```text theme={null}
wss://api.cnt.ekiden.fi/ws/public
```

Available topics:

* `insurance_pool.<symbol>`
* `adl_alert.<symbol>`
