Skip to main content
Version: Staging

Schema: LiveExpirySurface (ID: 1135)

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 TokenSystemData
SRSE ProductSRAnalytics

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

BODY

#FieldTypeComment
10=ekeyExpiryKey
11=surfaceTypeenum : SurfaceCurveType
100uPrcdoubleeffective uPrc used for surface fitting
101uPrcDriverdoubleunderlier driver (mid-market)
102yearsfloattime to expiration (in years)
103ratefloataverage interest rate to expiration (discount rate)
104sdivfloatstock dividend (borrow rate)
105atmVolfloatatm vol (xAxis = 0)
106atmSlopefloatvolatility surface slope (dVol / dXAxis) @ ATM (xAxis=0)
107fitRatefloat
108axisFUPrcfloataxis FwdUPrc (fwd underlying price used to compute xAxis)
109axisVolRTfloataxis volatility x sqrt(years) (used to compute xAxis) [usually the minimum curve volatility]
110skewMultfloatsVol = skewMult * BasisSkewFn(xMult * xAxis - xShift)
111xMultfloat
112xShiftfloat
113skewC00floatcurve coeff[0]
114skewC01floatcurve coeff[1]
115skewC02float
116skewC03float
117skewC04float
118skewC05float
119skewC06float
120skewC07float
121skewC08float
122skewC09float
123skewC10float
124skewC11float
125skewC12float
126skewC13float
127skewC14float
128skewC15float
129skewC16float
130skewC17float
131skewC18float
132skewC19float
133skewC20float
134skewC21float
135skewC22float
136skewC23float
137skewC24float
138skewC25float
139skewC26float
140skewC27float
141skewC28float
142cpAdjD04floatxAxis = -4.0
143cpAdjD03floatxAxis = -3.0
144cpAdjD02floatxAxis = -2.0
145cpAdjD01floatxAxis = -1.0
146cpAdjU01floatxAxis = +1.0
147cpAdjU02floatxAxis = +2.0
148cpAdjU03floatxAxis = +3.0
149cpAdjU04floatxAxis = +4.0
150tradeableStatusenum : TradeableStatusindicates whether the surface is currently tradeable or not (all server surface integrity checks pass)
151surfaceResultenum : SurfaceResult
152marketSessionenum : MarketSessionmarket session this surface is from
153timestampDateTime

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|years|rate|sdiv|atmVol|atmSlope|fitRate|axisFUPrc|axisVolRT|skewMult|xMult|xShift|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|tradeableStatus|surfaceResult|marketSession|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|years|rate|sdiv|atmVol|atmSlope|fitRate|axisFUPrc|axisVolRT|skewMult|xMult|xShift|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|tradeableStatus|surfaceResult|marketSession|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|years|rate|sdiv|atmVol|atmSlope|fitRate|axisFUPrc|axisVolRT|skewMult|xMult|xShift|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|tradeableStatus|surfaceResult|marketSession|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'tradeableStatus|surfaceResult|marketSession'

# 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)