True expected value of a structure
The HONEST expected value of a defined multi-leg structure: the payoff INTEGRATED over the lognormal terminal distribution, in dollars - never the naive probabilityOfProfit x maxProfit, which flatters a pin structure whose max profit sits at near-zero probability. Every leg is priced at its Black-Scholes fair value and netted into the entry credit/debit, so a fairly-priced structure integrates to ~0 expected value under the default risk-neutral measure (supply a real-world drift for a directional view). The naive figure is returned too, clearly labelled naivePopTimesMaxProfit, so the gap against the true value is visible. maxProfit and maxLoss are null when the corresponding tail is unbounded, never a misleading finite number. The structure must be one this option-only, single-expiry model can price honestly; an equity-leg or multi-expiry structure is refused with a typed error rather than mispriced. POST because it is pure compute over supplied inputs.
The HONEST expected value of a defined multi-leg structure: the payoff INTEGRATED over the lognormal terminal distribution, in dollars - never the naive probabilityOfProfit x maxProfit, which flatters a pin structure whose max profit sits at near-zero probability. Every leg is priced at its Black-Scholes fair value and netted into the entry credit/debit, so a fairly-priced structure integrates to ~0 expected value under the default risk-neutral measure (supply a real-world drift for a directional view). The naive figure is returned too, clearly labelled naivePopTimesMaxProfit, so the gap against the true value is visible. maxProfit and maxLoss are null when the corresponding tail is unbounded, never a misleading finite number. The structure must be one this option-only, single-expiry model can price honestly; an equity-leg or multi-expiry structure is refused with a typed error rather than mispriced. POST because it is pure compute over supplied inputs.
Authorization
ApiKeyAuth analytics:readPresent your API key as a bearer token: Authorization: Bearer pk_live_....
Two environments are issued per account. A pk_test_ sandbox key returns the SAME real historical data as a live key and does NOT consume your LIVE allowance, so learning the API is free. It has its own separate windows and can be rate limited on them. A pk_live_ key reads against your allowance.
Keys carry explicit scopes (instruments:read, prices:read, actions:read, fx:read, earnings:read, options:read, news:read, sentiment:read, events:read, analytics:read, correlations:read, technicals:read, macro:read) and are enforced fail-closed, so a leaked key is bounded to what it was issued for. Revocation is immediate.
In: header
Scope: analytics:read
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Inputs for the TRUE expected value of a multi-leg structure, integrated over the lognormal terminal distribution.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/analytics/strategy-ev" \ -H "Content-Type: application/json" \ -d '{ "structure": "long_call", "legs": [ { "action": "buy", "type": "call", "strike": 1, "quantity": 1 } ], "spot": 1, "expiryDays": 1, "rate": 0, "vol": 1 }'{ "data": { "structure": "long_call", "legs": [ { "action": "buy", "type": "call", "strike": 1, "quantity": 1 } ], "netCreditDebit": 0, "trueExpectedValue": 0, "probabilityOfProfit": 0, "maxProfit": 0, "maxLoss": 0, "maxProfitUnbounded": true, "maxLossUnbounded": true, "naivePopTimesMaxProfit": 0, "riskMetrics": { "standardDeviation": 0, "downsideDeviation": 0, "expectedReturn": 0, "sortinoRatio": 0, "omegaRatio": 0, "kellyFraction": 0 }, "assumptions": { "model": "lognormal-terminal-integration", "spot": 0, "expiryDays": 0, "timeToExpirationYears": 0, "riskFreeRate": 0, "volatility": 0, "dividendYield": 0, "measure": "risk_neutral", "driftUsed": 0 } }, "meta": { "asOf": "string", "source": "string", "stale": true }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}{ "error": { "code": "invalid_request", "message": "string", "docsUrl": "http://example.com", "details": { "property1": [ "string" ], "property2": [ "string" ] } }}Probability of reaching a target POST
The lognormal probability of a target level, as two DISTINCT numbers under two DISTINCT measures. probabilityInTheMoneyAtExpiry is the risk-neutral probability the price finishes at or beyond the target AT expiry - the figure a set-and-forget position cares about. probabilityOfTouchBeforeExpiry is the first-passage probability the target is reached at ANY time before expiry, and is always at least the at-expiry figure because a level can be touched intraday and then retraced. The touch probability is driftless and does not depend on the rate; the response states both measures so they are never conflated. POST because it is pure compute over supplied inputs.
Resolve many instruments GET
Resolve up to 500 instruments by id in one call, the supported alternative to N+1-ing the single-instrument endpoint. An unknown id is absent from data rather than an invented row; the caller keys the result by id.