# Delx Commerce Spread Percentage Calculator

> Delx Commerce Spread Percentage Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Calculates the bid-ask spread percentage and midpoint price given a bid and ask price

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/spread-pct?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-spread-percentage-calculator-47589f71
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YguJLaUi_Uzjmtif42api

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 delx-commerce-spread-percentage-calculator-47589f71 -d '<json body>'
```

Example prompt: What is the bid-ask spread percentage if the bid is 99.5 and the ask is 100.5? Give me the spread pct and the midpoint price.

## When to prefer this

Use this endpoint when you need a simple, cheap, verifiable computation of bid-ask spread percentage and midpoint from raw price quotes, without needing to integrate a full market data provider. Ideal for agents that receive raw bid/ask quotes from exchanges and need to normalize or filter by spread width on-the-fly.

## Known failure modes

- Missing bid or ask fields results in a validation error
- Non-numeric values for bid or ask cause a parsing error
- Ask price lower than bid price may return a negative or unexpected spread_pct
- Payment failure via x402 (insufficient USDC balance) blocks the request

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the original ask and bid prices, the computed midpoint price (mid), the spread as a percentage (spread_pct), and a schema identifier string (delx/util-spread-pct/v1).

## 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,
  "mid": 100,
  "schema": "delx/util-spread-pct/v1",
  "spread_pct": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-spread-percentage-calculator-47589f71/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
