# QuantOracle Binomial Tree Option Pricer

> QuantOracle Binomial Tree Option Pricer is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Prices American or European options using a binomial tree model and returns fair value, Greeks (delta), and early exercise premium versus Black-Scholes.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/derivatives/binomial-tree
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-eb25127f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jbaYlsET7_uFgj_dgiNZw

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 api-quantoracle-dev-eb25127f -d '<json body>'
```

Example prompt: Price an American put option where the stock is trading at $100, the strike is $105, it expires in 6 months, implied vol is 25%, risk-free rate is 5%, dividend yield is 2%, using 100 steps in the binomial tree — give me the fair value, delta, and how much of the price is early exercise premium.

## When to prefer this

Use this endpoint when you need to price American options (which can be exercised early) where Black-Scholes is insufficient, or when you want to quantify the early exercise premium explicitly. Preferable over closed-form models when dividends are present and early exercise is relevant. Good for single-option pricing with delta; use the options/strategy-optimizer sibling for multi-leg strategies.

## Known failure modes

- Missing required fields (S, K, T, sigma, r) returns 400 validation error
- Negative or zero volatility/time causes computation failure
- Invalid 'type' value (not 'call' or 'put') returns 422 unprocessable entity
- Invalid 'exercise' value (not 'american' or 'european') returns 422
- Very large step counts may time out or return slow responses
- Insufficient USDC balance causes x402 payment failure (402)

## How this service works

QuantOracle: derivatives/binomial-tree

## Output

Returns the binomial-tree option price, delta, Black-Scholes reference price, early exercise premium (binomial minus BS), number of steps used, exercise style, and server computation time in milliseconds.

## Example request

```json
{
 "input": {
  "body": {
   "K": 105,
   "S": 100,
   "T": 0.5,
   "q": 0.02,
   "r": 0.05,
   "type": "put",
   "sigma": 0.25,
   "steps": 100,
   "exercise": "american"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "K": {
   "type": "number",
   "title": "K",
   "description": "Strike price",
   "exclusiveMinimum": 0
  },
  "S": {
   "type": "number",
   "title": "S",
   "description": "Spot price of the underlying asset",
   "exclusiveMinimum": 0
  },
  "T": {
   "type": "number",
   "title": "T",
   "maximum": 30,
   "description": "Time to expiration in years",
   "exclusiveMinimum": 0
  },
  "q": {
   "type": "number",
   "title": "Q",
   "default": 0,
   "description": "Continuous dividend yield"
  },
  "r": {
   "type": "number",
   "title": "R",
   "default": 0.05,
   "description": "Risk-free interest rate (annualized)"
  },
  "type": {
   "enum": [
    "call",
    "put"
   ],
   "type": "string",
   "title": "Type",
   "default": "call",
   "description": "Option type"
  },
  "sigma": {
   "type": "number",
   "title": "Sigma",
   "description": "Volatility (annualized)",
   "exclusiveMinimum": 0
  },
  "steps": {
   "type": "integer",
   "title": "Steps",
   "default": 100,
   "maximum": 200,
   "minimum": 1,
   "description": "Number of tree steps (1-200; default 100 textbook standard)"
  },
  "exercise": {
   "enum": [
    "american",
    "european"
   ],
   "type": "string",
   "title": "Exercise",
   "default": "european",
   "description": "Exercise style"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-eb25127f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
