Schema: SymbolRiskSummaryV5 (ID: 4865)
SymbolRiskSummary records contain live symbol level risk aggregation of StockPositionRecord and OptionPositionRecord values.
Records are published by AggRiskServers if/when positions change and about once per minute otherwise.
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= | ticker | TickerKey | stock ticker (eg MSFT, SPY) |
11= | accnt | string(16) | SRAccnt (SR assigned;up to 16 chars) |
12= | tradeDate | DateKey | |
13= | riskSession | enum : RiskSession | |
14= | clientFirm | string(16) | SR assigned client firm |
106 | sector | string(16) | SymbolControl.sector: user defined sector code |
109 | industry | int | industry code [00000000] |
112 | beta | float | beta (usually beta to SPX; see AccountConfig.betaSource) |
115 | betaSource | enum : BetaSource | |
118 | uPrc | double | current live underlier price (can be from risk server, tool server, or srse server) |
121 | uMark | double | current underlier price [as of risk server record publish] [freezes at 4pm EST] |
124 | uOpnMark | double | start-of-day SR underlier mark (rotated from prior day record) [corp action adjusted] |
127 | lnDDelta | double | long net position delta value (today; SR marks ) |
130 | shDDelta | double | short net position delta value (today; SR marks ) |
133 | lnStkMktValueMid | double | long stock market value (today; SR marks) |
136 | shStkMktValueMid | double | short stock market value (today; SR marks) |
139 | optMktValueMid | double | option position market value (SR mid marks);=sum[opCurPosM * opr.optVolMark] |
142 | optMktValueVol | double | option position market value (SR vol marks);=sum[opCurPosM * opr.optMidMark] |
145 | shOpnPosClr | int | start of period position (from custodian or clearing firm) |
148 | shOpnPosPrv | int | start of period position (expected;from SpiderRock archive) |
151 | shOpnPos | int | start of period position (effective;from either SR or CLR record) |
154 | shBot | int | number of shares bot today |
157 | shSld | int | number of shares sld today |
160 | shSldShrt | int | number of shares sld short today |
163 | shMnyBot | double | shares money bot today |
166 | shMnySld | double | shares money sld today |
169 | shBotHdg | int | number of shares bot today from open pos hedging (spdrSource=HedgeTool) |
172 | shSldHdg | int | number of shares sld today from open pos hedging (spdrSource=HedgeTool) |
175 | shBotTrh | int | number of shares bot today from open pos hedging (spdrSource=TradeHedge) |
178 | shSldTrh | int | number of shares sld today from open pos hedging (spdrSource=TradeHedge) |
181 | shBotOpn | int | number of shares bot today from open pos hedging (spdrSource=OpenHedge) |
184 | shSldOpn | int | number of shares sld today from open pos hedging (spdrSource=OpenHedge) |
187 | shBotTrd | int | number of shares bot today from a trade hedging source (AutoHedge or Trades loop) |
190 | shSldTrd | int | number of shares sld today from a trade hedging source (AutoHedge or Trades loop) |
193 | maxStkDttm | DateTime | most recent timestamp of a qualifying stock execution (used to ensure risk record integrity) |
196 | stPnlMid | double | Stock Pnl (SR Marks);=(nbbo.mid - stPrvPrc) * shOpnClr |
199 | stPnlClr | double | Stock Pnl (CLR Marks);=(nbbo.mid - stClrPrc) * shOpnClr |
202 | stPnlDay | double | Net Stock Day Pnl;=sum[ (nbbo.min - fillPrice) * fillQuantity * side ] |
205 | stDivPnl | double | total cash paid/collected since prior period for this position (stock dividend value) |
208 | stBorrowPnl | double | total cash paid/collected since prior period for this position (borrow pnl; usually interest on HTB names) |
211 | opCnAbsCurPos | int | abs number of option contracts (position + fills);=sum[abs(opr.cnCurPos)] |
214 | opCnAbsOpnClr | int | abs number of start of period option contracts (CLR view); =sum[abs(opr.cnOpnClr)] |
217 | opCnAbsOpnPrv | int | abs number of start of period option contracts (SR view); =sum[abs(opr.cnOpnPrv)] |
220 | opCnAbsOpnPos | int | abs number of start of period option contracts; =sum[abs(opr.cnOpnPos)] |
223 | opCnAbsOpnBrk | int | abs number of option contract start of period breaks (CLR - PRV);=sum[abs(opr.cnOpnClr - opr.cnOpnPrv)] |
226 | opShShort | int | equivalent shares from short option positions |
229 | opCnPosCall | int | net number of call contracts; =sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if call) |
232 | opCnPosPut | int | net number of call contracts; =sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if put) |
235 | opCnAbsPair | int | abs number of option contracts with CP reversals removed;=sum[abs(opr.cnOpnClr + opr.cnBot - opr.cnSld) - abs(opr.cnNetPos)] |
238 | absAtmEquivCn | float | abs atm equivalent contracts; = sum[abs(opr.cnOpnPos + opr.cnBot - opr.cnSld) * opr.ve / opr.atmVega] |
241 | opCnBot | int | number of option contracts bot today;=sum[opr.cnBot] |
244 | opCnSld | int | number of option contracts sld today;=sum[opr.cnSld] |
247 | opMnyBot | double | option money bot |
250 | opMnySld | double | option money sld |
253 | opPremBot | float | option premium bot today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnBot] |
256 | opPremSld | float | option premium sld today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnSld] |
259 | maxOptDttm | DateTime | DateTime of most recent SpdrOptionExecution (if any) |
262 | opPnlVol | double | Option Open Pnl (SR vol marks); =sum[opr.opnPnlVolMark] |
265 | opPnlMid | double | Option Open Pnl (SR mid marks); =sum[opr.opnPnlMidMark] |
268 | opPnlClr | double | Option Open Pnl (CLR marks); =sum[opr.opnPnlClrMark] |
271 | opPnlBrk | double | Option Mark Break Pnl (SR vol marks to CLR marks);=sum[(opr.cnOpnClr * opr.pointValue) * (opr.optVolMark - opr.optMidMark)] |
274 | opPnlDay | double | Option Day Pnl;=sum[opr.dayPnl] |
277 | opDnPnlDay | double | Option DN Day Pnl (delta neutral);=sum[opr.dnDayPnl] |
280 | opDayVega | float | Option Day Vega;=sum[opr.ve * (opr.cnBot - opr.cnSld) * opr.pointValue] |
283 | opDayWVega | float | Option Day Vol Weighted Vega;=sum[opr.ve * opr.iVol * (opr.cnBot - opr.cnSld) * opr.pointvalue] |
286 | opDayTVega | float | Option Day Time-Weighted Vega;=sum[opr.ve * / sqrt(max(0.1, opr.years * 4)) * (opr.cnBot - opr.cnSld) * opr.pointValue] |
289 | opDayWtVega | float | Option Day Vol Time-Weighted Vega;=sum[opr.ve * (opr.iVol / sqrt(max(0.1, opr.years * 4))) * (opr.cnBot - opr.cnSld) * opr.pointValue] |
292 | opDayTheta | float | Option Day Theta;=sum[opr.th * ((opr.cnBot - opr.cnSld) * opr.pointValue)] |
295 | opDayDelta | float | Option Day Delta;=sum[opr.de * ((opr.cnBot - opr.cnSld) * opr.underliersPerCn)] |
298 | opTrdDelta | float | Option Trade Delta (delta fixed at time of trade);=sum[opr.trdDelta] |
301 | pairPnl | float | Aggregate Dn Pair Pnl;=sum[shNetClrM * (opr.optVolMark - opr.optOpnVolMark - opr.hedgeDePr * (opr.uMark - opr.uOpnMark))] |
304 | contHedgePnl | float | Estimated continuous hedging pnl (open positions only) [~1 minute intervals] |
307 | contHedgePnl1 | float | Estimated continuous hedging pnl (open positions only) [~10 minute intervals] |
310 | opEdgeOpened | float | Option Edge Opened (new risk);=sum[opr.edgeOpened] |
313 | opEdgeClosed | float | Option Edge Closed (new risk);=sum[opr.edgeClosed] |
316 | pnlDn | float | Option Pnl Attr: delta neutral pnl: =sum[volPnl - shClrM * dUPrc * opr.dePr] |
319 | pnlDe | float | Option Pnl Attr: delta pnl;=sum[shClrM * dUPrc * opr.dePr] |
322 | pnlSl | float | Option Pnl Attr: slope pnl;=sum[shClrM * dUPrc * opr.vePr * opr.veSlopePr] |
325 | pnlGa | float | Option Pnl Attr: gamma pnl;=sum[shClrM * 0.5 * dUPrc * dUPrc * (opr.ga + opr.gaPr)/2] |
328 | pnlTh | float | Option Pnl Attr: theta pnl;=sum[shClrM * dTime * -opr.thPr] |
331 | pnlVe | float | Option Pnl Attr: vega pnl;=sum[shClrM * 100 * dVol * opr.vePr] |
334 | pnlVo | float | Option Pnl Attr: volga pnl;=sum[shClrM * 0.5 * 100 * 100 * dVol * dVol * opr.voPr] |
337 | pnlVa | float | Option Pnl Attr: vanna pnl;=sum[shClrM * 100 * dVol * dUPrc * opr.vaPr] |
340 | pnlErr | float | Option Pnl Attr: error (unexplained) pnl;=sum[shClrM * (volPnl - pnlDe - pnlGa - pnlTh - pnlVe)] |
343 | pnlRate | float | Option Pnl Attr: rate pnl;=sum[shClrM * 100 * dRate * opr.rhPr] |
346 | pnlSDiv | float | Option Pnl Attr: sdiv pnl;=sum[shClrM * 100 * dSDiv * opr.phPr] |
349 | pnlDDiv | float | Option Pnl Attr: ddiv pnl;=sum[shClrM * 100 * (opr.ddiv - opr.ddivPr) / opr.uPrc * opr.phPr] |
352 | pnlTe | float | Option Pnl Attr: theo edge pnl;=sum[shClrM * ((opr.tOpx - opr.optVolMark) - (opr.tOpxPr - opr.optOpnVolMark))] |
355 | pctIvChange | float | Option Avg IVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.iVol/opr.iVolPr)] |
358 | pctIvVega | float | Option Avg IVol Change (Denominator);=sum[abs(shClrM) * opr.ve] |
361 | pctTvChange | float | Option Avg TVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.tVol/opr.tVolPr)] |
364 | pctTvVega | float | Option Avg TVol Change (Denominator);=sum[abs(shClrM) * opr.ve] |
367 | stkWidthMny | float | Stock Market Width Value;=sum[0.5 * abs(shCurPos) * (spr.stkAsk - spr.stkBid)] |
370 | optWidthMny | float | Option Market Width Value;=sum[0.5 * abs(shCurPosM) * (opr.optAsk - opr.optBid)] |
373 | dayDDelta | float | Day $Delta (bot or sld;all sources) today; |
376 | delta | float | Aggregate Position Delta;=sum[shCurPos] + sum[fcCurPosM] + sum[shCurPosM * opr.de] + sum[other.delta] |
379 | ddelta | float | Aggregate Position $Delta (Delta * DDMult) |
382 | deDecay | float | Aggregate Position DeltaDecay;=sum[shCurPosM * opr.deDecay] + sum[other.deDecay] |
385 | ddDecay | float | Aggregate Position delta when one trading day (1.0/252.0) is taken out of option pricing] |
388 | gamma | float | Aggregate Position Gamma;=sum[shCurPosM * opr.ga] + sum[other.gamma] |
391 | dGamma | float | Aggregate Position $Gamma |
394 | theta | float | Aggregate Position Theta;=sum[shCurPosM * opr.th] + sum[other.theta] |
397 | rho | float | Aggregate Position Rho;=sum[shCurPosM * opr.rh] + sum[other.rho] |
400 | vega | float | Aggregate Position Vega;=sum[shCurPosM * opr.ve] + sum[other.vega] |
403 | tVega | float | Aggregate Position Time Weight Vega;=sum[shCurPosM * opr.ve / sqrt(max(0.1, opr.years * 4))] |
406 | wVega | float | Aggregate Position Vol Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve] |
409 | wtVega | float | Aggregate Position Vol Time Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve / sqrt(max(0.1, opr.years * 4))] |
412 | ivolVe | float | Aggregate Position Avg Vol Numerator (vega weighted) (avg = ivolVe / avega); =sum[abs(shCurPosM) * opr.iVol * opr.ve] |
415 | volga | float | Aggregate Position Volga;=sum[shCurPosM * opr.vo] + sum[other.volga] |
418 | vanna | float | Aggregate Position Vanna;=sum[shCurPosM * opr.va] + sum[other.vanna] |
421 | slope | float | Aggregate Position VegaDelta (uPrc/Vol correlation factor);=sum[shCurPosM * opr.sl * opr.ve] + sum[other.slope] |
424 | avega | float | Aggregate Postion Abs Vega;=sum[abs(shCurPosM ) * opr.ve] |
427 | atheta | float | Aggregate Postion Abs Theta;= sum[abs(shCurPosM) * opr.th] |
430 | hedgeGamma | float | Aggregate Postion Hedge Gamma (either iVol or tVol based;can go binary);=sum[shCurPos * opr.hedgeGa] |
433 | hedgeDGamma | float | Aggregate Postion ($) Hedge Gamma |
436 | premOvPar | float | Aggregate Position Premium Over Parity;=sum[shCurPosM * max(0, opr.optVolMark - opr.loBound)] |
439 | simpPremOvPar | float | Aggregate Position Premium Over Parity Simple;=sum[shCurPosM * max(0, opr.opxMidMark - max(0, ±(strike - uprc)))] |
442 | wtVeDd | float | Aggregate Dd Time Weighted Vega; =sum[wtVega] if opr.xde < -0.30 |
445 | wtVeDn | float | Aggregate Dn Time Weighted Vega; =sum[wtVega] if -0.30 <= opr.xde < -0.10 |
448 | wtVeAt | float | Aggregate At Time Weighted Vega; =sum[wtVega] if abs(opr.xde) <= 0.10 |
451 | wtVeUp | float | Aggregate Up Time Weighted Vega; =sum[wtVega] if +0.10 < opr.xde <= +0.30 |
454 | wtVeDu | float | Aggregate Du Time Weighted Vega; =sum[wtVega] if +0.30 < opr.xde |
457 | wtVeM1 | float | Aggregate M1 Time Weighted Vega; =sum[wtVega] if days < 10 |
460 | wtVeM2 | float | Aggregate M2 Time Weighted Vega; =sum[wtVega] if 10 < days < 25 |
463 | wtVeM3 | float | Aggregate M3 Time Weighted Vega; =sum[wtVega] if 25 < days < 65 |
466 | wtVeM4 | float | Aggregate M4 Time Weighted Vega; =sum[wtVega] if 65 < days < 130 |
469 | wtVeM5 | float | Aggregate M5 Time Weighted Vega; =sum[wtVega] if 130 < days |
472 | pinXX | float | pin strike nearest to current uPrc (zero = none) (only exists if there are near ATM option positions expiring today) |
475 | opnDeBelow | float | Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX |
478 | opnDeAbove | float | Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX |
481 | opnDDeBelow | float | Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX |
484 | opnDDeAbove | float | Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX |
487 | posDeBelow | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc < pinXX |
490 | posDeAbove | float | Aggregate Position Hedge Delta (Current Position) if liveUPrc > pinXX |
493 | posDDeBelow | float | Aggregate Position ($) Hedge Delta (Current Position) if liveUPrc < pinXX |
496 | posDDeAbove | float | Aggregate Position ($) Hedge Delta (Current Position) if liveUPrc > pinXX |
499 | posHedgeDeltaEx | float | Aggregate Position Hedge Delta (Current Position) if exDate != today |
502 | posHedgeDDeltaEx | float | Aggregate Position ($) Hedge Delta (Current Position) if exDate != today |
505 | mmhDelta | float | Aggregate Delta allocated from other symbols (multi-multihedge symbols) |
508 | mmhContracts | int | Aggregate Contracts allocated from other symbols (multi-multihedge symbols) |
511 | mmhSources | text1 | Allocation source string (usually mmh contracts) |
514 | 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 |
517 | tEdgeMult | float | Aggregate Abs Net Contracts (Rev/Conv contracts removed);= sum[abs(shNetPosM)] |
520 | tEdgePr | float | Prior Day $ Theo Edge |
523 | tEdgeMultPr | float | Prior Day Aggregate Abs Net Contracts |
526 | numTVolErrors | short | number of opr.tErr != 0 or opr.tVol < 0.01 |
529 | posTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) >= 0) |
532 | negTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) < 0) |
535 | badTEdgeWV | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx = 0) |
538 | posTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) >= 0) |
541 | negTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) < 0) |
544 | badTEdgePnl | float | Aggregate Dn Pair Pnl where (opr.tOpxPr = 0) |
547 | tEdge2 | 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 |
550 | tEdgeMult2 | float | Aggregate Abs Net Contracts (Rev/Conv contracts removed);= sum[abs(shNetPosM)] |
553 | tEdgePr2 | float | Prior Day $ Theo Edge |
556 | tEdgeMultPr2 | float | Prior Day Aggregate Abs Net Contracts |
559 | numTVolErrors2 | short | number of opr.tErr != 0 or opr.tVol < 0.01 |
562 | posTEdgeWV2 | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) >= 0) |
565 | negTEdgeWV2 | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) < 0) |
568 | badTEdgeWV2 | float | Aggregate Vol Weighted Vega (wvega) where (opr.tOpx = 0) |
571 | posTEdgePnl2 | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) >= 0) |
574 | negTEdgePnl2 | float | Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) < 0) |
577 | badTEdgePnl2 | float | Aggregate Dn Pair Pnl where (opr.tOpxPr = 0) |
580 | VaRsu90 | float | Aggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.90)) |
583 | VaRsd90 | float | Aggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.90)) |
586 | VaRsu50 | float | Aggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.50)) |
589 | VaRsd50 | float | Aggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.50)) |
592 | VaRsu15 | float | Aggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.15)) |
595 | VaRsd15 | float | Aggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.15)) |
598 | VaRsu10 | float | Aggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10)) |
601 | VaRsd10 | float | Aggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10)) |
604 | VaRsu06 | float | Aggregate RiskSlide: uPrc up 6%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.06)) |
607 | VaRsd08 | float | Aggregate RiskSlide: uPrc dn 8%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.08)) |
610 | VaRsu05 | float | Aggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.05)) |
613 | VaRsd05 | float | Aggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.05)) |
616 | VaRsu1e | float | Aggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out |
619 | VaRsd1e | float | Aggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out |
622 | VaRsu2e | float | Aggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out |
625 | VaRsd2e | float | Aggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out |
628 | VaRearn | float | Aggregate RiskSlide: vol earn ramp out (no uPrc move) |
631 | VaRcash | float | Aggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral) |
698 | marginUDnVDn | float | Aggregate RiskSlide: uPrc dn, vol dn |
699 | marginUDnVUp | float | Aggregate RiskSlide: uPrc dn, vol up |
700 | marginUUpVDn | float | Aggregate RiskSlide: uPrc up, vol dn |
701 | marginUUpVUp | float | Aggregate RiskSlide: uPrc up, vol up |
634 | stkLiqRisk | float | Aggregate Equity Liquidation Risk |
637 | optLiqRisk | float | Aggregate Option Liquidation Risk |
640 | shBotC0 | int | hypothetical shares bot (~1 minute intervals) |
643 | shSldC0 | int | hypothetical shares sld |
646 | shMnyC0 | float | hypothetical money |
649 | shBotC1 | int | hypothetical shares bot (~10 minute intervals) |
652 | shSldC1 | int | hypothetical shares sld |
655 | shMnyC1 | float | hypothetical money |
658 | opHcMin25 | float | sum(option haircut minimum) [$25.00/cn] |
661 | opHcMin37 | float | sum(option haircut minimum) [$37.50/cn] |
664 | haircut25 | float | Aggregate Risk Margin (JBO): [$25 minimum;-15/+15 uPrc slides] |
667 | haircut37 | float | Aggregate Risk Margin (PM): [$37.50 minimum;-8/+6 uPrc slides (broad based);-15/+15 uPrc slides (non-broad based)] |
670 | numStkErrors | byte | number of stock positions with a computation error (should be zero) |
673 | numOptErrors | byte | number of options positions with a computation error (should be zero) |
676 | updateSource | enum : R5Source | |
679 | stkMarkFlag | flag : MktErrFlag | Stock position error flag |
682 | optMarkFlag | flag : MktErrFlag | Option position error flag |
685 | riskAlert1 | enum : AlertCode | Risk Alert Code: Early Exercise, etc. |
688 | riskAlert2 | enum : AlertCode | Risk Alert Code: Early Exercise, etc. |
691 | riskAlert3 | enum : AlertCode | Risk Alert Code: Early Exercise, etc. |
694 | riskAlert4 | enum : AlertCode | Risk Alert Code: Early Exercise, etc. |
697 | 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 = 'SymbolRiskSummaryV5'
# 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=SymbolRiskSummaryV5'
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 = 'SymbolRiskSummaryV5'
# 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 = 'sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|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=SymbolRiskSummaryV5' \
--data-urlencode 'view=sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|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 = 'SymbolRiskSummaryV5'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|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 = 'sector: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=SymbolRiskSummaryV5' \
--data-urlencode 'view=sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=sector: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 = 'SymbolRiskSummaryV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'betaSource|updateSource|riskAlert1|riskAlert2|riskAlert3|riskAlert4'
# 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=SymbolRiskSummaryV5' \
--data-urlencode 'measure=sector|industry|beta|betaSource|uPrc|uMark|uOpnMark|lnDDelta|shDDelta|lnStkMktValueMid|shStkMktValueMid|optMktValueMid|optMktValueVol|shOpnPosClr|shOpnPosPrv|shOpnPos|shBot|shSld|shSldShrt|shMnyBot|shMnySld|shBotHdg|shSldHdg|shBotTrh|shSldTrh|shBotOpn|shSldOpn|shBotTrd|shSldTrd|maxStkDttm|stPnlMid|stPnlClr|stPnlDay|stDivPnl|stBorrowPnl|opCnAbsCurPos|opCnAbsOpnClr|opCnAbsOpnPrv|opCnAbsOpnPos|opCnAbsOpnBrk|opShShort|opCnPosCall|opCnPosPut|opCnAbsPair|absAtmEquivCn|opCnBot|opCnSld|opMnyBot|opMnySld|opPremBot|opPremSld|maxOptDttm|opPnlVol|opPnlMid|opPnlClr|opPnlBrk|opPnlDay|opDnPnlDay|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opDayDelta|opTrdDelta|pairPnl|contHedgePnl|contHedgePnl1|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlErr|pnlRate|pnlSDiv|pnlDDiv|pnlTe|pctIvChange|pctIvVega|pctTvChange|pctTvVega|stkWidthMny|optWidthMny|dayDDelta|delta|ddelta|deDecay|ddDecay|gamma|dGamma|theta|rho|vega|tVega|wVega|wtVega|ivolVe|volga|vanna|slope|avega|atheta|hedgeGamma|hedgeDGamma|premOvPar|simpPremOvPar|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|pinXX|opnDeBelow|opnDeAbove|opnDDeBelow|opnDDeAbove|posDeBelow|posDeAbove|posDDeBelow|posDDeAbove|posHedgeDeltaEx|posHedgeDDeltaEx|mmhDelta|mmhContracts|mmhSources|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|numTVolErrors|posTEdgeWV|negTEdgeWV|badTEdgeWV|posTEdgePnl|negTEdgePnl|badTEdgePnl|tEdge2|tEdgeMult2|tEdgePr2|tEdgeMultPr2|numTVolErrors2|posTEdgeWV2|negTEdgeWV2|badTEdgeWV2|posTEdgePnl2|negTEdgePnl2|badTEdgePnl2|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu06|VaRsd08|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|stkLiqRisk|optLiqRisk|shBotC0|shSldC0|shMnyC0|shBotC1|shSldC1|shMnyC1|opHcMin25|opHcMin37|haircut25|haircut37|numStkErrors|numOptErrors|updateSource|stkMarkFlag|optMarkFlag|riskAlert1|riskAlert2|riskAlert3|riskAlert4|timestamp' \
--data-urlencode 'group=betaSource|updateSource|riskAlert1|riskAlert2|riskAlert3|riskAlert4' \
--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 = 'SymbolRiskSummaryV5'
# 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=SymbolRiskSummaryV5' \
--data-urlencode 'where=accnt:eq:ExampleString'