Schema: AccountRiskRecordV5 (ID: 4745)
AccountRiskRecords contain account level position and risk summary detail. These records are published by AggRiskServers throughout the day approximately once per minute.
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= | accnt | string(16) | SR account acronym |
11= | currency | enum : Currency | point currency of all associated positions and pnl values |
12= | tradeDate | DateKey | |
13= | riskSession | enum : RiskSession | |
14= | clientFirm | string(16) | SR assigned client firm acronym |
106 | lnDDelta | double | long net position $delta value (underlier + options) (today; SR marks) |
109 | shDDelta | double | short net position $delta value (underlier + options) (today; SR marks) |
112 | lnStkMktValue | double | long stock market value (today; SR marks) |
115 | shStkMktValue | double | short stock market value (today; SR marks) |
118 | futMktValue | double | future market value (today; SR marks) |
121 | stkOptMktValue | double | stock option market value (today; SR vol marks) |
124 | futOptMktValue | double | future option market value (today; SR vol marks) |
127 | vegaLong | float | sum of long vega symbol positions;=sum(+srs.vega) if srs.vega > 0 |
130 | vegaShort | float | sum of short vega symbol positions;= sum(-srs.vega) if srs.vega < 0 |
133 | wVegaLong | float | sum of long weighted vega symbol positions;=sum(+srs.wVega) if srs.wVega > 0 |
136 | wVegaShort | float | sum of short weighted vega symbol positions;= sum(-srs.wVega) if srs.wVega < 0 |
139 | wtVegaLong | float | sum of long time weighted weighted vega symbol positions;=sum(+srs.wtVega) if srs.wtVega > 0 |
142 | wtVegaShort | float | sum of short time weighted vega symbol positions;= sum(-srs.wtVega) if srs.wtVega < 0 |
145 | thetaLong | float | sum of long vega symbol positions;=sum(+srs.theta) if srs.theta > 0 |
148 | thetaShort | float | sum of short vega symbol positions;= sum(-srs.theta) if srs.theta < 0 |
151 | rhoLong | float | sum of long rho symbol positions;=sum(+srs.rho) if srs.rho > 0 |
154 | rhoShort | float | sum of short rho symbol positions;= sum(-srs.rho) if srs.rho < 0 |
157 | ivolLn | float | |
160 | ivolSh | float | |
163 | wtVeDd | float | Aggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30 |
166 | wtVeDn | float | Aggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10 |
169 | wtVeAt | float | Aggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10 |
172 | wtVeUp | float | Aggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30 |
175 | wtVeDu | float | Aggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde |
178 | wtVeM1 | float | Aggregate M1 Time Weighted Vega;=sum[wtVega] if days < 10 |
181 | wtVeM2 | float | Aggregate M2 Time Weighted Vega;=sum[wtVega] if 10 < days < 25 |
184 | wtVeM3 | float | Aggregate M3 Time Weighted Vega;=sum[wtVega] if 25 < days < 65 |
187 | wtVeM4 | float | Aggregate M4 Time Weighted Vega;=sum[wtVega] if 65 < days < 130 |
190 | wtVeM5 | float | Aggregate M5 Time Weighted Vega;=sum[wtVega] if 130 < days |
193 | ddelta | float | net $delta;=sum(srs.ddelta) |
196 | numSymbols | int | count of srs records being aggregated |
199 | absCurSh | int | absolute number of account shares (CLR + trades);=sum(srs.opShAbsCur) |
202 | absCurFc | int | absolute number of account future contracts (CLR + trades);=sum(srs.opFcAbsCur) |
205 | absCurCn | int | absolute number of account option contracts (CLR + trades);=sum(srs.opCnAbsCur) |
208 | premOvPar | float | aggregate premium over parity for the option position;=sum(srs.premOvPar) |
211 | optExAsPnl | double | |
214 | dividendPnl | double | |
217 | corpActCashPnL | double | |
220 | stkOpnPnlMid | double | |
223 | stkOpnPnlClr | double | |
226 | futOpnPnlMid | double | |
229 | futOpnPnlClr | double | |
232 | stkOptOpnPnlVol | double | |
235 | stkOptOpnPnlMid | double | |
238 | stkOptOpnPnlClr | double | |
241 | futOptOpnPnlVol | double | |
244 | futOptOpnPnlMid | double | |
247 | futOptOpnPnlClr | double | |
250 | stkDayPnl | double | stock day pnl;=sum(srs.stPnlDay) |
253 | futDayPnl | double | futures day pnl;=sum(srs.fcPnlDay) |
256 | stkOptDayPnl | double | stock option day pnl;= sum(srs.opPnlDay) |
259 | futOptDayPnl | double | future option day pnl;= sum(srs.opPnlDay) |
262 | stktDaySh | int | stock day shares (bot + sld); |
265 | stkDayMny | double | stock day mny (sld - bot) |
268 | futDayCn | int | future day contracts (bot + sld); |
271 | futDayMny | double | future day mny (sld - bot) |
274 | stkOptDayCn | int | stock option day contracts (bot + sld); |
277 | stkOptDayMny | double | stock option day mny (sld - bot) |
280 | futOptDayCn | int | future option day contracts (bot + sld); |
283 | futOptDayMny | double | future option day mny (sld - bot) |
286 | dayDDelta | float | day $delta;= sum(srs.dayDelta) |
289 | opDayVega | float | option vega traded today |
292 | opDayWVega | float | option (vol weighted) vega traded today |
295 | opDayTVega | float | option (time weighted) vega traded today |
298 | opDayWtVega | float | option (vol time weighted) vega traded today |
301 | opDayTheta | float | option theta traded today |
304 | opEdgeOpened | float | option theo edge opened today |
307 | opEdgeClosed | float | option theo edge closed today |
310 | pnlDn | float | option delta neutral pnl;=sum(srs.pnlDn) |
313 | pnlDe | float | option delta pnl;=sum(srs.pnlDe) |
316 | pnlSl | float | option vega/delta pnl;=sum(srs.pnlSl) |
319 | pnlGa | float | option gamma pnl;=sum(srs.pnlGa) |
322 | pnlTh | float | option theta pnl;=sum(srs.pnlTh) |
325 | pnlVe | float | option vega pnl;=sum(srs.pnlVe) |
328 | pnlVo | float | option volga pnl;=sum(srs.pnlVo) |
331 | pnlVa | float | option vanna pnl;=sum(srs.pnlVa) |
334 | pnlDDiv | float | option DDiv pnl;=sum(srs.pnlDDiv) |
337 | pnlSDiv | float | option SDiv pnl;=sum(srs.pnlSDiv) |
340 | pnlRate | float | option Rate pnl;=sum(srs.pnlRate) |
343 | pnlErr | float | option unexplained (error) pnl;=sum(srs.pnlErr) |
346 | pnlTe | float | option theo edge pnl;=sum(srs.pnlTe) |
349 | pnlLn | float | option pnl from symbol positions with +vega |
352 | pnlSh | float | option pnl from symbol positions with -vega |
355 | tEdge | float | aggregate option theo edge;=sum(srs.tEdge) |
358 | tEdgeMult | float | denominator for computing edge per unit;=sum(srs.tEdgeMult) |
361 | posTEdgePnl | float | aggregate pnl (positive edge symbols);=sum(srs.posTEdgePnl) |
364 | negTEdgePnl | float | aggregate pnl (negative edge symbols);=sum(srs.negTEdgePnl) |
367 | badTEdgePnl | float | aggregate pnl (no theo edge symbols);=sum(srs.badTEdgePnl) |
370 | VaRsu90 | float | Aggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * exp(+0.90)) |
373 | VaRsd90 | float | Aggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * exp(-0.90)) |
376 | VaRsu50 | float | Aggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * exp(+0.50)) |
379 | VaRsd50 | float | Aggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * exp(-0.50)) |
382 | VaRsu15 | float | Aggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * exp(+0.15)) |
385 | VaRsd15 | float | Aggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * exp(-0.15)) |
388 | VaRsu10 | float | Aggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10)) |
391 | VaRsd10 | float | Aggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10)) |
394 | VaRsu05 | float | Aggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * exp(+0.05)) |
397 | VaRsd05 | float | Aggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * exp(-0.05)) |
400 | VaRsu1e | float | Aggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out |
403 | VaRsd1e | float | Aggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out |
406 | VaRsu2e | float | Aggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out |
409 | VaRsd2e | float | Aggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out |
412 | VaRearn | float | Aggregate RiskSlide: vol earn ramp out (no uPrc move) |
415 | VaRcash | float | Aggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral) |
418 | hcCnt | float | count of haircut > $0.0 symbols |
421 | haircut25 | float | haircut ($25 minimum/cn) [act basis] |
424 | haircut37 | float | haircut ($37 minimum/cn) [act basis] |
427 | optCnMinimum | float | option contract margin minimum (37.50 for equities;SPAN minimum for options on futures) |
430 | span01 | float | span1: uPrc=unch, vol=up |
433 | span02 | float | span2: uPrc=unch, vol=down |
436 | span03 | float | span3: uPrc=+33.33%, vol=up |
439 | span04 | float | span4: uPrc=+33.33%, vol=dn |
442 | span05 | float | span5: uPrc=-33.33%, vol=up |
445 | span06 | float | span6: uPrc=-33.33%, vol=down |
448 | span07 | float | span7: uPrc=+66.67%, vol=up |
451 | span08 | float | span8: uPrc=+66.67%, vol=down |
454 | span09 | float | span9: uPrc=-66.67%, vol=up |
457 | span10 | float | span10: uPrc=-66.67%, vol=down |
460 | span11 | float | span11: uPrc=+100%, vol=up |
463 | span12 | float | span12: uPrc=+100%, vol=down |
466 | span13 | float | span13: uPrc=-100%, vol=up |
469 | span14 | float | span14: uPrc=-100%, vol=down |
472 | span15 | float | span15: uPrc=+300%; price slide * 0.33 |
475 | span16 | float | span16: uPrc=-300%, price slide * 0.33 |
478 | worst3Risk | float | sum of 3 worst 50% slide loss symbols |
481 | worstSym1 | TickerKey | symbol with the largest 50% slide loss |
484 | worstSym2 | TickerKey | symbol with the second largest 50% slide loss |
487 | worstSym3 | TickerKey | symbol with the third largest 50% slide loss |
490 | stkLiqRisk | float | estimated cost of neutralizing/liquidating all stock positions (half market width * position size) |
493 | futLiqRisk | float | estimated cost of neutralizing/liquidating all future positions (half market width * position size) |
496 | optLiqRisk | float | estimated cost of neutralizing/liquidating all option positions (half market width * position size) |
499 | srRiskMargin | float | SR assessed risk margin MAX(haircut37, worst3Risk + optCnMinimum) |
502 | lastActivity | DateTime | |
505 | 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 = 'AccountRiskRecordV5'
# 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=AccountRiskRecordV5'
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 = 'AccountRiskRecordV5'
# 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 = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|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=AccountRiskRecordV5' \
--data-urlencode 'view=lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|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 = 'AccountRiskRecordV5'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|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 = 'lnDDelta: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=AccountRiskRecordV5' \
--data-urlencode 'view=lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=lnDDelta: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 = 'AccountRiskRecordV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = ''
# 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=AccountRiskRecordV5' \
--data-urlencode 'measure=lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|lastActivity|timestamp' \
--data-urlencode 'group=' \
--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 = 'AccountRiskRecordV5'
# 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=AccountRiskRecordV5' \
--data-urlencode 'where=accnt:eq:ExampleString'