Schema: RiskGroupCounter (ID: 4655)
METADATA
Attribute | Value |
---|---|
Topic | 4625-risk-counter |
MLink Token | ClientTrading |
SRSE Product | SRTrade |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
13= | riskGroupId | long | |
11= | accnt | string(16) | |
12= | riskFirm | string(16) | |
100 | sysRealm | enum : SysRealm | |
101 | sysEnvironment | enum : SysEnvironment | original (source) sys environment [Stable, Current, etc] |
102 | riskEngine | string(32) | EE engine name |
103 | changeReason | enum : ChangeReason | |
104 | optQtyBotIocFilled | float | fills + IOC leaves |
105 | optQtySldIocFilled | float | fills + IOC leaves |
106 | ddBotIocFilled | float | fills + IOC leaves |
107 | ddSldIocFilled | float | fills + IOC leaves |
108 | veBotIocFilled | float | fills + IOC leaves |
109 | veSldIocFilled | float | fills + IOC leaves |
110 | wtVeBotIocFilled | float | fills + IOC leaves |
111 | wtVeSldIocFilled | float | fills + IOC leaves |
112 | nvBotIocFilled | float | fills + IOC leaves (notional value) |
113 | nvSldIocFilled | float | fills + IOC leaves (notional value) |
114 | rm1BotIocFilled | float | fills + IOC leaves |
115 | rm1SldIocFilled | float | fills + IOC leaves |
116 | rm2BotIocFilled | float | fills + IOC leaves |
117 | rm2SldIocFilled | float | fills + IOC leaves |
118 | rm3BotIocFilled | float | fills + IOC leaves |
119 | rm3SldIocFilled | float | fills + IOC leaves |
120 | rm4BotIocFilled | float | fills + IOC leaves |
121 | rm4SldIocFilled | float | fills + IOC leaves |
122 | rm5BotIocFilled | float | fills + IOC leaves |
123 | rm5SldIocFilled | float | fills + IOC leaves |
124 | rm6BotIocFilled | float | fills + IOC leaves |
125 | rm6SldIocFilled | float | fills + IOC leaves |
126 | rm7BotIocFilled | float | fills + IOC leaves |
127 | rm7SldIocFilled | float | fills + IOC leaves |
128 | counter | int | |
129 | 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 = 'RiskGroupCounter'
# 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=RiskGroupCounter'
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 = 'RiskGroupCounter'
# 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 = 'sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|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=RiskGroupCounter' \
--data-urlencode 'view=sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|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 = 'RiskGroupCounter'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|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 = 'sysRealm: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=RiskGroupCounter' \
--data-urlencode 'view=sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=sysRealm: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 = 'RiskGroupCounter'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysRealm|sysEnvironment|changeReason'
# 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=RiskGroupCounter' \
--data-urlencode 'measure=sysRealm|sysEnvironment|riskEngine|changeReason|optQtyBotIocFilled|optQtySldIocFilled|ddBotIocFilled|ddSldIocFilled|veBotIocFilled|veSldIocFilled|wtVeBotIocFilled|wtVeSldIocFilled|nvBotIocFilled|nvSldIocFilled|rm1BotIocFilled|rm1SldIocFilled|rm2BotIocFilled|rm2SldIocFilled|rm3BotIocFilled|rm3SldIocFilled|rm4BotIocFilled|rm4SldIocFilled|rm5BotIocFilled|rm5SldIocFilled|rm6BotIocFilled|rm6SldIocFilled|rm7BotIocFilled|rm7SldIocFilled|counter|timestamp' \
--data-urlencode 'group=sysRealm|sysEnvironment|changeReason' \
--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 = 'RiskGroupCounter'
# 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=RiskGroupCounter' \
--data-urlencode 'where=accnt:eq:ExampleString'