Schema: SymbolRiskDetailV5 (ID: 4860)
SymbolRiskDetail records contain semi-static markup detail for SymbolRiskSummary 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 | Default Value | Comment |
|---|---|---|---|---|
| 10= | ticker | TickerKey | ||
| 11= | accnt | string(16) | ||
| 12= | tradeDate | DateKey | ||
| 13= | clientFirm | string(16) | SR assigned client firm | |
| 103 | clientTags | text2 | (optional) user defined account tag(s) (eg. tag,tag,tag,tag) [max of 10,000 total chars (including seps)] | |
| 106 | stkStatus | enum : StkStatus | Stock trading status indicator (user controlled;used by the HedgeTool and by trade controllers) [SymbolControl.stkStatus] | |
| 109 | optStatus | enum : OptStatus | Option trading status indicator (user controlled;only used by trade controllers) [SymbolControl.optStatus] | |
| 112 | riskClass | string(8) | Symbol Risk Class Code (user supplied) [SymbolControl.riskClass] | |
| 115 | theoModel | string(16) | SR assigned theo model tag (associated with user supplied theo surfaces) [AccountConfig.theoModel] | |
| 118 | theoModel2 | string(16) | SR assigned theo model#2 tag (associated with user supplied theo surfaces) [AccountConfig.theoModel2] | |
| 121 | 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] | |
| 124 | holdReason | enum : HoldReason | User supplied description (only informational) [SymbolControl.holdReason] | |
| 127 | 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] | |
| 130 | ctrlUpdate | DateTime | last update dttm of SymbolControl record [SymbolControl.timestamp] | |
| 136 | symbolType | enum : SymbolType | SymbolType (Equity, ETF, ShortETF, ADR, CashIndex, FutureComplex) | |
| 139 | name | string(16) | Symbol name/description | |
| 142 | industry | int | ||
| 145 | sector | string(16) | ||
| 148 | beta | float | beta (usually beta to SPX; see AccountConfig.betaSource) | |
| 151 | betaSource | enum : BetaSource | ||
| 154 | stkVolume | float | trailing 30 day average daily stock volume | |
| 157 | optVolume | float | trailing 30 day average daily option volume | |
| 160 | tapeCode | enum : TapeCode | market data tape code | |
| 163 | marginType | enum : MarginType | margin slide type: Equity = +/- 15%, Index = -8%/+6%, Medium = +/-10% | |
| 166 | pointCurrency | enum : Currency | ||
| 169 | dAmt | float | $amount of the next expected dividend | |
| 172 | dDays | short | days to next expected dividend (negative indicates days from a recent ex-date) | |
| 175 | eDays | short | days to next expected earnings (negative indicates days from a recent announcement) | |
| 178 | locateQuan | int | starting locate quantity in this symbol befores trades | |
| 181 | availableLocateQuan | int | available equity locate quantity in this symbol after trades | |
| 184 | gcFlag | enum : YesNo | is this symbol a general collateral name (no special borrow rate) | |
| 187 | gcRate | float | expected overnight rate if general collateral (usually FF overnight rate) | |
| 190 | borrowRate | float | expected overnight borrow rate (special borrrow) | |
| 193 | stMinIVol | float | minimum atm implied volatility (all expirations with a position) | |
| 196 | stMaxIVol | float | maximum atm implied volatility (all expirations with a position) | |
| 199 | earnMult | float | expected earnings multiplier (affects some risk slides) [1.0 - 8.0] | |
| 202 | earnMultErr | float | ||
| 205 | baseVol | float | from earn mult fit (<0.75 yrs) | |
| 208 | tailVol | float | weighted toward max expiration | |
| 211 | 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 = 'SymbolRiskDetailV5'
# 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=SymbolRiskDetailV5'
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 = 'SymbolRiskDetailV5'
# 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 = 'clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|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=SymbolRiskDetailV5' \
--data-urlencode 'view=clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|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 = 'SymbolRiskDetailV5'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|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 = 'clientTags: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=SymbolRiskDetailV5' \
--data-urlencode 'view=clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=clientTags: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 = 'SymbolRiskDetailV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'stkStatus|optStatus|hedgeDeltaRule|holdReason|symbolType|betaSource|tapeCode|marginType|pointCurrency|gcFlag'
# 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=SymbolRiskDetailV5' \
--data-urlencode 'measure=clientTags|stkStatus|optStatus|riskClass|theoModel|theoModel2|hedgeDeltaRule|holdReason|binaryDays|ctrlUpdate|symbolType|name|industry|sector|beta|betaSource|stkVolume|optVolume|tapeCode|marginType|pointCurrency|dAmt|dDays|eDays|locateQuan|availableLocateQuan|gcFlag|gcRate|borrowRate|stMinIVol|stMaxIVol|earnMult|earnMultErr|baseVol|tailVol|timestamp' \
--data-urlencode 'group=stkStatus|optStatus|hedgeDeltaRule|holdReason|symbolType|betaSource|tapeCode|marginType|pointCurrency|gcFlag' \
--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 = 'SymbolRiskDetailV5'
# 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=SymbolRiskDetailV5' \
--data-urlencode 'where=accnt:eq:ExampleString'