Schema: SpreadBookMarkup (ID: 2895)
Live spread quotes with SpiderRock markup details for equity and future option spreads.
METADATA
Attribute | Value |
---|---|
Topic | 2895-market-data-spreads |
MLink Token | SpreadMktData |
SRSE Product | SRSpread |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | skey | TickerKey | SR Spread Key (should have corresponding ProductDefinition record) |
11= | isTest | enum : YesNo | Yes indicates that response is made of entirely of isTest=Yes SpreadExchOrders |
100 | ticker | TickerKey | common spread underlier |
298 | SRspreadID | long | |
103 | priceFormat | enum : PriceFormat | |
106 | bidPrice1 | double | bid price |
109 | isBidPrice1Valid | enum : YesNo | |
112 | askPrice1 | double | ask price |
115 | isAskPrice1Valid | enum : YesNo | |
118 | bidSize1 | int | cumulative size at bidPrice |
121 | askSize1 | int | cumulative size at askPrice |
124 | bidMask1 | uint | exchange bid bit mask (OptExch mask for NMS spreads; zero for single exchange spreads) |
127 | askMask1 | uint | exchange ask bit mask (OptExch mask for NMS spreads; zero for single exchange spreads) |
130 | bidExch1 | enum : OptExch | exchange at bid price with the largest size (if any) |
133 | askExch1 | enum : OptExch | exchange at ask price with the largest size (if any) |
136 | bidTime | DateTime | last bid price or size change |
139 | askTime | DateTime | last ask price or size change |
142 | updateType | enum : UpdateType | |
145 | numStkLegs | byte | |
148 | numFutLegs | byte | |
151 | numOptLegs | byte | |
157 | userDefined | enum : YesNo | |
296 | spreadClass | enum : ToolSpreadClass | |
297 | containsHedge | enum : YesNo | |
166 | legBidPrc | double | |
169 | legAskPrc | double | |
172 | legBidSz | int | |
175 | legAskSz | int | |
178 | surfPrc | double | |
181 | surfDelta | float | |
184 | surfGamma | float | |
187 | surfVega | float | |
190 | surfWtVega | float | |
193 | surfError | byte | error code from surface price calc (if any) |
196 | minExpiry | DateTime | expiry of earliest option leg(s) |
199 | maxExpiry | DateTime | expiry of latest option leg(s) |
202 | minYears | float | |
205 | maxYears | float | |
208 | refUPrc | float | reference underlier price |
211 | printPrice | float | last spread print price (if any) |
214 | printTime | DateTime | |
217 | printSize | int | last spread print size (if any) |
220 | printVolume | int | |
223 | grpNum | int | |
226 | securityDesc | string(24) | |
229 | filterId | long | tool server filter request ID |
232 | timestamp | DateTime |
REPEATING FIELDS
MarkupLegs
Field | Type | Comment |
---|---|---|
238 | legSecKey | OptionKey |
241 | legSecType | enum : SpdrKeyType |
244 | legPriceFormat | enum : PriceFormat |
247 | legSecurityDesc | string(20) |
250 | legSide | enum : BuySell |
253 | legRatio | ushort |
256 | legBidPrice | double |
259 | legBidSize | int |
262 | legAskPrice | double |
265 | legAskSize | int |
268 | legYears | float |
271 | legUPrc | double |
280 | legSurfVol | float |
283 | legSurfPrice | float |
286 | legSurfDe | float |
289 | legSurfGa | float |
292 | legSurfVe | float |
295 | legSurfErr | byte |
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 = 'SpreadBookMarkup'
# 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=SpreadBookMarkup'
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 = 'SpreadBookMarkup'
# 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|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|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 = 'securityDesc: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=SpreadBookMarkup' \
--data-urlencode 'view=ticker|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|timestamp' \
--data-urlencode 'where=securityDesc: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 = 'SpreadBookMarkup'
# 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|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|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 = 'securityDesc: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=SpreadBookMarkup' \
--data-urlencode 'view=ticker|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|timestamp' \
--data-urlencode 'where=securityDesc: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 = 'SpreadBookMarkup'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'ticker|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'priceFormat|isBidPrice1Valid|isAskPrice1Valid|bidExch1|askExch1|updateType|userDefined|spreadClass|containsHedge'
# 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 = 'securityDesc: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=SpreadBookMarkup' \
--data-urlencode 'measure=ticker|SRspreadID|priceFormat|bidPrice1|isBidPrice1Valid|askPrice1|isAskPrice1Valid|bidSize1|askSize1|bidMask1|askMask1|bidExch1|askExch1|bidTime|askTime|updateType|numStkLegs|numFutLegs|numOptLegs|userDefined|spreadClass|containsHedge|legBidPrc|legAskPrc|legBidSz|legAskSz|surfPrc|surfDelta|surfGamma|surfVega|surfWtVega|surfError|minExpiry|maxExpiry|minYears|maxYears|refUPrc|printPrice|printTime|printSize|printVolume|grpNum|securityDesc|filterId|timestamp' \
--data-urlencode 'group=priceFormat|isBidPrice1Valid|isAskPrice1Valid|bidExch1|askExch1|updateType|userDefined|spreadClass|containsHedge' \
--data-urlencode 'where=securityDesc: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 = 'SpreadBookMarkup'
# 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 = 'securityDesc: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=SpreadBookMarkup' \
--data-urlencode 'where=securityDesc:eq:ExampleString'