Schema: FutureRiskDetailV5 (ID: 4780)
FutureRiskDetail records contain semi-static markup detail for FutureRiskSummary records.
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
SRSE Product | SRRisk |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | fkey | ExpiryKey | |
11= | accnt | string(16) | |
12= | tradeDate | DateKey | |
13= | clientFirm | string(16) | SR assigned client firm |
100 | periodEndTime | DateTime | DTTM of the end of the current trading period |
106 | viewGroup1 | string(12) | Account Group #1 (SR Assigned) used to organize account groups [AccountConfig.viewGroup1] |
109 | viewGroup2 | string(12) | Account Group #2 (SR Assigned) used to organize account groups [AccountConfig.viewGroup2] |
112 | viewGroup3 | string(12) | Account Group #3 (SR Assigned) used to organize account groups [AccountConfig.viewGroup3] |
115 | futStatus | enum : FutStatus | |
118 | optStatus | enum : OptStatus | |
121 | riskClass | string(8) | Symbol Risk Class Code (user supplied) [SymbolControl.riskClass] |
124 | theoModel | string(16) | SR assigned theo model tag (associated with user supplied theo surfaces) [AccountConfig.theoModel] |
127 | theoModel2 | string(16) | SR assigned theo model#2 tag (associated with user supplied theo surfaces) [AccountConfig.theoModel2] |
130 | hedgeDeltaRule | enum : HedgeDeltaRule | HedgeDelta Source (IVol = use SR implied surface (sticky strike), IvS = use SR surface (sticky delta), TVol = use user supplied theo surface (sticky strike), TvS = use user supplied theo surface and atm veSlope (sticky delta)) [AccountConfig.hedgeDelta] |
133 | holdReason | enum : HoldReason | User supplied description (only informational) [SymbolControl.holdReason] |
136 | binaryDays | float | Fractional days [0 - 5.0] prior to expiration after which hedgeDeltas become binary [-1.0, -0.5, 0, +0.5, +1.0] [SymbolControl.binaryDays] |
139 | ctrlUpdate | DateTime | last update dttm of SymbolControl record [SymbolControl.timestamp] |
142 | symbolType | enum : SymbolType | SymbolType (Equity, ETF, ShortETF, ADR, CashIndex, FutureComplex) |
145 | name | string(16) | Symbol name/description |
148 | beta | float | beta (usually beta to SPX; see AccountConfig.betaSource) |
151 | betaSource | enum : BetaSource | |
154 | futVolume | float | trailing 30 day average daily stock volume |
157 | optVolume | float | trailing 30 day average daily option volume |
160 | marginType | enum : MarginType | margin slide type: NMS_Equity = +/- 15%, NMS_Index = -8%/+6%, NMS_Medium = +/-10% |
163 | isYieldBased | enum : YesNo | is the symbol a yield based future;can affect greeks and pricing (eg, eurodollars) |
166 | shortTermVol | float | estimated/implied short term underlier volatility |
169 | pointValue | float | point value of this future |
172 | pointCurrency | enum : Currency | |
175 | underliersPerCn | int | underliers per contract of the futures associated with this symbol (if any) [default = 1] |
178 | underlierType | enum : UnderlierType | |
181 | timestamp | DateTime |
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 = 'FutureRiskDetailV5'
# 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=FutureRiskDetailV5'
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 = 'FutureRiskDetailV5'
# 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 = 'periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|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 = 'accnt: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=FutureRiskDetailV5' \
--data-urlencode 'view=periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|timestamp' \
--data-urlencode 'where=accnt: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 = 'FutureRiskDetailV5'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|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 = 'accnt: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 = 'periodEndTime: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=FutureRiskDetailV5' \
--data-urlencode 'view=periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=periodEndTime: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 = 'FutureRiskDetailV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'futStatus|optStatus|hedgeDeltaRule|holdReason|symbolType|betaSource|marginType|isYieldBased|pointCurrency|underlierType'
# 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 = 'accnt: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=FutureRiskDetailV5' \
--data-urlencode 'measure=periodEndTime|viewGroup1|viewGroup2|viewGroup3|futStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|beta|betaSource|futVolume|optVolume|marginType|isYieldBased|shortTermVol|pointValue|pointCurrency|underliersPerCn|underlierType|timestamp' \
--data-urlencode 'group=futStatus|optStatus|hedgeDeltaRule|holdReason|symbolType|betaSource|marginType|isYieldBased|pointCurrency|underlierType' \
--data-urlencode 'where=accnt: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 = 'FutureRiskDetailV5'
# 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 = 'accnt: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=FutureRiskDetailV5' \
--data-urlencode 'where=accnt:eq:ExampleString'