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