Hermes Plant logo

Hermes Plant

Finance & quant APIs for AI agents

OptionLens

$0.30/call

Black-Scholes option pricing with the full Greeks.

POST /api/agent-services/options/price
financeoptionsblack-scholesgreeksdeltagammavegathetaderivativesx402agent

What it does

Deterministic Black-Scholes-Merton European option pricing and Greeks. Returns price, d1/d2, full Greeks (delta, gamma, vega, theta, rho) in canonical and conventional display units (vega per 1%, theta per day, rho per 1%), plus intrinsic value, time value, and moneyness. Supports continuous dividend yield. Pure math from caller-supplied parameters — no market-data feed, no fabrication.

  • Calls & puts with continuous dividend yield
  • Delta, gamma, vega, theta, rho
  • Intrinsic / time value and moneyness

Example request

POST /api/agent-services/options/price

{
  "spot": 100,
  "strike": 100,
  "timeToExpiry": 1,
  "riskFreeRate": 0.05,
  "volatility": 0.2,
  "optionType": "call"
}

Example response (HTTP 200)

Deterministic — the same inputs always return the same audited output.

{
  "service": "optionlens",
  "requestId": "opt-db556a1a",
  "optionType": "call",
  "price": 10.450576,
  "d1": 0.35,
  "d2": 0.15,
  "intrinsicValue": 0,
  "timeValue": 10.450576,
  "moneyness": "at-the-money",
  "greeks": {
    "delta": 0.636831,
    "gamma": 0.018762,
    "vega": 37.524035,
    "vegaPer1Pct": 0.37524,
    "theta": -6.414028,
    "thetaPerDay": -0.017573,
    "rho": 53.232483,
    "rhoPer1Pct": 0.532325
  },
  "findings": [
    {
      "rule": "valuation",
      "severity": "info",
      "why": "Black-Scholes-Merton valuation summary.",
      "evidence": "price=10.4506 d1=0.35 d2=0.15 moneyness=at-the-money",
      "fix": null
    }
  ]
}

Input schema

Top-level request fields. Nested shapes are shown in the example above and the OpenAPI spec.

FieldTypeRequiredDescription
spotnumberYesCurrent price of the underlying (> 0).
strikenumberYesOption strike price (> 0).
timeToExpirynumberYesTime to expiry in years (e.g. 0.5 = 6 months).
volatilitynumberYesAnnualized volatility (sigma) as a fraction, e.g. 0.2 for 20%.
riskFreeRatenumberAnnual continuously-compounded risk-free rate, e.g. 0.05 (default 0).
dividendYieldnumberAnnual continuous dividend yield, e.g. 0.02 (default 0).
optionTypestring'call' or 'put' (default 'call').

How to call it over x402

  1. 1. Send the request. The first unpaid call returns HTTP 402 with an x402 payment challenge — $0.30, USDC on Base, and the recipient.
  2. 2. Pay per call. Your x402 client signs the USDC payment and retries automatically — no API key, no account, no subscription. New to x402?
  3. 3. Read the result. HTTP 200 returns the computed values plus evidence-backed findings.

With the x402 fetch client (Node / TypeScript)

import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_WALLET_KEY);
const pay = wrapFetchWithPayment(fetch, account); // USDC on Base

const res = await pay("https://hermesplant.com/api/agent-services/options/price", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
  "spot": 100,
  "strike": 100,
  "timeToExpiry": 1,
  "riskFreeRate": 0.05,
  "volatility": 0.2,
  "optionType": "call"
}),
});

const result = await res.json();

Inspect the 402 with curl

curl -i -X POST https://hermesplant.com/api/agent-services/options/price \
  -H "content-type: application/json" \
  -d '{"spot":100,"strike":100,"timeToExpiry":1,"riskFreeRate":0.05,"volatility":0.2,"optionType":"call"}'
# → HTTP/1.1 402 Payment Required  (x402 challenge: price, USDC asset, Base network, recipient)
# → sign the USDC-on-Base payment and retry to receive HTTP 200

Prefer zero code? This endpoint is also exposed as a tool on the Hermes Plant MCP server, so an MCP-capable agent can call it with its own x402 wallet.

Other agent services

← All agent servicesAPI docsOpenAPI spec

Need a calculator that isn’t here yet? contact@hermesplant.com