Skip to content
Fourohtwo

www.brainiac.software/api/v1/options-analytics/strategy-payoff

Compute payoff and profit or loss of a multi-leg option and stock position at expiry and at a valuation date, with exact breakevens, maximum profit and loss, and unlimited-risk flags. Docs: https://www.brainiac.software/api/options-analytics/strategy-payoff

BaseAnswering
POSThttps://www.brainiac.software/api/v1/options-analytics/strategy-payoff

Uptime100% of 4 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://www.brainiac.software/api/v1/options-analytics/strategy-payoff", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"dividendYield":0,"grid":{"from":80,"step":1,"to":120},"legs":[{"kind":"option","premium":5.47,"qty":1,"sigma":0.25,"strike":100,"timeYears":0.25,"type":"call"},{"kind":"option","premium":1.92,"qty":-1,"sigma":0.25,"strike":110,"timeYears":0.25,"type":"call"}],"multiplier":100,"rate":0.04,"spot":100,"valuationTimeYears":0}),
});
console.log(await res.json());

Example input

{
  "dividendYield": 0,
  "grid": {
    "from": 80,
    "step": 1,
    "to": 120
  },
  "legs": [
    {
      "kind": "option",
      "premium": 5.47,
      "qty": 1,
      "sigma": 0.25,
      "strike": 100,
      "timeYears": 0.25,
      "type": "call"
    },
    {
      "kind": "option",
      "premium": 1.92,
      "qty": -1,
      "sigma": 0.25,
      "strike": 110,
      "timeYears": 0.25,
      "type": "call"
    }
  ],
  "multiplier": 100,
  "rate": 0.04,
  "spot": 100,
  "valuationTimeYears": 0
}