Skip to content

Guides Get started

Quickstart

Get a key, look up a quote, then work out the probability of profit on a call spread.

  1. Get an API key

    Sign up and add a card with Stripe. The Free plan (1,000 requests a month) is never charged. Confirm your email, then copy your key from your account page. Keys start with opc_live_.

    Keep it out of your code: put it in an environment variable.

    Shell
    export OPC_API_KEY="opc_live_..."
  2. Look up a quote

    /quote works without a key, a few times a day, so you can try it right now.

    curl "https://www.optionsprofitcalculator.com/api/v1/quote?symbol=AAPL"
    Response
    {
      "success": true,
      "data": {
        "symbol": "AAPL",
        "price": 344.87,
        "last": 344.87,
        "bid": 344.8,
        "ask": 345,
        "close": 342.56,
        "iv30": 30.077,
        "delayed": true
      }
    }
  3. Calculate probability of profit

    Send the legs of a position. Leave out prices and we use the current market.

    curl -X POST https://www.optionsprofitcalculator.com/api/v1/pop \
      -H "Authorization: Bearer $OPC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "symbol": "AAPL",
        "legs": [
          {"type": "call", "action": "buy", "strike": 345, "expiry": "2026-12-18"},
          {"type": "call", "action": "sell", "strike": 360, "expiry": "2026-12-18"}
        ]
      }'

    You get the probability of profit, breakevens, max profit and loss, and a calculatorUrl that opens the trade in the calculator. See the reference for every field.

Tip

Pick a language tab once and every code sample on the site follows it.

Where next