Skip to main content
Version: 8.4.12.1

Schema: OptionTheoVol (ID: 5055)

OptionTheoVol records contain client supplied theoretical volatility surface information resolved at the level if individual strikes. Strike volatilities, prices, greeks and SpiderRock surface volatilites and prices are all available. Values are computed on the fly using fast/accurate calculation methods as records are returned.

METADATA

AttributeValue
Topic5030-srse-calculators
MLink TokenClientTheo
SRSE ProductSRTheo

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

BODY

#FieldTypeComment
10=okeyOptionKey
100theoModelstring(16)required in where clause (theo model must be associated with an accnt that is visible)
103clientFirmOutstring(16)
106yearsfloatvolatility years to expiration (variable time metric; SR holiday calendar)
109tickerTickerKeyunderlier ticker
112uprcfloatunderlier price
115ubidfloatunderlier bid
118uaskfloatunderlier ask
121obidfloatoption market bid
124oaskfloatoption market ask
127tvolfloattheo vol
130tvolBOpnfloattheo buy/open vol
133tvolSOpnfloattheo sell/open vol
136tprcfloattheo vol price
139tbPrcfloattheo buy (open) price
142tsPrcfloattheo sell (open) price
145tbClsPrcfloattheo buy (close) price
148tsClsPrcfloattheo sell (close) price
151veSlopefloatveSlope = dVol / dUprc (assuming vol @ xAxis = 0 remains constant);hedgeDelta = (de + ve * 100 * veSlope) if hedging with this assumption
154defloatimplied greeks (from theo surface)
157gafloat
160thfloat
163vefloat
166vofloat
169vafloat
172deDecayfloat
175rofloat
178phfloat
181sdivBfloatnormalized sdiv when buying
184sdivSfloatnormalized sdiv when selling
187xAxisfloatxAxis value (depends on xAxis definition in TheoExpSurface record)
190tvolAtmfloattheo model volatility (atm)
193ivolAtmfloatSR Surface Volatility (atm)
196svolfloatSR Surface Volatility
199sprcfloatSR Surface Price
202sDefloatSR Surface Delta
205sVefloatSR Surface Vega
208ratefloatSR Rate (average interest rate to expiration)
211sdivfloatSR SDiv (continuous dividend;accretive with discrete dividends)
214ddivfloatSR DDiv (sum of discrete dividend amounts prior to expiration)
217errbyte
220theoErrstring(24)
223calcErrstring(24)
226theoStatusenum : TheoStatus
229timestampDateTime

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 = 'OptionTheoVol'

# 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 = 'OptionTheoVol'

# 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 = 'theoModel|clientFirmOut|years|ticker|uprc|ubid|uask|obid|oask|tvol|tvolBOpn|tvolSOpn|tprc|tbPrc|tsPrc|tbClsPrc|tsClsPrc|veSlope|de|ga|th|ve|vo|va|deDecay|ro|ph|sdivB|sdivS|xAxis|tvolAtm|ivolAtm|svol|sprc|sDe|sVe|rate|sdiv|ddiv|err|theoErr|calcErr|theoStatus|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 = 'theoModel:eq:ExampleString'

# 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 = 'OptionTheoVol'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'theoModel|clientFirmOut|years|ticker|uprc|ubid|uask|obid|oask|tvol|tvolBOpn|tvolSOpn|tprc|tbPrc|tsPrc|tbClsPrc|tsClsPrc|veSlope|de|ga|th|ve|vo|va|deDecay|ro|ph|sdivB|sdivS|xAxis|tvolAtm|ivolAtm|svol|sprc|sDe|sVe|rate|sdiv|ddiv|err|theoErr|calcErr|theoStatus|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 = 'theoModel:eq:ExampleString'

# 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 = 'theoModel: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 = 'OptionTheoVol'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'theoModel|clientFirmOut|years|ticker|uprc|ubid|uask|obid|oask|tvol|tvolBOpn|tvolSOpn|tprc|tbPrc|tsPrc|tbClsPrc|tsClsPrc|veSlope|de|ga|th|ve|vo|va|deDecay|ro|ph|sdivB|sdivS|xAxis|tvolAtm|ivolAtm|svol|sprc|sDe|sVe|rate|sdiv|ddiv|err|theoErr|calcErr|theoStatus|timestamp'

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

# 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 = 'theoModel:eq:ExampleString'

# 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 = 'OptionTheoVol'

# 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 = 'theoModel:eq:ExampleString'

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