# Absolute Spread

> Absolute Spread 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 absolute bid–ask spread (ask minus bid) from caller-supplied bid and ask prices using local deterministic math.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/spread-abs
- 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/absolute-spread-3d9b19f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RB8lANIZIW3tc6AWJtN3u

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 absolute-spread-3d9b19f6 -d '<json body>'
```

Example prompt: Calculate the absolute bid-ask spread for me — the bid is 100.45 and the ask is 100.52.

## When to prefer this

Use this endpoint when you need the raw absolute spread width in price units (not basis points or percent) for venue quality filtering, liquidity snapshots, or slippage checks, and want a stateless, deterministic computation with no external market feed dependency or API key.

## Known failure modes

- Missing bid or ask field returns a validation error
- Non-numeric values for bid or ask cause a parse or type error
- Ask less than bid (inverted market) may return a negative spread — caller must handle this case
- Payment failure via x402 prevents call execution

## How this service works

Absolute bid–ask spread for liquidity snapshots. Call when venue quality filters that use raw spread width. Returns absolute spread 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 absolute spread value computed as ask minus bid, suitable for downstream venue quality filters or liquidity metrics.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ask": {
   "type": "number",
   "description": "Input field: ask."
  },
  "bid": {
   "type": "number",
   "description": "Input field: bid."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ask": 100.5,
  "bid": 99.5,
  "schema": "delx/util-spread-abs/v1",
  "spread": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/absolute-spread-3d9b19f6/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)
