# Delx Commerce Mid-Price Calculator

> Delx Commerce Mid-Price 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).

Computes the mid-market price from a bid and ask value pair, returning the arithmetic midpoint

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/mid-price?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-mid-price-calculator-9d39816b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5_RLEV3g483gNR-vHLYLo

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-mid-price-calculator-9d39816b -d '<json body>'
```

Example prompt: What's the mid price if the bid is 99.5 and the ask is 100.5?

## When to prefer this

Choose this endpoint when you need a simple, verifiable, pay-per-call mid-price calculation without any signup friction. It is ideal for AI agents that need real-time midpoint computation in a financial context and want cryptographically verifiable delivery settled in USDC. It does not require pre-provisioned API keys or subscriptions, making it perfect for ephemeral or automated agent workflows.

## Known failure modes

- Missing ask or bid field returns an error
- Non-numeric values for ask or bid cause validation failure
- Ask lower than bid may produce unexpected results
- Payment failure via x402 prevents API access
- Network timeout on the Base or Solana payment layer

## 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, the original bid, and the computed mid price (arithmetic average of ask and bid), along with a schema identifier string 'delx/util-mid-price/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-mid-price/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-mid-price-calculator-9d39816b/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)
