# PreFlight Chain Health Check

> PreFlight Chain Health Check is a paid API for AI agents from meryol-agenticmarket-x402.hf.space, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-10).

Returns RPC health status, block head age, latency, and sync score for a specified EVM chain before signing a transaction

## Facts

- Endpoint: GET https://meryol-agenticmarket-x402.hf.space/chain/health/%7Bchain%7D
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/preflight-chain-health-check-cf3f3a9b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Sigiij8j4KGMNkPY_4kyf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability preflight-chain-health-check-cf3f3a9b
```

Example prompt: Before I sign this transaction on Base, check if the RPC nodes are healthy and current — I want to see the block head age, latency, and overall health score so I know the chain isn't lagging.

## When to prefer this

Use this endpoint when an autonomous agent needs to confirm that the target EVM chain (Ethereum, Base, Arbitrum, Optimism) has live, in-sync RPC nodes before submitting or signing a transaction. Prefer this over generic uptime monitors when you need block-level freshness metrics (head_age_s, max_lag_blocks) and per-RPC latency as part of a pre-trade or pre-sign safety checklist.

## Known failure modes

- Unknown or unsupported chain name returns 404 or error
- RPC endpoints all down returns healthy_rpc_count=0 and low score
- Chain parameter missing causes 422 validation error
- Temporary network issues may return partial RPC results
- HuggingFace Space cold start may cause initial timeout

## How this service works

Pre-trade & pre-sign checks for autonomous agents: everything an agent verifies BEFORE signing a transaction — token due diligence, calldata red-flag decoding, oracle freshness, holder concentration, bridge routing with executable calldata, cross-venue perp funding, gas and price sanity checks. EVM chains: Ethereum, Base, Arbitrum, Optimism.

## Output

A JSON object containing a list of RPC endpoints with their individual latency, block number, block timestamp, and error status; plus aggregate metrics including chain name, head age in seconds, overall health score (0-100), max lag in blocks, total and healthy RPC counts, and the median block number.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rpcs": [
   {
    "rpc": "https://mainnet.base.org",
    "error": null,
    "block_ts": 1715000000,
    "latency_ms": 120,
    "block_number": 18234567
   }
  ],
  "chain": "base",
  "notes": [],
  "head_age_s": 2,
  "score_0_100": 100,
  "max_lag_blocks": 0,
  "total_rpc_count": 3,
  "healthy_rpc_count": 3,
  "median_block_number": 18234567
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/preflight-chain-health-check-cf3f3a9b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from meryol-agenticmarket-x402.hf.space](https://www.zero.xyz/host/meryol-agenticmarket-x402.hf.space/llms.txt)
