# GET /v1/xrpl/health/history

Bucketed upstream probe history with uptime and latency per node.

## Purpose

Aggregates probe samples into buckets (`1h` -> 300 s, `24h` -> 3600 s, `7d` -> 21600 s). Each bucket lists, per node, `samples`, `up`, `uptime_pct` and `avg_latency_ms`. Buckets without samples are omitted.

## When to use

To judge reliability over time before depending on the service.

## When not to use

Not for current state; use the network-health page.

## Parameters

| Name | In | Required | Description | Constraints | Example |
|---|---|---|---|---|---|
| `window` | query | no | History window. | `1h` (default), `24h` or `7d` | `24h` |

## Request example

```sh
curl -s "https://api.criptonlabs.com/v1/xrpl/health/history?window=24h"
```

## Response example (200)

```json
{
  "window": "24h",
  "bucket_seconds": 3600,
  "buckets": [
    {
      "start": "2026-10-06T11:00:00.000Z",
      "members": [
        {
          "member": "ripple-s1",
          "samples": 30,
          "up": 30,
          "uptime_pct": 100,
          "avg_latency_ms": 175
        }
      ]
    }
  ],
  "meta": {
    "ledger_index": 100234566,
    "as_of": "2026-10-06T12:00:03.000Z",
    "age_seconds": 0,
    "cache": "miss",
    "stale": false
  }
}
```

## Errors

- 400 [invalid-parameters](https://api.criptonlabs.com/errors/invalid-parameters.md)
- 429 [rate-limited](https://api.criptonlabs.com/errors/rate-limited.md)
- 503 [upstream-unavailable](https://api.criptonlabs.com/errors/upstream-unavailable.md)

## Caching

Fresh for 60 seconds; on upstream failure the last good value is served for up to 600 seconds (`meta.stale` is `true`), then the service answers 503. See the [freshness guide](https://api.criptonlabs.com/docs/guides/freshness.md).

## Rate limit

Tier `cheap`. See the [rate-limits guide](https://api.criptonlabs.com/docs/guides/rate-limits.md).

## MCP tool

There is no MCP tool for this endpoint; use REST.
