Schema: RootDefinition (ID: 4365)
RootDefinition records are sourced from the listing exchange for future options and from OCC for US equity options. Records are updated as SpiderRock receives changes.
METADATA
| Attribute | Value |
|---|---|
| Topic | 4335-product-definition |
| MLink Token | OptionDefinition |
| SRSE Product | SRLive, SRAnalytics |
Note: The symbol
=next to a field number indicates that it is a primary key.
BODY
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 10= | root | TickerKey | ||
| 100 | ticker | TickerKey | master underlying (can be a stock/product group; eg. @ES) | |
| 103 | osiRoot | string(8) | long version of the root. the short version is used in the TickerKey (for example RYAAY1, not RYAA1) | |
| 106 | ccode | TickerKey | ||
| 109 | uPrcDriverKey | ExpiryKey | (optional) option underlier price driver (all option expiries) (overrides optExpiryDefinition) | |
| 112 | uPrcDriverType | enum : SpdrKeyType | Stock or Future (note: if Future and uPrcDriverKey does not have an expiry month then FrontMonth will be used) | |
| 115 | uPrcDriverKey2 | ExpiryKey | (optional) alternate option underlier price driver (all option expiries) (overrides optExpiryDefinition) | |
| 118 | uPrcDriverType2 | enum : SpdrKeyType | Stock or Future (note: if Future and uPrcDriverKey does not have an expiry month then FrontMonth will be used) | |
| 121 | uPrcBoundCCode | enum : YesNo | if Yes and if a future exists with ccode=CCode and futExpiry = optExpiry the use this future as a pricing bound | |
| 124 | expirationMap | enum : ExpirationMap | determines the underlying future (if any) | |
| 127 | underlierMode | enum : UnderlierMode | ||
| 130 | optionType | enum : OptionType | indicator for option type | |
| 133 | multihedge | enum : Multihedge | indicates type of multihedge (None = standard root; all other root types are not None) | |
| 136 | exerciseTime | enum : ExerciseTime | Exercise time type | |
| 139 | exerciseType | enum : ExerciseType | Exercise style | |
| 142 | timeMetric | enum : TimeMetric | trading time metric - 252 or 365 trading days or a weekly cycle type | |
| 223 | tradingPeriod | enum : TradingPeriod | ||
| 145 | pricingModel | enum : PricingModel | ||
| 230 | calcModelType | enum : CalcModelType | [LogNormal or Normal] - default is determined by product characteristics and is usually correct. for binary compatibility with new quant package | |
| 231 | prcFramework | enum : PricingFramework | [Spot or Forward] (override; default is usually ok). for binary compatibility with new quant package | |
| 148 | moneynessType | enum : MoneynessType | moneyness (xAxis) convention: PctStd = (K / fUPrc - 1) / (axisVol * RT), LogStd = LOG(K/fUPrc) / (axisVol * RT), NormStd = (K - fUPrc) / (axisVol * RT) | |
| 151 | priceQuoteType | enum : PriceQuoteType | quoting style for the option series on the exchange, price (standard price quote) or volatility quoted (vol points) | |
| 154 | volumeTier | enum : VolumeTier | ||
| 157 | positionLimit | int | max contract limit | |
| 160 | exchanges | string(24) | exchange codes | |
| 163 | tickValue | float | $NLV value of a single tick change in display premium (pointValue = tickValue / tickSize) | |
| 166 | pointValue | float | $NLV value of a single point change in display premium (pointValue = tickValue / tickSize) | |
| 169 | pointCurrency | enum : Currency | ||
| 172 | strikeScale | double | manual strike price adjustment multiplier (used for some CME products if set, otherwise displayFactor is used) (okey_xx = strikePrice * manualStrikeScale) | |
| 175 | strikeRatio | float | note: effective strike = strike * strikeRatio - cashOnExercise | |
| 178 | cashOnExercise | float | note: cashOnExercise is positive if it decreases the effective strike price | |
| 181 | underliersPerCn | int | note: always 100 if underlying list is in use | |
| 184 | premiumMult | double | note: OCC premium/strike multiplier (usually 100) | |
| 222 | symbolRatio | float | note: currently used when AdjConvention is None, value of 0 implies symbolRatio is 1 | |
| 187 | adjConvention | enum : AdjConvention | ||
| 190 | optPriceInc | enum : OptPriceInc | ||
| 193 | priceFormat | enum : PriceFormat | price display format | |
| 226 | minTickSize | double | min tick size used for European native exchange options | |
| 196 | tradeCurr | enum : Currency | ||
| 199 | settleCurr | enum : Currency | ||
| 202 | strikeCurr | enum : Currency | ||
| 205 | defaultSurfaceRoot | TickerKey | fallback ticker to use for option surfaces if no native surfaces are available | |
| 218 | ricRoot | string(6) | RIC Root | |
| 227 | bbgRoot | string(6) | Bloomberg root | |
| 229 | bbgYrCode | enum : BbgYrCode | Format for the year field in the Bloomberg Code | |
| 228 | bbgGroup | enum : YellowKey | Bloomberg Yellow Key | |
| 225 | regionalCompositeRoot | TickerKey | regional composite ticker - set on European contributor products only | |
| 208 | timestamp | DateTime |
REPEATING FIELDS
Underlying
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 214 | ticker | TickerKey | ||
| 217 | spc | float | note: _root basket = sum(spc * ticker) / 100 |
Exchange
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 220 | optExch | enum : OptExch | ||
| 224 | root | TickerKey |
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 = 'RootDefinition'
# 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=RootDefinition'
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 = 'RootDefinition'
# 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 = 'ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|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 = 'osiRoot: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=RootDefinition' \
--data-urlencode 'view=ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|timestamp' \
--data-urlencode 'where=osiRoot: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 = 'RootDefinition'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|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 = 'osiRoot: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 = 'ticker: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=RootDefinition' \
--data-urlencode 'view=ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|timestamp' \
--data-urlencode 'where=osiRoot:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=ticker: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 = 'RootDefinition'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'uPrcDriverType|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|pointCurrency|adjConvention|optPriceInc|priceFormat|tradeCurr|settleCurr|strikeCurr|bbgYrCode|bbgGroup'
# 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 = 'osiRoot: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=RootDefinition' \
--data-urlencode 'measure=ticker|osiRoot|ccode|uPrcDriverKey|uPrcDriverType|uPrcDriverKey2|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|positionLimit|exchanges|tickValue|pointValue|pointCurrency|strikeScale|strikeRatio|cashOnExercise|underliersPerCn|premiumMult|symbolRatio|adjConvention|optPriceInc|priceFormat|minTickSize|tradeCurr|settleCurr|strikeCurr|defaultSurfaceRoot|ricRoot|bbgRoot|bbgYrCode|bbgGroup|regionalCompositeRoot|timestamp' \
--data-urlencode 'group=uPrcDriverType|uPrcDriverType2|uPrcBoundCCode|expirationMap|underlierMode|optionType|multihedge|exerciseTime|exerciseType|timeMetric|tradingPeriod|pricingModel|calcModelType|prcFramework|moneynessType|priceQuoteType|volumeTier|pointCurrency|adjConvention|optPriceInc|priceFormat|tradeCurr|settleCurr|strikeCurr|bbgYrCode|bbgGroup' \
--data-urlencode 'where=osiRoot: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 = 'RootDefinition'
# 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 = 'osiRoot: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=RootDefinition' \
--data-urlencode 'where=osiRoot:eq:ExampleString'