Schema: ProductRiskSummaryV5 (ID: 4815)
ProductRiskSummary records contain live risk aggregation of FutureRiskSummaryV5 records.
Records are published if/when positions change and about once per minute otherwise.
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | SystemData |
SRSE Product | SRRisk |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | ticker | TickerKey | |
11= | accnt | string(16) | |
12= | tradeDate | DateKey | |
13= | riskSession | enum : RiskSession | |
14= | clientFirm | string(16) | SR assigned client firm |
106 | lnDDelta | double | long net position delta value (today; SR marks ) |
109 | shDDelta | double | short net position delta value (today; SR marks ) |
112 | futMktValueMid | double | future position market value (today; SR mid marks) |
115 | optMktValueMid | double | option position market value (SR mid marks); =sum[opCurPosM * opr.optVolMark] |
118 | optMktValueVol | double | option position market value (SR vol marks); =sum[opCurPosM * opr.optMidMark] |
121 | fcAbsCurPos | int | abs number of future contracts (position + fills);=sum[abs(fpr.cnCurPos)] |
124 | fcAbsOpnClr | int | abs number of start of period future contracts (CLR view);=sum[abs(fpr.cnOpnClr)] |
127 | fcAbsOpnPrv | int | abs number of start of period future contracts (SR view);=sum[abs(fpr.cnOpnPrv)] |
130 | fcAbsOpnPos | int | abs number of start of period future contracts (effective);=sum[abs(fpr.cnOpnPos)] |
133 | fcAbsOpnBrk | int | abs number of future contract start of period breaks (CLR - PRV);=sum[abs(fpr.cnOpnClr - fpr.cnOpnPrv)] |
136 | fcNetCurPos | int | net future contract position;=sum[fpr.cnOpnClr + fpr.cnBot - fpr.cnSld] |
139 | fcBot | int | number of futures contracts bot today;=sum(frr.cnBot) |
142 | fcSld | int | number of futures contracts sld today;=sum(frr.cnSld) |
145 | fcBotHdg | int | number of contracts bot today from hedging (spdrSource=HedgeTool) |
148 | fcSldHdg | int | number of contracts sld today from hedging (spdrSource=HedgeTool) |
151 | fcBotTrh | int | number of contracts bot today from hedging (spdrSource=TradeHedge) |
154 | fcSldTrh | int | number of contracts sld today from hedging (spdrSource=TradeHedge) |
157 | fcBotOpn | int | number of contracts bot today from hedging (spdrSource=OpenHedge) |
160 | fcSldOpn | int | number of contracts sld today from hedging (spdrSource=OpenHedge) |
163 | fcBotTrd | int | number of contracts bot today from a trade hedging source (AutoHedge or Trades loop) |
166 | fcSldTrd | int | number of contracts sld today from a trade hedging source (AutoHedge or Trades loop) |
169 | fcMnyBot | double | futures money bot today |
172 | fcMnySld | double | futures money sld today |
175 | maxFutDttm | DateTime | DateTime of most recent SpdrFuturenExecution (if any) |
178 | fcPnlMid | float | Futures Open Pnl (SR marks); =sum[fpr.cnOpnClr * fpr.unitsPerCn * (fpr.futMark - fpr.futOpnMidMark] |
181 | fcPnlClr | float | Futures Open Pnl (CLR marks); =sum[fpr.cnOpnClr * fpr.unitsPerCn * (fpr.futMark - fpr.futOpnClrMark] |
184 | fcPnlDay | float | Futures Day Pnl;=sum(fpr.dayPnl) |
187 | opCnAbsCurPos | int | abs number of option contracts (position + fills);=sum[abs(opr.cnCurPos)] |
190 | opCnAbsOpnClr | int | abs number of start of period option contracts (CLR view); =sum[abs(opr.cnOpnClr)] |
193 | opCnAbsOpnPrv | int | abs number of start of period option contracts (SR view); =sum[abs(opr.cnOpnPrv)] |
196 | opCnAbsOpnPos | int | abs number of start of period option contracts; =sum[abs(opr.cnOpnPos)] |
199 | opCnAbsOpnBrk | int | abs number of option contract start of period breaks (CLR - PRV);=sum[abs(opr.cnOpnClr - opr.cnOpnPrv)] |
202 | opCnPosCall | int | net number of call contracts;=sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if call) |
205 | opCnPosPut | int | net number of call contracts;=sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if put) |
208 | opCnAbsPair | int | abs number of option contracts with CP reversals removed; =sum[abs(opr.cnOpnClr + opr.cnBot - opr.cnSld) - abs(opr.cnNetPos)] |
211 | opCnAbsAtmEquiv | float | abs atm equivalent contracts; = sum[abs(opr.cnOpnPos + opr.cnBot - opr.cnSld) * opr.ve / opr.atmVega] |
214 | opCnBot | int | number of option contracts bot today;=sum[opr.cnBot] |
217 | opCnSld | int | number of option contracts sld today;=sum[opr.cnSld] |
220 | opMnyBot | double | option money bot |
223 | opMnySld | double | option money sld |
226 | opPremBot | float | option premium bot today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnBot] |
229 | opPremSld | float | option premium sld today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnSld] |
232 | maxOptDttm | DateTime | DateTime of most recent SpdrOptionExecution (if any) |
235 | opPnlVol | double | Option Open Pnl (SR vol marks); =sum[opr.opnPnlVolMark] |
238 | opPnlMid | double | Option Open Pnl (SR mid marks); =sum[opr.opnPnlMidMark] |
241 | opPnlClr | double | Option Open Pnl (CLR marks); =sum[opr.opnPnlClrMark] |
244 | opPnlBrk | float | Option Mark Break (catch-up) Pnl (SR vol marks to CLR marks);=sum[(opr.cnOpnClr * opr.pointValue) * (opr.optVolMark - opr.optClrMark)] |
247 | opPnlDay | float | Option Day Pnl;=sum[opr.dayPnl] |
250 | opDnPnlDay | float | Option DN Day Pnl (delta neutral);=sum[opr.dnDayPnl] |
253 | opDayVega | float | option vega traded today |
256 | opDayWVega | float | option (vol weighted) vega traded today |
259 | opDayTVega | float | option (time weighted) vega traded today |
262 | opDayWtVega | float | option (vol time weighted) vega traded today |
265 | opDayTheta | float | Option Day Theta;=sum[opr.th * ((opr.cnBot - opr.cnSld) * opr.pointValue)] |
268 | opDayDelta | float | Option Day Delta;=sum[opr.de * ((opr.cnBot - opr.cnSld) * opr.underliersPerCn)] |
271 | opTrdDelta | float | Option Trade Delta (delta fixed at time of trade);=sum[opr.trdDelta] |
274 | contHedgePnl | float | Estimated continuous hedging pnl (open positions only) [~1 minute intervals] |
277 | contHedgePnl1 | float | Estimated continuous hedging pnl (open positions only) [~10 minute intervals] |
280 | opEdgeOpened | float | Option Edge Opened (new risk);=sum[opr.edgeOpened] |
283 | opEdgeClosed | float | Option Edge Closed (new risk);=sum[opr.edgeClosed] |
286 | pnlDn | float | Option Pnl Attr: delta neutral pnl: =sum[volPnl - shClrM * dUPrc * opr.dePr] |
289 | pnlDe | float | Option Pnl Attr: delta pnl;=sum[shClrM * dUPrc * opr.dePr] |
292 | pnlSl | float | Option Pnl Attr: slope pnl;=sum[shClrM * dUPrc * opr.vePr * opr.slPr] |
295 | pnlGa | float | Option Pnl Attr: gamma pnl;=sum[shClrM * 0.5 * dUPrc * dUPrc * (opr.ga + opr.gaPr)/2] |
298 | pnlTh | float | Option Pnl Attr: theta pnl;=sum[shClrM * dTime * -opr.thPr] |
301 | pnlVe | float | Option Pnl Attr: vega pnl;=sum[shClrM * 100 * dVol * opr.vePr] |
304 | pnlVo | float | Option Pnl Attr: volga pnl;=sum[shClrM * 0.5 * 100 * 100 * dVol * dVol * opr.voPr] |
307 | pnlVa | float | Option Pnl Attr: vanna pnl;=sum[shClrM * 100 * dVol * dUPrc * opr.vaPr] |
310 | pnlErr | float | Option Pnl Attr: error (unexplained) pnl;=sum[shClrM * (volPnl - pnlDe - pnlGa - pnlTh - pnlVe)] |
313 | pnlRate | float | Option Pnl Attr: rate pnl;=sum[shClrM * 100 * dRate * opr.rhPr] |
316 | pnlSDiv | float | Option Pnl Attr: sdiv pnl;=sum[shClrM * 100 * dSDiv * opr.phPr] |
319 | pnlDDiv | float | Option Pnl Attr: ddiv pnl;=sum[shClrM * 100 * (opr.ddiv - opr.ddivPr) / opr.uPrc * opr.phPr] |
322 | pnlTe | float | Option Pnl Attr: theo edge pnl;=sum[shClrM * ((opr.tOpx - opr.optVolMark) - (opr.tOpxPr - opr.optOpnVolMark))] |
325 | pctIvChange | float | Option Avg IVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.iVol/opr.iVolPr)] |
328 | pctIvVega | float | Option Avg IVol Change (Denominator);=sum[abs(shClrM) * opr.ve] |
331 | pctTvChange | float | Option Avg TVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.tVol/opr.tVolPr)] |
334 | pctTvVega | float | Option Avg TVol Change (Denominator);=sum[abs(shClrM) * opr.ve] |
337 | futWidthMny | float | Future Market Width Value;=sum[0.5 * abs(fcCurPosM) * (fpr.futAsk - fpr.futBid)] |
340 | optWidthMny | float | Option Market Width Value;=sum[0.5 * abs(shCurPosM) * (opr.optAsk - opr.optBid)] |
343 | dayDDelta | float | Day $Delta (bot or sld;all sources) today; |
346 | delta | float | Aggregate Position Delta;=sum[shCurPos] + sum[fcCurPosM] + sum[shCurPosM * opr.de] + sum[other.delta] |
349 | ddelta | float | Aggregate Position $Delta (Delta * DDMult) |
352 | deDecay | float | Aggregate Position DeltaDecay;=sum[shCurPosM * opr.deDecay] + sum[other.deDecay] |
355 | ddDecay | float | Aggregate Position delta when one trading day (1.0/252.0) is taken out of option pricing] |
358 | gamma | float | Aggregate Position Gamma;=sum[shCurPosM * opr.ga] + sum[other.gamma] |
361 | dGamma | float | Aggregate Position $Gamma |
364 | theta | float | Aggregate Position Theta;=sum[shCurPosM * opr.th] + sum[other.theta] |
367 | rho | float | Aggregate Position Rho;=sum[shCurPosM * opr.rh] + sum[other.rho] |
370 | vega | float | Aggregate Position Vega;=sum[shCurPosM * opr.ve] + sum[other.vega] |
373 | tVega | float | Aggregate Position Time Weight Vega;=sum[shCurPosM * opr.ve / sqrt(max(0.1, opr.years * 4))] |
376 | wVega | float | Aggregate Position Vol Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve] |
379 | wtVega | float | Aggregate Position Vol Time Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve / sqrt(max(0.1, opr.years * 4))] |
382 | ivolVe | float | Aggregate Position Avg Vol Numerator (vega weighted) (avg = ivolVe / avega);=sum[abs(shCurPosM) * opr.iVol * opr.ve] |
385 | volga | float | Aggregate Position Volga;=sum[shCurPosM * opr.vo] + sum[other.volga] |
388 | vanna | float | Aggregate Position Vanna;=sum[shCurPosM * opr.va] + sum[other.vanna] |
391 | slope | float | Aggregate Position VegaDelta (uPrc/Vol correlation factor);=sum[shCurPosM * opr.sl * opr.ve] + sum[other.slope] |
394 | avega | float | Aggregate Postion Abs Vega;=sum[abs(shCurPosM ) * opr.ve] |
397 | atheta | float | Aggregate Postion Abs Theta;= sum[abs(shCurPosM) * opr.th] |
400 | hedgeGamma | float | Aggregate Postion Hedge Gamma (either iVol or tVol based;can go binary);=sum[shCurPos * opr.hedgeGa] |
403 | hedgeDGamma | float | Aggregate Postion Hedge $Gamma |
406 | premOvPar | float | Aggregate Position Premium Over Parity;=sum[shCurPosM * max(0, opr.optVolMark - opr.loBound)] |
409 | wtVeDd | float | Aggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30 |
412 | wtVeDn | float | Aggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10 |
415 | wtVeAt | float | Aggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10 |
418 | wtVeUp | float | Aggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30 |
421 | wtVeDu | float | Aggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde |
424 | wtVeM1 | float | Aggregate M1 Time Weighted Vega; =sum[wtVega] if days < 10 |
427 | wtVeM2 | float | Aggregate M2 Time Weighted Vega; =sum[wtVega] if 10 < days < 25 |
430 | wtVeM3 | float | Aggregate M3 Time Weighted Vega; =sum[wtVega] if 25 < days < 65 |
433 | wtVeM4 | float | Aggregate M4 Time Weighted Vega; =sum[wtVega] if 65 < days < 130 |
436 | wtVeM5 | float | Aggregate M5 Time Weighted Vega; =sum[wtVega] if 130 < days |
439 | opnDelta | float | Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) |
442 | opnDDelta | float | Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) |
445 | posDelta | float | Aggregate Position Hedge Delta (Current Position) |
448 | posDDelta | float | Aggregate Position Hedge Delta (Current Position) |
581 | pinXX | float | Pin Strike nearest to current uPrc (zero = none) (only exists near expirations) |
582 | opnDeBelow | float | Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX |
583 | opnDeAbove | float | Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX |
584 | opnDDeBelow | float | Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX |
585 | opnDDeAbove | float | Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX |
586 | posDeBelow | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc < pinXX |
587 | posDeAbove | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc > pinXX |
588 | posDDeBelow | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc < pinXX |
589 | posDDeAbove | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc > pinXX |
451 | posHedgeDeltaEx | float | Aggregate Position Hedge Delta (Current Position) if exDate != today |
454 | posHedgeDDeltaEx | float | Aggregate Position ($) Hedge Delta (Current Position) if exDate != today |
457 | tEdge | float | Aggregate $ Theo Edge;=sum[shNetPosM * (opr.tOpx - opr.optVolMark)] if opr.tVol > 0.01 and opr.tOpx > 0.0 and opr.optVolMark > 0.0 |
460 | tEdgeMult | float | Aggregate Abs Net Contracts (Rev/Conv contracts removed);= sum[abs(shNetPosM)] |
463 | tEdgePr | float | Prior Day $ Theo Edge |
466 | tEdgeMultPr | float | Prior Day Aggregate Abs Net Contracts |
469 | numTVolErrors | short | number of opr.tErr != 0 or opr.tVol < 0.01 |
472 | pairPnl | float | Aggregate Dn Pair Pnl;=sum[shNetClrM * (opr.optVolMark - opr.optOpnVolMark - opr.hedgeDePr * (opr.uMark - opr.uOpnMark))] |
475 | posTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) >= 0) |
478 | negTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) < 0) |
481 | badTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx = 0) |
484 | posTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) >= 0) |
487 | negTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) < 0) |
490 | badTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr = 0) |
493 | span01 | float | span1: uPrc=unch, vol=up |
496 | span02 | float | span2: uPrc=unch, vol=down |
499 | span03 | float | span3: uPrc=+33.33%, vol=up |
502 | span04 | float | span4: uPrc=+33.33%, vol=dn |
505 | span05 | float | span5: uPrc=-33.33%, vol=up |
508 | span06 | float | span6: uPrc=-33.33%, vol=down |
511 | span07 | float | span7: uPrc=+66.67%, vol=up |
514 | span08 | float | span8: uPrc=+66.67%, vol=down |
517 | span09 | float | span9: uPrc=-66.67%, vol=up |
520 | span10 | float | span10: uPrc=-66.67%, vol=down |
523 | span11 | float | span11: uPrc=+100%, vol=up |
526 | span12 | float | span12: uPrc=+100%, vol=down |
529 | span13 | float | span13: uPrc=-100%, vol=up |
532 | span14 | float | span14: uPrc=-100%, vol=down |
535 | span15 | float | span15: uPrc=+300%; price slide * 0.33 |
538 | span16 | float | span16: uPrc=-300%, price slide * 0.33 |
541 | futLiqRisk | float | Aggregate Future Liquidation Risk |
544 | optLiqRisk | float | Aggregate Option Liquidation Risk |
547 | fcBotC0 | int | hypothetical future contracts bot (~ 1 minute intervals) |
550 | fcSldC0 | int | hypothetical future contracts sld |
553 | fcMnyC0 | float | hypothetical money |
556 | fcBotC1 | int | hypothetical future contracts bot (~ 10 minute intervals) |
559 | fcSldC1 | int | hypothetical future contracts sld |
562 | fcMnyC1 | float | hypothetical money |
565 | futMargin | float | Aggregate Future Risk Margin |
568 | numFutErrors | byte | number of futures positions with a computation error (should be zero) |
571 | numOptErrors | byte | number of options positions with a computation error (should be zero) |
574 | futMarkFlag | flag : MktErrFlag | Future position error flag |
577 | optMarkFlag | flag : MktErrFlag | Option position error flag |
580 | 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 = 'ProductRiskSummaryV5'
# 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=ProductRiskSummaryV5'
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 = 'ProductRiskSummaryV5'
# 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|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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=ProductRiskSummaryV5' \
--data-urlencode 'view=lnDDelta|shDDelta|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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 = 'ProductRiskSummaryV5'
# 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|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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=ProductRiskSummaryV5' \
--data-urlencode 'view=lnDDelta|shDDelta|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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 = 'ProductRiskSummaryV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'lnDDelta|shDDelta|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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=ProductRiskSummaryV5' \
--data-urlencode 'measure=lnDDelta|shDDelta|futMktValueMid|optMktValueMid|optMktValueVol|fcAbsCurPos|fcAbsOpnClr|fcAbsOpnPrv|fcAbsOpnPos|fcAbsOpnBrk|fcNetCurPos|fcBot|fcSld|fcBotHdg|fcSldHdg|fcBotTrh|fcSldTrh|fcBotOpn|fcSldOpn|fcBotTrd|fcSldTrd|fcMnyBot|fcMnySld|maxFutDttm|fcPnlMid|fcPnlClr|fcPnlDay|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opCnPosCall|opCnPosPut|opCnAbsPair|opCnAbsAtmEquiv|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|futWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|opnDelta|opnDDelta|posDelta|posDDelta|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|pairPnl|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|futLiqRisk|optLiqRisk|fcBotC0|fcSldC0|fcMnyC0|fcBotC1|fcSldC1|fcMnyC1|futMargin|numFutErrors|numOptErrors|futMarkFlag|optMarkFlag|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 = 'ProductRiskSummaryV5'
# 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=ProductRiskSummaryV5' \
--data-urlencode 'where=accnt:eq:ExampleString'