Schema: LiveRevConQuote (ID: 1125)
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | OptAnalytics |
SRSE Product | SRAnalytics |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | okey | OptionKey | cp = Both |
11= | tradeDate | DateKey | |
100 | ticker | TickerKey | SR Ticker (Product Group) |
101 | xAxis | float | xAxis = Moneyness |
102 | cDe | float | call delta |
103 | pDe | float | put delta |
104 | uPrc | double | live underlier price |
105 | atmVol | float | |
106 | years | float | number of volatility years to exiry date (volatility time metric) |
107 | globalRate | float | global rate (average discount rate) to expiry date |
108 | ddiv | float | sum of estimated discrete dividend stream to expiry date |
109 | ddivPv | float | present value of estimated discrete dividend stream to expiry date |
110 | ddivSource | enum : DDivSource | present value of estimated discrete dividend stream to expiry date |
111 | iDays | int | number of interest (calendar) days to expiry |
129 | ddivDisc | float | dividend discount factor: SUM(div * iDays / 365.0 - divYrs) due to dividends being paid (thereby lowering the uPrc basis) prior to expiry |
112 | strikePv | float | strike * EXP(-globalRate * iDays / 365) |
113 | fairSVol | float | call/put surface volatility value |
114 | fairSDiv | float | call/put surface alignment sdiv value |
115 | fairCallPrc | float | fairPrice = PRICE.AMERICAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream}) |
116 | fairCallPrcE | float | fairPrice = PRICE.EUROPEAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream}) |
117 | fairPutPrc | float | fairPrice = PRICE.AMERICAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream}) |
118 | fairPutPrcE | float | fairPrice = PRICE.EUROPEAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream}) |
119 | rcFairPrc | float | fairCallPrc - fairPutPrc - uPrc + strike (revCon fairMid price) |
120 | rcEExPrem | float | (fairPutPrc - fairPutPrcE) - (fairCallPrc - fairCallPrcE) |
121 | fairLoanPv | float | fairCallPrc - fairPutPrc - uPrc + strike + strikePv + ddivPv (total present value of letting out shares) (term to expiry) (per share) |
122 | fairLoanRate | float | fairLoanPv / (uPrc * iDays / 365.0 - ddivDisc) |
130 | rcBidPrc | float | callBid - putAsk - uPrc + strike (best way) (join markets) |
131 | rcAskPrc | float | callAsk - putBid - uPrc + strike (worst way) (cross markets) |
125 | calcError | string(16) | |
126 | cpOI | int | c/p open interest (market) [upper bound] |
127 | cpVlm | int | c/p print volume (this exchange) [upper bound] |
128 | timestamp | DateTime | last update time (Date) |
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 = 'LiveRevConQuote'
# 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=LiveRevConQuote'
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 = 'LiveRevConQuote'
# 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|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|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 = 'calcError: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=LiveRevConQuote' \
--data-urlencode 'view=ticker|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|timestamp' \
--data-urlencode 'where=calcError: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 = 'LiveRevConQuote'
# 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|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|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 = 'calcError: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=LiveRevConQuote' \
--data-urlencode 'view=ticker|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|timestamp' \
--data-urlencode 'where=calcError: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 = 'LiveRevConQuote'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'ticker|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'ddivSource'
# 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 = 'calcError: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=LiveRevConQuote' \
--data-urlencode 'measure=ticker|xAxis|cDe|pDe|uPrc|atmVol|years|globalRate|ddiv|ddivPv|ddivSource|iDays|ddivDisc|strikePv|fairSVol|fairSDiv|fairCallPrc|fairCallPrcE|fairPutPrc|fairPutPrcE|rcFairPrc|rcEExPrem|fairLoanPv|fairLoanRate|rcBidPrc|rcAskPrc|calcError|cpOI|cpVlm|timestamp' \
--data-urlencode 'group=ddivSource' \
--data-urlencode 'where=calcError: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 = 'LiveRevConQuote'
# 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 = 'calcError: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=LiveRevConQuote' \
--data-urlencode 'where=calcError:eq:ExampleString'