81trust / 100
Black Scholes
by Black-Scholes option price in Markets & finance
x402 APIPassing, checked 1 h ago
Price a European option (call or put) with the Black-Scholes-Merton model, plus the greeks (delta, gamma, vega, theta, rho). Continuous dividend yield supported. Greeks are per unit: theta is per year, vega per 1.00 change in volatility, rho per 1.00 change in rate. Deterministic - matches standard references to the cent.
POST https://agent402.tools/api/black-scholes
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 189 ms typical, 189 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/black-scholes" \
-H "content-type: application/json" \
-d '{"dividendYield":0,"riskFreeRate":0.05,"spot":100,"strike":100,"timeToExpiryYears":1,"type":"call","volatility":0.2}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fblack-scholes
const res = await pay("https://agent402.tools/api/black-scholes", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"dividendYield":0,"riskFreeRate":0.05,"spot":100,"strike":100,"timeToExpiryYears":1,"type":"call","volatility":0.2}),
});
console.log(await res.json());Example input
{
"dividendYield": 0,
"riskFreeRate": 0.05,
"spot": 100,
"strike": 100,
"timeToExpiryYears": 1,
"type": "call",
"volatility": 0.2
}Example output
{
"d1": 0.35,
"d2": 0.15,
"delta": 0.6368,
"gamma": 0.0188,
"price": 10.4506,
"rho": 53.2325,
"theta": -6.414,
"type": "call",
"vega": 37.524
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 331 ms | $0.002 |
| 7 h ago | Passed | 402 | 189 ms | $0.002 |