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

> ## Agent Instructions
> These are the Ampli Intelligence docs. API base: https://si.ampli.net/api/v1. API MCP: https://si.ampli.net/mcp.
> Auth is a partner key (X-Partner-Name and X-Partner-API-Key headers) or an x402 payment in USDC on Base.
> For a single-treasury agentic wallet or Wallet-as-a-Service, use the ampli^ SDK at https://ampli.net and https://docs.ampli.net. agk_ keys and /api/v1/agent-runtime belong to that SDK.
> Use only the routes and tools documented here. Do not invent endpoints or parameters.
> The ampli^ SDK (https://ampli.net, docs at https://docs.ampli.net) can use this intelligence to deliver a single-treasury agentic wallet or Wallet-as-a-Service. This host is si.ampli.net. Auth is a partner key or an x402 payment. agk_ keys and /api/v1/agent-runtime belong to the SDK Agent API.
> Every amount is an integer string in the token's base units. USDC, EURC, USDT0, and USDG use 6 decimals (1000000 is 1 USDC). WETH and cbETH use 18. cbBTC uses 8.
> The service is non-custodial. It returns an allocation, an action plan, and calldata. It never holds keys, signs, or sends a transaction.
> APR values are percentages measured now or over the trailing 7 days. They are not forecasts and nothing here guarantees a return.
> x402 payments are verified before the work and settled only when the response is 2xx. A 400 or 422 costs nothing.
> Partner headers always win. A request with a wrong partner key returns 401 and does not fall back to payment.
> Monitor alerts arrive only on the websocket. create_monitor_session returns a token; the client must open the socket itself.
> Market names in optimize must come from list_protocols for the same chain and token. Do not guess names.

# Health

> POST /protocols/health returns peg, utilization, supply and borrows, withdrawable liquidity, TVL, and collateral backing for many tokens, markets, and vaults in one call.

```http theme={null}
POST https://si.ampli.net/api/v1/protocols/health
```

Priced per asset in the request with x402, or free with partner headers. MCP tool: `protocol_health`.

## Request

```json theme={null}
{
  "assets": [
    { "chain_id": 8453, "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" },
    { "chain_id": 1, "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" }
  ]
}
```

Each address can be:

* **An underlying token.** Returns the token's peg and every supported market for it.
* **A single market or vault.** Returns that market only.

With x402, this request has two assets, so it costs two units.

## Response

```json theme={null}
{
  "assets": [
    {
      "chain_id": 8453,
      "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "kind": "token",
      "asset_symbol": "USDC",
      "peg": { "price": 0.9998, "deviation": 0.0002 },
      "protocols": [
        {
          "protocol": "moonwell",
          "name": "Moonwell",
          "kind": "market",
          "net_apr": 5.05,
          "utilization": 0.87,
          "total_supply": "41250000000000",
          "total_borrows": "35887500000000",
          "available_liquidity": "5362500000000",
          "total_assets_usd": 41250000.0,
          "backing": {
            "sound": true,
            "largest_position": {
              "position_to_liquidity": 0.42,
              "withdrawable_usd": 5361000.0,
              "can_exit": true
            }
          }
        }
      ]
    }
  ]
}
```

In this example `total_supply` is `41250000000000` base units, which is 41,250,000 USDC, and `available_liquidity` of `5362500000000` is 5,362,500 USDC that can be withdrawn now.

| Field | Meaning |
| :- | :- |
| `peg.price` | Token price in US dollars |
| `peg.deviation` | Distance from 1.00, as a fraction. Only measured for USD stablecoins |
| `utilization` | Borrows divided by supply, from 0 to 1 |
| `total_supply`, `total_borrows` | Base units of the underlying token |
| `available_liquidity` | What can be withdrawn right now, in base units |
| `backing.sound` | Whether the collateral behind the market is inside its peg band |
| `largest_position.position_to_liquidity` | Largest holder's position divided by withdrawable liquidity |
| `largest_position.can_exit` | Whether that holder could fully withdraw now |
| `error` | Present on an asset that could not be read. Other assets still return |

Every market row also carries the APR fields from the [market list](https://docs.si.ampli.net/markets.md).

## Reading the result

| Signal | Treat as |
| :- | :- |
| `peg.deviation` above 0.03 | Depeg. The monitor alerts at this threshold |
| `utilization` above 0.95 | Withdrawals may fail and rates swing. The optimizer stops new deposits here |
| Borrows open and `available_liquidity` of `"0"` | Drained. Nobody can withdraw until borrowers repay |
| `backing.sound` is `false` | Collateral outside its band |
| `can_exit` is `false` | The largest holder could not leave today; a run would hit everyone |

These are the same rules the optimizer and the [monitor](https://docs.si.ampli.net/monitor.md) use. See [risk rules](https://docs.si.ampli.net/risk-rules.md).


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