Schema: SpdrRiskGroupControl (ID: 4570)
METADATA
| Attribute | Value |
|---|---|
| Topic | 4535-risk-control |
| MLink Token | ClientTrading |
| SRSE Product | SRTrade |
Note: The symbol
=next to a field number indicates that it is a primary key.
BODY
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 10= | riskGroupId | long | ||
| 11= | accnt | string(16) | ||
| 12= | riskFirm | string(16) | SR client firm | |
| 100 | sysEnvironment | enum : SysEnvironment | original (source) sys environment [Stable, Current, etc] | |
| 101 | runStatus | enum : RunStatus | original (source) run status [Prod,Beta] | |
| 102 | isDisabled | enum : YesNo | will disable all trading in this risk group (parent orders will cancel existing child orders and suspend new child orders) | |
| 103 | expDayWtVegaOffset | float | -1 | max acct+symbol day wtVega offset (target) |
| 104 | maxExpDayWtVegaLn | float | -1 | max accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
| 105 | maxExpDayWtVegaSh | float | -1 | max accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
| 106 | maxExpDayRMetric6Ln | float | -1 | max acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 107 | maxExpDayRMetric6Sh | float | -1 | max acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 108 | symDayDDeltaOffset | float | -1 | max acct+symbol day $delta offset (target) |
| 109 | maxSymDayDDeltaLn | float | -1 | max acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
| 110 | maxSymDayDDeltaSh | float | -1 | max acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
| 111 | symDayVegaOffset | float | -1 | max acct+symbol day vega offset (target) |
| 112 | maxSymDayVegaLn | float | -1 | max acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
| 113 | maxSymDayVegaSh | float | -1 | max acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
| 114 | symDayWtVegaOffset | float | -1 | max acct+symbol day wtVega offset (target) |
| 115 | maxSymDayWtVegaLn | float | -1 | max acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
| 116 | maxSymDayWtVegaSh | float | -1 | max acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
| 117 | maxSymDayRMetric7Ln | float | -1 | max acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 118 | maxSymDayRMetric7Sh | float | -1 | max acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 119 | maxGrpDayContractsLn | int | -1 | max acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 120 | maxGrpDayContractsSh | int | -1 | max acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 121 | maxGrpDayContractsAbs | int | -1 | max acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
| 122 | maxGrpDayDDeltaLn | float | -1 | max acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 123 | maxGrpDayDDeltaSh | float | -1 | max acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 124 | maxGrpDayVegaLn | float | -1 | max acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 125 | maxGrpDayVegaSh | float | -1 | max acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 126 | maxGrpDayVegaAbs | float | -1 | max acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
| 127 | grpDayVegaRatio | float | 1.0 | target bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega) |
| 128 | maxGrpDayRMetric1Ln | float | -1 | max acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 129 | maxGrpDayRMetric1Sh | float | -1 | max acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 130 | maxGrpDayRMetric1Abs | float | -1 | max acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
| 131 | grpDayRMetric1Ratio | float | 1.0 | target bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1) |
| 132 | maxGrpDayRMetric2Ln | float | -1 | max acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 133 | maxGrpDayRMetric2Sh | float | -1 | max acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 134 | maxGrpDayRMetric3Ln | float | -1 | max acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 135 | maxGrpDayRMetric3Sh | float | -1 | max acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 136 | maxGrpDayRMetric4Ln | float | -1 | max acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 137 | maxGrpDayRMetric4Sh | float | -1 | max acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 138 | maxGrpDayRMetric5Ln | float | -1 | max acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter |
| 139 | maxGrpDayRMetric5Sh | float | -1 | max acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter |
| 140 | accEmaCxlDDeltaLn | float | -1 | max 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] |
| 141 | accEmaCxlDDeltaSh | float | -1 | max acct 60s EMA $delta short (positive number; <= 0 is no limit) |
| 142 | accEmaCxlWtVegaLn | float | -1 | max 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] |
| 143 | accEmaCxlWtVegaSh | float | -1 | max acct 60s EMA wtVega short (positive number; <= 0 is no limit) |
| 144 | symEmaCxlDDeltaLn | float | -1 | max 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] |
| 145 | symEmaCxlDDeltaSh | float | -1 | max acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit) |
| 146 | symEmaCxlWtVegaLn | float | -1 | max 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] |
| 147 | symEmaCxlWtVegaSh | float | -1 | max acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit) |
| 148 | modifiedBy | string(24) | ||
| 149 | modifiedIn | enum : SysEnvironment | ||
| 150 | 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 = '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)
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=SpdrRiskGroupControl'
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 = '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)
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=SpdrRiskGroupControl' \
--data-urlencode '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' \
--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 = '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)
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=SpdrRiskGroupControl' \
--data-urlencode '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' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=sysEnvironment: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 = '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)
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=SpdrRiskGroupControl' \
--data-urlencode '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' \
--data-urlencode 'group=sysEnvironment|runStatus|isDisabled|modifiedIn' \
--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 = '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)
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=SpdrRiskGroupControl' \
--data-urlencode 'where=accnt:eq:ExampleString'
Post 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'
# Request Parameters
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'postmsgs',
"postaction": "I", # (I)nsert, (U)pdate, (R)eplace, or (D)elete
"postmerge": "Y", # (Y)es or (N)o
}
payload = {
"header": {
"mTyp": "SpdrRiskGroupControl"
},
"message": {
"pkey": {
"riskGroupId": 1, // long
"accnt": "exampleString", // string
"riskFirm": "exampleString" // string
},
"sysEnvironment": "enumValue", // enum(SysEnvironment) - None, Neptune, Pluto, V7_Stable, V7_Latest, Saturn, Venus, Mars, SysTest, V7_Current
"runStatus": "enumValue", // enum(RunStatus) - None, Prod, Beta, UAT, SysTest
"isDisabled": "enumValue", // enum(YesNo) - None, Yes, No
"expDayWtVegaOffset": -1, // float. Default=-1
"maxExpDayWtVegaLn": -1, // float. Default=-1
"maxExpDayWtVegaSh": -1, // float. Default=-1
"maxExpDayRMetric6Ln": -1, // float. Default=-1
"maxExpDayRMetric6Sh": -1, // float. Default=-1
"symDayDDeltaOffset": -1, // float. Default=-1
"maxSymDayDDeltaLn": -1, // float. Default=-1
"maxSymDayDDeltaSh": -1, // float. Default=-1
"symDayVegaOffset": -1, // float. Default=-1
"maxSymDayVegaLn": -1, // float. Default=-1
"maxSymDayVegaSh": -1, // float. Default=-1
"symDayWtVegaOffset": -1, // float. Default=-1
"maxSymDayWtVegaLn": -1, // float. Default=-1
"maxSymDayWtVegaSh": -1, // float. Default=-1
"maxSymDayRMetric7Ln": -1, // float. Default=-1
"maxSymDayRMetric7Sh": -1, // float. Default=-1
"maxGrpDayContractsLn": -1, // int. Default=-1
"maxGrpDayContractsSh": -1, // int. Default=-1
"maxGrpDayContractsAbs": -1, // int. Default=-1
"maxGrpDayDDeltaLn": -1, // float. Default=-1
"maxGrpDayDDeltaSh": -1, // float. Default=-1
"maxGrpDayVegaLn": -1, // float. Default=-1
"maxGrpDayVegaSh": -1, // float. Default=-1
"maxGrpDayVegaAbs": -1, // float. Default=-1
"grpDayVegaRatio": 1.0, // float. Default=1.0
"maxGrpDayRMetric1Ln": -1, // float. Default=-1
"maxGrpDayRMetric1Sh": -1, // float. Default=-1
"maxGrpDayRMetric1Abs": -1, // float. Default=-1
"grpDayRMetric1Ratio": 1.0, // float. Default=1.0
"maxGrpDayRMetric2Ln": -1, // float. Default=-1
"maxGrpDayRMetric2Sh": -1, // float. Default=-1
"maxGrpDayRMetric3Ln": -1, // float. Default=-1
"maxGrpDayRMetric3Sh": -1, // float. Default=-1
"maxGrpDayRMetric4Ln": -1, // float. Default=-1
"maxGrpDayRMetric4Sh": -1, // float. Default=-1
"maxGrpDayRMetric5Ln": -1, // float. Default=-1
"maxGrpDayRMetric5Sh": -1, // float. Default=-1
"accEmaCxlDDeltaLn": -1, // float. Default=-1
"accEmaCxlDDeltaSh": -1, // float. Default=-1
"accEmaCxlWtVegaLn": -1, // float. Default=-1
"accEmaCxlWtVegaSh": -1, // float. Default=-1
"symEmaCxlDDeltaLn": -1, // float. Default=-1
"symEmaCxlDDeltaSh": -1, // float. Default=-1
"symEmaCxlWtVegaLn": -1, // float. Default=-1
"symEmaCxlWtVegaSh": -1, // float. Default=-1
"modifiedBy": "exampleString", // string
"modifiedIn": "enumValue", // enum(SysEnvironment) - None, Neptune, Pluto, V7_Stable, V7_Latest, Saturn, Venus, Mars, SysTest, V7_Current
"timestamp": "2025-01-01 12:00:00.000000" // yyyy-MM-dd HH:mm:ss.SSSSSS
}
}
response = requests.post(MLINK_PROD_URL, params=params, json=payload)
curl -X POST 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=postmsgs' \
--data-urlencode 'postaction=I' \ # (I)nsert, (U)pdate, (R)eplace, or (D)elete
--data-urlencode 'postmerge=Y' \ # (Y)es or (N)o
--header 'Content-Type: application/json' \
--data '{
"header": {
"mTyp": "SpdrRiskGroupControl"
},
"message": {
"pkey": {
"riskGroupId": 1, // long
"accnt": "exampleString", // string
"riskFirm": "exampleString" // string
},
"sysEnvironment": "enumValue", // enum(SysEnvironment) - None, Neptune, Pluto, V7_Stable, V7_Latest, Saturn, Venus, Mars, SysTest, V7_Current
"runStatus": "enumValue", // enum(RunStatus) - None, Prod, Beta, UAT, SysTest
"isDisabled": "enumValue", // enum(YesNo) - None, Yes, No
"expDayWtVegaOffset": -1, // float. Default=-1
"maxExpDayWtVegaLn": -1, // float. Default=-1
"maxExpDayWtVegaSh": -1, // float. Default=-1
"maxExpDayRMetric6Ln": -1, // float. Default=-1
"maxExpDayRMetric6Sh": -1, // float. Default=-1
"symDayDDeltaOffset": -1, // float. Default=-1
"maxSymDayDDeltaLn": -1, // float. Default=-1
"maxSymDayDDeltaSh": -1, // float. Default=-1
"symDayVegaOffset": -1, // float. Default=-1
"maxSymDayVegaLn": -1, // float. Default=-1
"maxSymDayVegaSh": -1, // float. Default=-1
"symDayWtVegaOffset": -1, // float. Default=-1
"maxSymDayWtVegaLn": -1, // float. Default=-1
"maxSymDayWtVegaSh": -1, // float. Default=-1
"maxSymDayRMetric7Ln": -1, // float. Default=-1
"maxSymDayRMetric7Sh": -1, // float. Default=-1
"maxGrpDayContractsLn": -1, // int. Default=-1
"maxGrpDayContractsSh": -1, // int. Default=-1
"maxGrpDayContractsAbs": -1, // int. Default=-1
"maxGrpDayDDeltaLn": -1, // float. Default=-1
"maxGrpDayDDeltaSh": -1, // float. Default=-1
"maxGrpDayVegaLn": -1, // float. Default=-1
"maxGrpDayVegaSh": -1, // float. Default=-1
"maxGrpDayVegaAbs": -1, // float. Default=-1
"grpDayVegaRatio": 1.0, // float. Default=1.0
"maxGrpDayRMetric1Ln": -1, // float. Default=-1
"maxGrpDayRMetric1Sh": -1, // float. Default=-1
"maxGrpDayRMetric1Abs": -1, // float. Default=-1
"grpDayRMetric1Ratio": 1.0, // float. Default=1.0
"maxGrpDayRMetric2Ln": -1, // float. Default=-1
"maxGrpDayRMetric2Sh": -1, // float. Default=-1
"maxGrpDayRMetric3Ln": -1, // float. Default=-1
"maxGrpDayRMetric3Sh": -1, // float. Default=-1
"maxGrpDayRMetric4Ln": -1, // float. Default=-1
"maxGrpDayRMetric4Sh": -1, // float. Default=-1
"maxGrpDayRMetric5Ln": -1, // float. Default=-1
"maxGrpDayRMetric5Sh": -1, // float. Default=-1
"accEmaCxlDDeltaLn": -1, // float. Default=-1
"accEmaCxlDDeltaSh": -1, // float. Default=-1
"accEmaCxlWtVegaLn": -1, // float. Default=-1
"accEmaCxlWtVegaSh": -1, // float. Default=-1
"symEmaCxlDDeltaLn": -1, // float. Default=-1
"symEmaCxlDDeltaSh": -1, // float. Default=-1
"symEmaCxlWtVegaLn": -1, // float. Default=-1
"symEmaCxlWtVegaSh": -1, // float. Default=-1
"modifiedBy": "exampleString", // string
"modifiedIn": "enumValue", // enum(SysEnvironment) - None, Neptune, Pluto, V7_Stable, V7_Latest, Saturn, Venus, Mars, SysTest, V7_Current
"timestamp": "2025-01-01 12:00:00.000000" // yyyy-MM-dd HH:mm:ss.SSSSSS
}
}'