# finmath Annualized Basis Calculator

> finmath Annualized Basis Calculator is a paid API for AI agents from finmath.qzqh5rrbkz.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the annualized basis (carry) between a spot price and a futures price given days to expiry, expressed as an annualized percentage rate.

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/basis_annualized
- 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/finmath-annualized-basis-calculator-ffc4d915
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_govUZM-rVHKOMBpjaENvb

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 finmath-annualized-basis-calculator-ffc4d915 -d '<json body>'
```

Example prompt: BTC spot is $65,000 and the December futures are trading at $67,500 with 45 days until expiry — what's the annualized basis on that trade?

## When to prefer this

Use this endpoint when you need exact, deterministic annualized basis arithmetic between a spot and futures price — especially for cash-and-carry analysis, arbitrage yield estimation, or cross-exchange basis comparison. Prefer this over LLM-generated math when precision matters or when you need auditable, model-free arithmetic for financial decision-making.

## Known failure modes

- Missing required fields (spot, futures, days_to_expiry) returns a 400-level error
- days_to_expiry of zero causes division-by-zero and likely returns an error or infinity
- Negative spot or futures prices may produce nonsensical results
- Payment not included or insufficient USDC results in 402 Payment Required

## How this service works

Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.

## Output

Returns a result object containing the annualized basis as a decimal or percentage (e.g. 0.156 meaning ~15.6% APR), plus a meta object with calculation details. This tells you the implied annual yield from the spot-futures spread.

## Example request

```json
{
 "spot": 50000,
 "futures": 50500,
 "days_to_expiry": 30
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "spot",
  "futures",
  "days_to_expiry"
 ],
 "properties": {
  "spot": {
   "type": "number",
   "description": "spot"
  },
  "futures": {
   "type": "number",
   "description": "futures"
  },
  "days_to_expiry": {
   "type": "number",
   "description": "days_to_expiry"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "result",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finmath-annualized-basis-calculator-ffc4d915/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finmath.qzqh5rrbkz.workers.dev](https://www.zero.xyz/host/finmath.qzqh5rrbkz.workers.dev/llms.txt)
