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
Attribute | Value |
---|---|
Topic | 5030-srse-calculators |
MLink Token | ClientTheo |
SRSE Product | SRTheo |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | okey | OptionKey | |
100 | theoModel | string(16) | required in where clause (theo model must be associated with an accnt that is visible) |
103 | clientFirmOut | string(16) | |
106 | years | float | volatility years to expiration (variable time metric; SR holiday calendar) |
109 | ticker | TickerKey | underlier ticker |
112 | uprc | float | underlier price |
115 | ubid | float | underlier bid |
118 | uask | float | underlier ask |
121 | obid | float | option market bid |
124 | oask | float | option market ask |
127 | tvol | float | theo vol |
130 | tvolBOpn | float | theo buy/open vol |
133 | tvolSOpn | float | theo sell/open vol |
136 | tprc | float | theo vol price |
139 | tbPrc | float | theo buy (open) price |
142 | tsPrc | float | theo sell (open) price |
145 | tbClsPrc | float | theo buy (close) price |
148 | tsClsPrc | float | theo sell (close) price |
151 | veSlope | float | veSlope = dVol / dUprc (assuming vol @ xAxis = 0 remains constant);hedgeDelta = (de + ve * 100 * veSlope) if hedging with this assumption |
154 | de | float | implied greeks (from theo surface) |
157 | ga | float | |
160 | th | float | |
163 | ve | float | |
166 | vo | float | |
169 | va | float | |
172 | deDecay | float | |
175 | ro | float | |
178 | ph | float | |
181 | sdivB | float | normalized sdiv when buying |
184 | sdivS | float | normalized sdiv when selling |
187 | xAxis | float | xAxis value (depends on xAxis definition in TheoExpSurface record) |
190 | tvolAtm | float | theo model volatility (atm) |
193 | ivolAtm | float | SR Surface Volatility (atm) |
196 | svol | float | SR Surface Volatility |
199 | sprc | float | SR Surface Price |
202 | sDe | float | SR Surface Delta |
205 | sVe | float | SR Surface Vega |
208 | rate | float | SR Rate (average interest rate to expiration) |
211 | sdiv | float | SR SDiv (continuous dividend;accretive with discrete dividends) |
214 | ddiv | float | SR DDiv (sum of discrete dividend amounts prior to expiration) |
217 | err | byte | |
220 | theoErr | string(24) | |
223 | calcErr | string(24) | |
226 | theoStatus | enum : TheoStatus | |
229 | timestamp | DateTime |
Get Schema API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getschema' \
--data-urlencode 'msgType=OptionTheoVol'
Get Msg API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsg' \
--data-urlencode 'pkey=ReplaceThisValueForTheQueryToWork' \
--data-urlencode 'msgType=OptionTheoVol' \
--data-urlencode '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' \
--data-urlencode 'where=theoModel:eq:ExampleString'
Get Msgs API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsgs' \
--data-urlencode 'msgType=OptionTheoVol' \
--data-urlencode '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' \
--data-urlencode 'where=theoModel:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=theoModel:ASC'
Get Aggregate API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getaggregate' \
--data-urlencode 'msgType=OptionTheoVol' \
--data-urlencode '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' \
--data-urlencode 'group=theoStatus' \
--data-urlencode 'where=theoModel:eq:ExampleString'
Get Count API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getcount' \
--data-urlencode 'msgType=OptionTheoVol' \
--data-urlencode 'where=theoModel:eq:ExampleString'