Risk


GET riskoutlook

Description

This API allows you to get an array of risk values (greeks) for a given account's position over a set of time horizons and underlying price changes (expressed as a factor on the current underlying).

Resource URL

https://api.optionscity.com/riskoutlook
Authentication Required
HTTP Methods GET
Media Types application/json
Response Object Risk Outlook Data
Response Type Standard

Parameters

NameDescriptionRequired?Type
acct_id The account for which to produce risk scenarios (using the account's currentposition). Yes String
time_horizons The set of time horizon inputs to use in the calculations (must have at leastone to produce a value). Yes LocalDateArray
underlying_price_factors The set of factors to be applied to the underlying(s) as inputs to the calculations. Yes NumberArray
embed_instrument Whether instrument details should be embedded with each data point. Default is false. No Boolean

Example Request

GET https://api.optionscity.com/riskoutlook?acct_id=1&time_horizons=2015-06-23&underlying_price_factors=1.1

Example Response

[ {
  "instrument_id" : 1,
  "factor" : 1.1,
  "date" : "2015-06-23",
  "theo" : 16.144,
  "delta" : -0.005,
  "gamma" : 0,
  "vega" : 1182.277,
  "theta" : -636.797,
  "epsilon" : 0.173,
  "zeta" : -0.318,
  "rho" : -143.912,
  "underlying" : 232485
} ]

Risk Outlook Object

Description

Single data point for aggregate position risk at a given date and underlying price.

Fields

Field Type Optional Description
instrument_id Number No Optionshop assigned instrument identifier.
instrument Object Yes A full embedded instrument description, if requested.
theo Number Yes An option's current theoretical value.
delta Number Yes An option's current delta, if inputs are available for calculation.
gamma Number Yes An option's current gamma, if inputs are available for calculation.
vega Number Yes An option's current vega, if inputs are available for calculation.
theta Number Yes An option's current theta, if inputs are available for calculation.
epsilon Number Yes An option's current epsilon, if inputs are available for calculation.
zeta Number Yes An option's current zeta, if inputs are available for calculation.
rho Number Yes An option's current rho, if inputs are available for calculation.
volatility Number Yes The current market implied volatility of the underlying, used to calculate greeks, if applicable, and if inputs are available for calculation.
underlying_price Number Yes The underlying price used to calculate greeks, if applicable.
unavailable_reason String Yes If greeks are unavailable, a detailed reason they are unavailable.

JSON Sample

{
  "instrument_id" : 1,
  "factor" : 1.1,
  "date" : "2015-06-23",
  "theo" : 16.144,
  "delta" : -0.005,
  "gamma" : 0,
  "vega" : 1182.277,
  "theta" : -636.797,
  "epsilon" : 0.173,
  "zeta" : -0.318,
  "rho" : -143.912,
  "underlying" : 232485
}

* Date and time elements are ISO-8601 string representations