# Basis Percent Calculator

> Basis Percent Calculator 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 basis percentage between a futures price and spot price as (future − spot) / spot, enabling carry and premium/discount analysis.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/basis-pct
- 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/basis-percent-calculator-a93524b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_toTkOw3mvVVw2bmbnGN_4

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 basis-percent-calculator-a93524b9 -d '<json body>'
```

Example prompt: What's the basis percent if spot is 65000 and the futures price is 65800? I need to check whether the futures are at a premium and by how much.

## When to prefer this

Use this endpoint when you need a fast, deterministic, serverless computation of basis percent from caller-supplied spot and futures prices — especially in cash-and-carry arbitrage scans, premium/discount monitoring workflows, or any pipeline where you already have the prices and just need the ratio computed reliably without external data dependencies or API keys.

## Known failure modes

- Missing or invalid 'spot' or 'future' fields returns an error
- Spot value of zero causes a division-by-zero error
- Non-numeric inputs may return a validation error
- Payment failure via x402 will prevent response delivery

## How this service works

Basis percent = (future − spot) / spot for carry checks. Call when cash-and-carry or premium/discount scans from caller prices. Returns basis percent 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

A deterministic JSON object containing the computed basis percentage value as (future − spot) / spot, expressed as a decimal or percentage. No live market data is fetched — the calculation is performed locally from the caller-supplied prices.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "spot": {
   "type": "integer",
   "description": "Input field: spot."
  },
  "future": {
   "type": "number",
   "description": "Input field: future."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "spot": 100,
  "future": 101.5,
  "schema": "delx/util-basis-pct/v1",
  "basis_pct": 1.5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basis-percent-calculator-a93524b9/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)
