Schema: ProductDefinitionV2 (ID: 4360)
SpiderRock normalized exchange product definitions. Includes future, option, and spread definitions from a number of exchanges. TickerDefinitions, RootDefinitions and CCodeDefinitions are consistent with these records.
METADATA
Attribute | Value |
---|---|
Topic | 4335-product-definition |
MLink Token | FutureDefinition |
SRSE Product | SRLive, SRAnalytics |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | secKey | OptionKey | SR Security Key [can be partially filled in (look at secType)] |
11= | secType | enum : SpdrKeyType | Security Type [Stock, Future, Option] |
248 | securityID | text1 | unique exchange id (exch assigned) |
103 | ticker | TickerKey | master underlier |
251 | SRspreadID | long | |
106 | productClass | enum : ProductClass | |
109 | underlierID | long | underlier product id (option only) [securityID of undKey/undType product] |
112 | undKey | ExpiryKey | SR Underlier Security Key [can be partially filled in (look at undType)] (option only) |
115 | undType | enum : SpdrKeyType | Underlier Security Type [Stock, Future] (option only) |
118 | productGroup | string(6) | Underlying product code. I.E. All GE (Eurodollar) spreads, options, futures will be in the same productGroup - This is the Asset field from the SecurityDefinition message |
121 | securityGroup | string(6) | Exchange specific code for a group of related securities that are all affected by market events. I.E. All E-mini weekly options (EW) - This is SecurityGroup field from the SecurityDefinition messages |
124 | marketSegmentID | int | Exchange specific market segment identifier |
249 | ricCode | string(32) | Full RIC Code - only provided for non-user defined instruments |
250 | securityDesc | text1 | full exchange symbol |
130 | exchange | string(8) | listing exchange |
133 | productType | enum : ProductType | |
136 | productTerm | enum : ProductTerm | |
139 | productIndexType | enum : ProductIndexType | |
142 | productRate | float | |
145 | contractSize | float | |
148 | contractUnit | enum : ContractUnit | |
151 | priceFormat | enum : PriceFormat | |
154 | minTickSize | double | |
157 | displayFactor | double | |
160 | strikeScale | double | manual strike price adjustment multiplier (used for some CME products if set, otherwise displayFactor is used) (okey_xx = strikePrice * manualStrikeScale) |
163 | minLotSize | short | minimum lot size |
166 | bookDepth | short | levels in the Globex quote book |
169 | impliedBookDepth | short | levels in the globex implied quote book (0 if no implied depth) |
172 | impMarketInd | short | implied market type (0 = no implied, 1 = implied in, 2 = implied out, 3 = implied in & out) |
175 | minPriceIncrementAmount | float | (depricate) minimum price amount (points per handle) |
178 | parValue | float | per contract par value |
181 | contMultiplier | float | contract deliverable multipler |
184 | cabPrice | double | (depricate) cabinet price (minimum closing price for OOM options) |
187 | tradeCurr | enum : Currency | |
190 | settleCurr | enum : Currency | |
193 | strikeCurr | enum : Currency | |
196 | expiration | DateTime | future expiration or option expiration (if product is an option). we use the last TRADING day as the expiration date. |
199 | maturity | DateKey | future maturity date or option maturity date. this is the delivery month. |
202 | exerciseType | enum : ExerciseType | (depricate; in RootDefinition) Exercise style |
205 | userDefined | enum : YesNo | |
208 | decayStartYear | short | |
211 | decayStartMonth | byte | |
214 | decayStartDay | byte | |
217 | decayQty | int | daily decay quantity |
220 | priceRatio | double | price ratio for interest rate intercommodity spreads |
247 | timestamp | DateTime |
REPEATING FIELDS
Legs
Field | Type | Comment |
---|---|---|
226 | legID | string(24) |
229 | secKey | OptionKey |
232 | secType | enum : SpdrKeyType |
235 | side | enum : BuySell |
238 | ratio | ushort |
241 | refDelta | float |
244 | refPrc | double |
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 = 'ProductDefinitionV2'
# 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=ProductDefinitionV2'
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 = 'ProductDefinitionV2'
# 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 = 'securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|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 = 'productGroup: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=ProductDefinitionV2' \
--data-urlencode 'view=securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|timestamp' \
--data-urlencode 'where=productGroup: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 = 'ProductDefinitionV2'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|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 = 'productGroup: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 = 'securityID: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=ProductDefinitionV2' \
--data-urlencode 'view=securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|timestamp' \
--data-urlencode 'where=productGroup:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=securityID: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 = 'ProductDefinitionV2'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'productClass|undType|productType|productTerm|productIndexType|contractUnit|priceFormat|tradeCurr|settleCurr|strikeCurr|exerciseType|userDefined'
# 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 = 'productGroup: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=ProductDefinitionV2' \
--data-urlencode 'measure=securityID|ticker|SRspreadID|productClass|underlierID|undKey|undType|productGroup|securityGroup|marketSegmentID|ricCode|securityDesc|exchange|productType|productTerm|productIndexType|productRate|contractSize|contractUnit|priceFormat|minTickSize|displayFactor|strikeScale|minLotSize|bookDepth|impliedBookDepth|impMarketInd|minPriceIncrementAmount|parValue|contMultiplier|cabPrice|tradeCurr|settleCurr|strikeCurr|expiration|maturity|exerciseType|userDefined|decayStartYear|decayStartMonth|decayStartDay|decayQty|priceRatio|timestamp' \
--data-urlencode 'group=productClass|undType|productType|productTerm|productIndexType|contractUnit|priceFormat|tradeCurr|settleCurr|strikeCurr|exerciseType|userDefined' \
--data-urlencode 'where=productGroup: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 = 'ProductDefinitionV2'
# 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 = 'productGroup: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=ProductDefinitionV2' \
--data-urlencode 'where=productGroup:eq:ExampleString'