Schema: OptionCloseMark (ID: 3140)
OptionCloseMark records are published immediately after the market close - 5 min and again when exchanges publish official marks.
OptionCloseMark records are published to the SpiderRock elastic cluster when clsMarkState=Final
METADATA
Attribute | Value |
---|---|
Topic | 3120-market-marks |
MLink Token | OptMarkData |
SRSE Product | SRLive, SRAnalytics |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | okey | OptionKey | |
100 | tradeDate | DateKey | |
103 | clsMarkState | enum : ClsMarkState | Preview or Final |
106 | uBid | double | SpiderRock closing underlier bid (C - 5m) |
109 | uAsk | double | SpiderRock closing underlier ask (C - 5m) |
112 | uSrCls | double | SpiderRock underlier closing mark (C - 5m) |
115 | uClose | double | exchange underlier closing mark |
118 | bidPrc | float | SpiderRock closing option bid (C - 5m) |
121 | askPrc | float | SpiderRock closing option ask (C - 5m) |
124 | srClsPrc | double | SpiderRock close mark (close - 5min) [NBBO mid-market] |
127 | closePrc | double | official exchange closing mark (last print;then official close) |
130 | hasSRClsPrc | enum : YesNo | |
133 | hasClosePrc | enum : YesNo | |
209 | hasUClsPrc | enum : YesNo | |
136 | bidIV | float | implied vol of SpiderRock closing bid price (C - 5m) |
139 | askIV | float | implied vol of SpiderRock closing ask price (C - 5m) |
142 | srPrc | float | sr close mark price (always within bidPx/askPx) (C - 5m) |
145 | srVol | float | sr close mark volatility (C - 5m) |
148 | srSrc | enum : MarkSource | sr close mark source (SRVol is SurfaceVol) |
151 | de | float | delta |
154 | ga | float | gamma |
157 | th | float | theta |
160 | ve | float | vega |
163 | vo | float | volga |
166 | va | float | vanna |
169 | rh | float | rho |
172 | ph | float | phi |
175 | srSlope | float | surface slope (SR surface) |
178 | deDecay | float | delta decay |
181 | sdiv | float | sdiv rate |
184 | ddiv | float | ddiv amount (sum of discrete dividend amounts) |
210 | ddivPv | float | ddiv (present value) amount (sum of discrete dividend pv amounts) |
187 | rate | float | discount rate |
211 | iDays | int | interest days (today to expiry) (T+1) |
190 | years | float | years to expiration |
193 | error | byte | calculation error code |
196 | openInterest | int | option open Interest |
199 | prtCount | int | print count |
202 | prtVolume | int | total printed volume (all prt types) |
205 | srCloseMarkDttm | DateTime | from MarketCloseQuote.srCloseMarkDttm |
208 | timestamp | DateTime | record timestamp |
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 = 'OptionCloseMark'
# 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=OptionCloseMark'
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 = 'OptionCloseMark'
# 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 = 'tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|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 = ''
# 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=OptionCloseMark' \
--data-urlencode 'view=tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|timestamp' \
--data-urlencode 'where='
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 = 'OptionCloseMark'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|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 = ''
# 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 = 'tradeDate: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=OptionCloseMark' \
--data-urlencode 'view=tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|timestamp' \
--data-urlencode 'where=' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=tradeDate: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 = 'OptionCloseMark'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'clsMarkState|hasSRClsPrc|hasClosePrc|hasUClsPrc|srSrc'
# 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 = ''
# 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=OptionCloseMark' \
--data-urlencode 'measure=tradeDate|clsMarkState|uBid|uAsk|uSrCls|uClose|bidPrc|askPrc|srClsPrc|closePrc|hasSRClsPrc|hasClosePrc|hasUClsPrc|bidIV|askIV|srPrc|srVol|srSrc|de|ga|th|ve|vo|va|rh|ph|srSlope|deDecay|sdiv|ddiv|ddivPv|rate|iDays|years|error|openInterest|prtCount|prtVolume|srCloseMarkDttm|timestamp' \
--data-urlencode 'group=clsMarkState|hasSRClsPrc|hasClosePrc|hasUClsPrc|srSrc' \
--data-urlencode 'where='
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 = 'OptionCloseMark'
# 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 = ''
# 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=OptionCloseMark' \
--data-urlencode 'where='