Skip to main content
Version: Upcoming

Schema: SpdrRiskGroupControl (ID: 4570)

METADATA

AttributeValue
Topic4535-risk-control
MLink TokenClientTrading
SRSE ProductSRTrade

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeComment
10=riskGroupIdlong
11=accntstring(16)
12=riskFirmstring(16)SR client firm
100sysEnvironmentenum : SysEnvironmentoriginal (source) sys environment [Stable, Current, etc]
101runStatusenum : RunStatusoriginal (source) run status [Prod,Beta]
102isDisabledenum : YesNowill disable all trading in this risk group (parent orders will cancel existing child orders and suspend new child orders)
103expDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
104maxExpDayWtVegaLnfloatmax accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
105maxExpDayWtVegaShfloatmax accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
106maxExpDayRMetric6Lnfloatmax acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter
107maxExpDayRMetric6Shfloatmax acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter
108symDayDDeltaOffsetfloatmax acct+symbol day $delta offset (target)
109maxSymDayDDeltaLnfloatmax acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
110maxSymDayDDeltaShfloatmax acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
111symDayVegaOffsetfloatmax acct+symbol day vega offset (target)
112maxSymDayVegaLnfloatmax acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
113maxSymDayVegaShfloatmax acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
114symDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
115maxSymDayWtVegaLnfloatmax acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
116maxSymDayWtVegaShfloatmax acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
117maxSymDayRMetric7Lnfloatmax acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter
118maxSymDayRMetric7Shfloatmax acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter
119maxGrpDayContractsLnintmax acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter
120maxGrpDayContractsShintmax acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter
121maxGrpDayContractsAbsintmax acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
122maxGrpDayDDeltaLnfloatmax acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter
123maxGrpDayDDeltaShfloatmax acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter
124maxGrpDayVegaLnfloatmax acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter
125maxGrpDayVegaShfloatmax acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter
126maxGrpDayVegaAbsfloatmax acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
127grpDayVegaRatiofloattarget bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega)
128maxGrpDayRMetric1Lnfloatmax acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter
129maxGrpDayRMetric1Shfloatmax acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter
130maxGrpDayRMetric1Absfloatmax acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
131grpDayRMetric1Ratiofloattarget bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1)
132maxGrpDayRMetric2Lnfloatmax acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter
133maxGrpDayRMetric2Shfloatmax acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter
134maxGrpDayRMetric3Lnfloatmax acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter
135maxGrpDayRMetric3Shfloatmax acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter
136maxGrpDayRMetric4Lnfloatmax acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter
137maxGrpDayRMetric4Shfloatmax acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter
138maxGrpDayRMetric5Lnfloatmax acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter
139maxGrpDayRMetric5Shfloatmax acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter
140accEmaCxlDDeltaLnfloatmax acct 60s EMA $delta long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
141accEmaCxlDDeltaShfloatmax acct 60s EMA $delta short (positive number; <= 0 is no limit)
142accEmaCxlWtVegaLnfloatmax acct 60s EMA wtVega long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
143accEmaCxlWtVegaShfloatmax acct 60s EMA wtVega short (positive number; <= 0 is no limit)
144symEmaCxlDDeltaLnfloatmax acct+symbol 60s EMA $delta long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
145symEmaCxlDDeltaShfloatmax acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit)
146symEmaCxlWtVegaLnfloatmax acct+symbol 60s EMA wtVega long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
147symEmaCxlWtVegaShfloatmax acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit)
148modifiedBystring(24)
149modifiedInenum : SysEnvironment
150timestampDateTime

Get Schema API Call

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 = 'SpdrRiskGroupControl'

# 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)

Get Msg API Call

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 = 'SpdrRiskGroupControl'

# 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 = 'sysEnvironment|runStatus|isDisabled|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|accEmaCxlDDeltaLn|accEmaCxlDDeltaSh|accEmaCxlWtVegaLn|accEmaCxlWtVegaSh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|modifiedBy|modifiedIn|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)

Get Msgs API Call

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 = 'SpdrRiskGroupControl'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sysEnvironment|runStatus|isDisabled|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|accEmaCxlDDeltaLn|accEmaCxlDDeltaSh|accEmaCxlWtVegaLn|accEmaCxlWtVegaSh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|modifiedBy|modifiedIn|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 = 'sysEnvironment: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)

Get Aggregate API Call

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 = 'SpdrRiskGroupControl'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysEnvironment|runStatus|isDisabled|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|accEmaCxlDDeltaLn|accEmaCxlDDeltaSh|accEmaCxlWtVegaLn|accEmaCxlWtVegaSh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|modifiedBy|modifiedIn|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysEnvironment|runStatus|isDisabled|modifiedIn'

# 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)

Get Count API Call

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 = 'SpdrRiskGroupControl'

# 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)