# Pairs Z-Score

> Pairs Z-Score is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the z-score, mean, and standard deviation of a price-spread series for pairs trading mean-reversion analysis.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/pairs-zscore
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pairs-z-score-89e6aa8a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bB3zmBOUpXgoGUU4_6ENl

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 pairs-z-score-89e6aa8a -d '<json body>'
```

Example prompt: Calculate the z-score for this pairs trading spread series so I can see how far it is from the mean: [12.3, 12.8, 11.9, 13.1, 14.2, 15.0, 14.7, 13.5, 12.1, 11.5].

## When to prefer this

Use this endpoint when you need a fast, cheap, deterministic z-score computation for a pairs trading spread series without any external market data dependencies. Ideal for AI agents running statistical arbitrage workflows that need to evaluate mean-reversion signals programmatically. Prefer this over rolling your own math when you want a reliable, payable microservice with consistent JSON output. Not appropriate for live price fetching or portfolio management — the caller must supply the spread series.

## Known failure modes

- Empty or missing spread array returns an error
- Spread array with insufficient data points (e.g. fewer than 2) may yield undefined standard deviation
- Non-numeric values in the spread array cause a validation or computation error
- Payment failure or insufficient USDC balance prevents the call from executing

## How this service works

Z-score of spread series for pairs trading. Call when mean-reversion signals from a price-spread series. Returns zscore, mean, stdev as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a deterministic JSON object containing the z-score of the latest spread value (or the full series), the mean of the spread series, and the standard deviation — all computed locally with no external data dependencies.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "spread": {
   "type": "array",
   "description": "Spread series for pairs z-score"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mean": 1,
  "stdev": 0.1290994448735805,
  "schema": "delx/util-pairs-zscore/v1",
  "zscore": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pairs-z-score-89e6aa8a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
