---
title: "Option Calculator"
method: GET
path: "/api/tools/option-calculator"
tags: ["Tools"]
---

# Option Calculator

`GET /api/tools/option-calculator`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/tools/option-calculator`
- Auth: HTTP bearer

Project intrinsic-value P&L across a fan of underlying-price moves.

## Query parameters

- `underlying` string, required: Underlying symbol, e.g. SPY
- `strike` number, required: Strike price
- `expiration` string, required: Expiration date (YYYY-MM-DD)
- `option_type` 'C' | 'P', required: Option type: C or P
- `num_contracts` integer: Number of contracts (each contract = 100 shares).
- `steps` integer: Number of price-move scenarios to project (1–100).
- `step_pct` number: Percent move per step as a fraction (max 0.01).
- `fee_per_contract` number: Brokerage fee per contract.

## Response `200`

Successful Response

- OptionCalculatorResponse
  - `underlying` string, required
  - `strike` number, required
  - `expiration` string, date, required
  - `option_type` 'C' | 'P', required
  - `num_contracts` integer, required
  - `steps` integer, required
  - `step_pct` number, required
  - `fee_per_contract` number, required
  - `spot_price` number, required
  - `entry_price` number, required
  - `entry_price_source` string, required: Which option-chain field was used as the entry price (mid/last/bid_ask_avg).
  - `quote_timestamp` string, date-time, nullable
  - `total_cost` number, required: entry_price × num_contracts × 100 + num_contracts × fee_per_contract
  - `total_fees` number, required
  - `breakeven_price` number, required
  - `pct_move_to_breakeven` number, required
  - `scenarios` OptionCalculatorScenario[], required
    - `pct_move` number, required: Percent move applied to spot for this step.
    - `underlying_price` number, required: Underlying price after the move.
    - `intrinsic_per_contract` number, required: Intrinsic value of one contract at this underlying price.
    - `intrinsic_position` number, required: Intrinsic value of the whole position (per_contract × contracts × 100).
    - `pnl` number, required: P&L assuming intrinsic value at expiration (intrinsic_position − total_cost).

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
