# Stablecoin Peg Deviation Bps

> Stablecoin Peg Deviation Bps 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-13).

Calculates the deviation in basis points between an observed stablecoin price and its target peg (typically 1.0), returning a deterministic JSON result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/peg-deviation-bps
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablecoin-peg-deviation-bps-59badd1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YtAVh7Q_9tMKsGGwZHlpp

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 stablecoin-peg-deviation-bps-59badd1e -d '<json body>'
```

Example prompt: Calculate the peg deviation in basis points for a stablecoin that has a target peg of 1.0 and is currently trading at 0.9942.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, server-side calculation of stablecoin peg deviation in basis points using caller-supplied prices — ideal for agents that already have market prices from their own feed and just need the bps math computed reliably without API keys, RPC calls, or live data dependencies. Prefer this over building the math in-agent when you want a consistent, auditable computation for monitoring, alerting, or risk threshold checks.

## Known failure modes

- Missing required fields (`peg` or `price`) returns a 400-level error
- Non-numeric input values cause validation failure
- Payment of $0.001 USDC via x402 on Base must succeed before computation is returned; failed payment yields a 402 response
- Extreme or nonsensical price values (e.g. negative prices) may produce unexpected bps results

## How this service works

Peg deviation in bps from target (usually 1.0). Call when monitoring stablecoin depegs with caller prices. Returns deviation_bps 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 JSON object containing `deviation_bps`, a numeric value representing how many basis points the observed price deviates from the target peg. The computation is deterministic, local math only — no live feeds or external data sources are consulted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "peg": {
   "type": "number",
   "description": "Target peg price (usually 1.0)"
  },
  "price": {
   "type": "number",
   "description": "Observed price"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-peg-deviation-bps/v1",
  "deviation_bps": -20.00000000000002
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablecoin-peg-deviation-bps-59badd1e/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)
