# Delx Commerce — Order Book Imbalance Calculator

> Delx Commerce — Order Book Imbalance 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 order book imbalance ratio from displayed bid and ask sizes at the best quotes

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/ob-imbalance?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-order-book-imbalance-calculator-b6f5d1db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__gs0wBUQynf2r4eKwFZeI

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-order-book-imbalance-calculator-b6f5d1db -d '<json body>'
```

Example prompt: Calculate the order book imbalance for me — the best bid has a displayed size of 12 and the best ask has a displayed size of 8.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use computation of order book imbalance without setting up any SDK or account — ideal for agents that need a single, verifiable microstructure signal from level-1 quote data paid for in USDC on Base or Solana.

## Known failure modes

- Missing bid_size or ask_size fields returns a validation error
- Non-numeric values for sizes cause a 400 bad request
- Both sizes being zero may cause a division-by-zero or undefined imbalance result
- Payment failure via x402 prevents the computation from executing
- Extremely large size values may cause precision issues in the result

## 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 with the schema identifier 'delx/util-ob-imbalance/v1', the input bid_size and ask_size echoed back, and an imbalance value — a float representing the normalized difference between bid and ask depth (positive means bid-heavy, negative means ask-heavy, zero means balanced).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ask_size": {
   "type": "number",
   "description": "Displayed size at best ask"
  },
  "bid_size": {
   "type": "number",
   "description": "Displayed size at best bid"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-ob-imbalance/v1",
  "ask_size": 8,
  "bid_size": 12,
  "imbalance": 0.2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-order-book-imbalance-calculator-b6f5d1db/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)
