Max Pain
workflow.run_max_painMax pain of an option expiry: the settlement price at which holders of all calls and puts together would be paid the least, from the open interest per strike (1 contract = 1 unit of the underlying). Two modes. LIVE (omit strikes): reads one expiry's open interest from Deribit (BTC, ETH; coin-settled, payouts shown in USD), Binance (BTC, ETH, XAU, XAG; USDT) or Bybit (BTC, ETH; USDT); one venue per result, venues are never merged; omit expiry to get the nearest expiry that has open interest. An expiry with no open interest yet, or where the venue leaves a contract's open interest unstated, comes back with available false and the reason, never a number. YOUR OWN DATA (pass strikes): max pain from the open interest you supply, nothing is fetched; optional spotPrice adds how far max pain sits from it. Returns maxPainStrike (the lowest if several tie; tiedStrikes lists all), the minimum and maximum total payout, total call and put open interest, the put/call open-interest ratio, and the payout at every strike (callPayoutUsd, putPayoutUsd, totalPayoutUsd). Max pain is a descriptive statistic of open positions, not a forecast of the settlement price; who holds which side, early exercise and the venue's settlement-price method are not modelled. Edge cases: your own data takes strikes (strike above zero, open interest 0 or more, finite) and an optional spotPrice, never together with exchange, underlying or expiry; ties go to the lowest strike and all tied strikes are listed. Not covered: who holds which side, hedging, early exercise and the venue settlement-price method. Use when the user asks for the max pain strike of BTC or ETH options for an expiry, or for max pain from open interest they have.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "workflow.run_max_pain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expiry | No | Live mode: expiry as YYMMDD, e.g. 261225. Omit for the nearest expiry that has open interest. Not with strikes. | |
| strikes | No | Your own data: one row per strike, { strike: number > 0, callOpenInterest: number >= 0, putOpenInterest: number >= 0 }. A strike is listed once; at least one open interest must be above 0. | |
| exchange | No | Live mode: venue to read. Default deribit. Not with strikes. | |
| spotPrice | No | Your own data: optional price today, adds the distance from max pain to it | |
| underlying | No | Live mode: Deribit BTC or ETH; Binance BTC, ETH, XAU or XAG; Bybit BTC or ETH. Default BTC. Not with strikes. |