Skip to main content
Version: Upcoming

Schema: LiveExpirySurface (ID: 1132)

LiveExpirySurface (surfaceType = 'Live') records are computed and publish continuously during trading hours and represent a current best implied volatility market fit.

SurfaceType = 'PriorDay' records contain the `closing surface record from the prior trading period (usually from just before the last main session close).

METADATA

AttributeValue
Topic1000-analytics
MLink TokenSRMLinkAnalytics
SRSE ProductSRAnalytics

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeDefault ValueComment
10=ekeyExpiryKey
11=surfaceTypeenum : SurfaceCurveType
100uPrcdoubleeffective uPrc used for surface fitting (either spot uPrc or uPrcFwd)
103uPrcDriverdoubleunderlier driver (mid-market) [zero if prcFramework=Spot]
106daysintdays to expiry
109yearsfloatvolatility time to expiration (in years)
112ratefloatterm interest rate to expiry (discount rate)
115atmVolfloatatm surface volatility (xAxis = 0)
118atmCenfloatcensored atm surface volatility (xAxis = 0)
121atmSlopefloatvolatility surface slope (dVol / dXAxis) (xAxis=0)
124atmSkewYYfloatskewFn @ xAxis = 0 (sticky surface static point)
127atmVResidualfloatvResidual @ xAxis = 0 (sticky surface static point)
130atmSDivfloatnon-functional. temporarily added back for binary compatibility with mars
133basisEKeyExpiryKeyLiveBasisCurve.pkey.ekey record that defines BasisSkewFn below.
136basisTimestampDateTimeLiveBasisCurve.timestamp
139axisSDivfloataxis SDiv (used for forward price calc)
142axisFUPrcfloataxis FwdUPrc (fwd underlying price used to compute xAxis)
145xMultfloat
148xShiftfloat
151skewMultfloatsVol = skewMult * BasisSkewFn(xMult * (xAxis - xShift))
166maxResidualErrfloatlargest remain residual error (in premium points)
169cpAdjUPrcfloat
172cpAdjIVolfloat
175cpAdjAfloatcpAdj = cpAdjA + cpAdjB * x + cpAdjC * x^2; where x = BS(strike, cpAdjUPrc, cpAdjIVol, ...).cXDe [cpAdj is either sdiv or uPrcRatio]
178cpAdjBfloat
181cpAdjCfloat
184cpAdjCodeenum : CPAdjCode
187cpAdjA_Emafloatshort term EMA averages
190cpAdjB_Emafloat
193cpAdjC_Emafloat
196cpAdj_CounterintcpAdj EMA counter
199tickerTickerKeyunderlying stock key that this option expiration attaches to
202fkeyExpiryKeyunderlying future key (if any)
205uPrcDriverKeyExpiryKeyunderlier driver key
208uPrcDriverTypeenum : SpdrKeyTypeunderlier driver key type (stock or future)
211ddivfloat(expected) cumulative discrete dividend $ amounts prior to expiration
214ddivPvfloat(expected) cumulative npv of discrete dividend $ amounts prior to expiration (SR global rate curve)
217ddivHashinthash used to identify the full rate + discrete dividend list used computing this pricing record
220ddivSourceenum : DDivSourceForecast if any of the dividends prior to expiry are forecast rather than announced
223symbolRatiofloatunderlier price ratio (usually 1.0 or a multi-hedge option price ratio; if one exists)
226exTypeenum : ExerciseTypeexercise type (American or European)
229modelTypeenum : CalcModelType[LogNormal or Normal]
232priceTypeenum : CalcPriceTypenon-functional. temporarily added back for binary compatibility with mars
235prcFrameworkenum : PricingFramework[Spot or Forward]
238earnCntfloatnumber of qualifying earnings events prior to expiration [can be fractional] (from StockEarningsCalendar)
241earnCntAdjfloatnumber of qualifying earnings events prior to expiration [adjusted] (from StockEarningsCalendar + LiveSurfaceTerm)
244moneynessTypeenum : MoneynessTypenon-functional. temporarily added back for binary compatibility with mars
247priceQuoteTypeenum : PriceQuoteTypePrice or Vol
250uVolHistfloathistorical realized volatility (includes eMoveHist x earnCntAdj adjustment). Note that this is the default atmVol if no implied markets existed previous day.
253uCenHistfloatcensored (earnings events removed) historical realized volatility. Trailing periods is 2x forward time to expiration. From HistoricalVolatility(windowType=hlCen).mv_nnn
256uBetaHistfloatbeta (this underlier vs basis underlier; T + 1 week)
259eMovefloatimplied earnings move (from LiveSurfaceTerm)
262eMoveHistfloathistorical earnings move (avg of trailing 8 moves). From StockEarningsCalendar.eMoveHist
265minXAxisfloatminimum xAxis value; left most point with a valid supporting strike
268maxXAxisfloatmaximum xAxis value; right most point with a valid supporting strike
271synSpotfloatsynthetic spot price (forward style pricing)
274synCarryfloatsynthetic carry rate (forward style pricing)
277uPrcRatiodoublenon-functional. temporarily added back for binary compatibility with mars
280pWidthfloatminimum mkt premium width
283vWidthfloatminimum mkt volatility width
286cCntushortnum call strikes in base fit
289pCntushortnum put strikes in base fit
292hasBracketMinenum : YesNo
295hasMinPointenum : YesNo
298hasXMultABFitenum : YesNo
301xMultABFitErrordouble
304hasSkewMultFitenum : YesNo
307skewMultFitErrordouble
310cBidMissbytenumber of call bid violations (surface outside the market)
313cAskMissbytenumber of call ask violations (surface outside the market)
316pBidMissbytenumber of put bid violations
319pAskMissbytenumber of put ask violations
322fitScorefloat
325cumFitScorefloat
328numPrintsDDintcpXDe < -0.45
331avgPrtErrDDfloatavg: prtPrc - surfacePrc (AUTO ONLY)
334stdPrtErrDDfloatstd: prtPrc - surfacePrc (AUTO ONLY)
337numPrintsDNintcpXDe: [-0.45, -0.15)
340avgPrtErrDNfloat
343stdPrtErrDNfloat
346numPrintsATintcpXDe: [-0.15, +0.15]
349avgPrtErrATfloat
352stdPrtErrATfloat
355numPrintsUPintcpXDe: (+0.15, +0.45]
358avgPrtErrUPfloat
361stdPrtErrUPfloat
364numPrintsDUintcpXDe > +0.45
367avgPrtErrDUfloat
370stdPrtErrDUfloat
373fitCounterintnumber of fit/count passes (current trade date / market open)
376tradeableStatusenum : TradeableStatusindicates whether the surface is currently tradeable or not (all server surface integrity checks pass)
379marketPhaseenum : MarketPhasemarket phase this surface is from
382surfaceFitResultenum : SurfaceFitResult
385timestampDateTime

REPEATING FIELDS

Residual

#FieldTypeDefault ValueComment
157xfloatx axis
160yfloaty value predict (from ML model)
163ySdfloaty value std deviation (from ML model)

Get Schema API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'LiveExpirySurface'

# Request Parameters for Get Schema Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getschema',
"msgType": MSG_TYPE,
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Msg API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'LiveExpirySurface'

# Replace with your pkey value for getting the specific message desired
PKEY = 'ReplaceThisValueForTheQueryToWork'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned.
VIEW = 'uPrc|uPrcDriver|days|years|rate|atmVol|atmCen|atmSlope|atmSkewYY|atmVResidual|atmSDiv|basisEKey|basisTimestamp|axisSDiv|axisFUPrc|xMult|xShift|skewMult|maxResidualErr|cpAdjUPrc|cpAdjIVol|cpAdjA|cpAdjB|cpAdjC|cpAdjCode|cpAdjA_Ema|cpAdjB_Ema|cpAdjC_Ema|cpAdj_Counter|ticker|fkey|uPrcDriverKey|uPrcDriverType|ddiv|ddivPv|ddivHash|ddivSource|symbolRatio|exType|modelType|priceType|prcFramework|earnCnt|earnCntAdj|moneynessType|priceQuoteType|uVolHist|uCenHist|uBetaHist|eMove|eMoveHist|minXAxis|maxXAxis|synSpot|synCarry|uPrcRatio|pWidth|vWidth|cCnt|pCnt|hasBracketMin|hasMinPoint|hasXMultABFit|xMultABFitError|hasSkewMultFit|skewMultFitError|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitScore|cumFitScore|numPrintsDD|avgPrtErrDD|stdPrtErrDD|numPrintsDN|avgPrtErrDN|stdPrtErrDN|numPrintsAT|avgPrtErrAT|stdPrtErrAT|numPrintsUP|avgPrtErrUP|stdPrtErrUP|numPrintsDU|avgPrtErrDU|stdPrtErrDU|fitCounter|tradeableStatus|marketPhase|surfaceFitResult|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:valuse" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''

# Request Parameters for getmsg Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsg',
"pkey": PKEY,
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Msgs API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'LiveExpirySurface'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'uPrc|uPrcDriver|days|years|rate|atmVol|atmCen|atmSlope|atmSkewYY|atmVResidual|atmSDiv|basisEKey|basisTimestamp|axisSDiv|axisFUPrc|xMult|xShift|skewMult|maxResidualErr|cpAdjUPrc|cpAdjIVol|cpAdjA|cpAdjB|cpAdjC|cpAdjCode|cpAdjA_Ema|cpAdjB_Ema|cpAdjC_Ema|cpAdj_Counter|ticker|fkey|uPrcDriverKey|uPrcDriverType|ddiv|ddivPv|ddivHash|ddivSource|symbolRatio|exType|modelType|priceType|prcFramework|earnCnt|earnCntAdj|moneynessType|priceQuoteType|uVolHist|uCenHist|uBetaHist|eMove|eMoveHist|minXAxis|maxXAxis|synSpot|synCarry|uPrcRatio|pWidth|vWidth|cCnt|pCnt|hasBracketMin|hasMinPoint|hasXMultABFit|xMultABFitError|hasSkewMultFit|skewMultFitError|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitScore|cumFitScore|numPrintsDD|avgPrtErrDD|stdPrtErrDD|numPrintsDN|avgPrtErrDN|stdPrtErrDN|numPrintsAT|avgPrtErrAT|stdPrtErrAT|numPrintsUP|avgPrtErrUP|stdPrtErrUP|numPrintsDU|avgPrtErrDU|stdPrtErrDU|fitCounter|tradeableStatus|marketPhase|surfaceFitResult|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''

# Replace with your desired limit of how many messages you receive. The default limit is 500
LIMIT = 500

# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'uPrc:ASC'

# Request Parameters for getmsgs Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsgs',
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE,
"limit": LIMIT,
"order": ORDER
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Aggregate API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'LiveExpirySurface'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'uPrc|uPrcDriver|days|years|rate|atmVol|atmCen|atmSlope|atmSkewYY|atmVResidual|atmSDiv|basisEKey|basisTimestamp|axisSDiv|axisFUPrc|xMult|xShift|skewMult|maxResidualErr|cpAdjUPrc|cpAdjIVol|cpAdjA|cpAdjB|cpAdjC|cpAdjCode|cpAdjA_Ema|cpAdjB_Ema|cpAdjC_Ema|cpAdj_Counter|ticker|fkey|uPrcDriverKey|uPrcDriverType|ddiv|ddivPv|ddivHash|ddivSource|symbolRatio|exType|modelType|priceType|prcFramework|earnCnt|earnCntAdj|moneynessType|priceQuoteType|uVolHist|uCenHist|uBetaHist|eMove|eMoveHist|minXAxis|maxXAxis|synSpot|synCarry|uPrcRatio|pWidth|vWidth|cCnt|pCnt|hasBracketMin|hasMinPoint|hasXMultABFit|xMultABFitError|hasSkewMultFit|skewMultFitError|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitScore|cumFitScore|numPrintsDD|avgPrtErrDD|stdPrtErrDD|numPrintsDN|avgPrtErrDN|stdPrtErrDN|numPrintsAT|avgPrtErrAT|stdPrtErrAT|numPrintsUP|avgPrtErrUP|stdPrtErrUP|numPrintsDU|avgPrtErrDU|stdPrtErrDU|fitCounter|tradeableStatus|marketPhase|surfaceFitResult|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'cpAdjCode|uPrcDriverType|ddivSource|exType|modelType|priceType|prcFramework|moneynessType|priceQuoteType|hasBracketMin|hasMinPoint|hasXMultABFit|hasSkewMultFit|tradeableStatus|marketPhase|surfaceFitResult'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''

# Request Parameters for getaggregate Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getaggregate',
"msgType": MSG_TYPE,
"measure": MEASURE,
"group": GROUP,
# Optional Parameters
"where": WHERE,
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Count API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'LiveExpirySurface'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''

# Request Parameters for getCount Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getcount',
"msgType": MSG_TYPE,
# Optional Parameters
"where": WHERE,
}

response = requests.get(MLINK_PROD_URL, params=params)