Skip to main content
Version: Upcoming

Schema: SpdrParentExecutionV2 (ID: 4086)

SpdrParentExecution records are published every time a parent order execution is received. They also update as additional post execution mark information is available at F+1m and F+10m.

METADATA

AttributeValue
Topic3985-parent-orders
MLink TokenClientTrading
SRSE ProductSRTrade

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeDefault ValueComment
10=fillNumberlongSpiderRock execution number (globally unique over trailing 10 days)
100sysRealmenum : SysRealm
103sysEnvironmentenum : SysEnvironment
106runStatusenum : RunStatus
109versionbyterecord version number;starts at zero and goes up every time an execution record is re-published (eg, bust, +1m marks, +10m marks, etc)
112routingCodetext1SpiderRock market routing code
115execStatusenum : ExecStatusSpiderRock execution status (Fill,Bust,Correct,Reject,SysRej)
118execShapeenum : ExecShape
121origExecIDtext1original execution ID string (child order)
124lastExecIDtext1most recent execution ID (same as origExecID unless CANCEL/CORRECTION has been processed)
127remoteTexttext1text comment from remote endpoint (if any)
130integrityErrortext1line integrity error (if any) on this execution
133parentNumberlongSR parent number
136parentVersionshortSPDR order instance number (1 = original order; 2 = 1st cancel/replace, etc)
139baseParentNumberlongSPDR order number (initial number in cancel/replace sequence) (also, source parent for dynamically generated orders;eg auto-hedges)
142clOrdIdlongSR child order clOrdID resulting in fill
145streetClOrdIdstring(24)street side clOrdId (clOrdId or equivalent of the street side order) [SR/street gateway generated]
148streetOrderIdstring(24)street side orderId (orderId or equivalent of the street side order) [from street side execReport]
151crossClOrdIdlong
154faceSideClOrdIdlongCross Side ClOrdId. From ChildOrder.custClOrdId, or ChildOrder.FaceSideList.alloclOrdID
157reviewClOrdIdstring(24)review session clOrdId (usually from inbound review FIX session)
160altFillIdlongalternate fill ID (usually from AwayTktGateway.pkey.clientFillID)
163altOrderIdstring(24)alternate order ID (usually clOrdId from client)
166altCrossIdstring(24)
169altLegRefIdstring(24)
172altAccntstring(32)alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings]
175altUserNamestring(24)alternate (client assigned) user name (optional) [used to map between client and SR account strings]
178srcRoutingCodetext1inbound FIX routing code, if any
181riskGroupIdlongriskGroupId (parent order group ID) for this execution report
184triggerGroupIdlongWaitTrigger group Id
187triggerTimestamplongWaitTrigger trigger timestamp (nanoseconds since epoch)
190packageIdlongSR package Id
193parentShapeenum : SpdrOrderShapeshape of originating parent order
196tickerTickerKeybase stock key (used for symbol risk aggregation)
199secKeyOptionKeyexecution security key
202secTypeenum : SpdrKeyTypeexecution security type [Stock, Future, Option]
205accntstring(16)SpiderRock trading accnt [broker pkey]
208clientFirmstring(16)SR client firm
211orderSideenum : BuySellorder side
214spdrSourceenum : SpdrSourceSpiderRock parent order source code [broker pkey]
217groupingCodelongSpiderRock parent broker number [broker pkey]
220engineNamestring(32)SpiderRock execution engine that handled the parent order
223gatewayNamestring(20)StreetGateway server than handled the child order (if any)
226execRoleenum : ExecRoleSpiderRock relationship to this execution record
229execBrkrCodestring(16)SR Assigned executing broker code
232execBrkrMPIDstring(8)FINRA/Assigned exec broker MPID (if any)
235userNamestring(24)user name associated with the parent order
238strategyAccntstring(16)SR strategy account (optional; copied from parent order)
241coreClientFirmstring(16)
244sponsorClientFirmstring(16)
247fillTransactDttmDateTimetransaction date/time as reported by exchange or down stream broker
250fillTsdoublefill report ts (seconds since startup; 100 nanosec resolution)
253fillDttmDateTimeDate/time of fill arrival (SRDateTime)
256fillExchstring(12)ExDest code from child order execution report
259fillExecIdtext1street side execution Id
262fillExecRefIdtext1street side execution ref Id (only used when busting an execution)
265fillLegRefIdlonglegRefId for multileg fills
268fillLegRatiointlegRatio (if spread order)
271fillExchFeefloatSpiderRock estimate of the exchange fee based on liquidity tags (best effort)
274fillMarketstring(8)usually from execReport.lastMkt as reported by child order venue
277fillPricedoublefill price
280fillQuantityintfill quantity
283fillReportDetailtext1extra detail (if any) from child execution
286fillFirmTypeenum : FirmTypefill order firm type [Customer, ProCust, Firm, MM, etc] (as reported by street)
289fillOrderCapacityenum : OrderCapacityfill order capacity (as reported by street)
292fillBiddoublemarket bid @ fill arrival
295fillAskdoublemarket ask @ fill arrival
298fillMarkdoublemid-market (or SR surface price if option) @ fill arrival
301fillFairWidthdoublemodel fair width @ fill time
304fillUMarkdoubleunderlier mark @ fill arrival
307fillUBiddoubleunderlier market bid @ fill arrival
310fillUAskdoubleunderlier market bid @ fill arrival
313fillVolAtmfloatatm volatility @ fill arrival
316fillMark1Mdoublemid-market (or SR surface price if option) @ fill arrival + 1m
319fillMark10Mdoublemid-market (or SR surface price if option) @ fill arrival + 10m
322fillBid1Mdoublemarket bid @ fill arrival + 1m
325fillAsk1Mdoublemarket ask @ fill arrival + 1m
328fillBid10Mdoublemarket bid @ fill arrival + 10m
331fillAsk10Mdoublemarket ask @ fill arrival + 10m
334fillUMark1Mdoubleunderlier mark @ fill arrival + 1m
337fillUMark10Mdoubleunderlier mark @ fill arrival + 10m
340fillVolAtm1Mfloatatm volatility (options only) + 1m
343fillVolAtm10Mfloatatm volatility (options only) + 10m
346fillState1Menum : FillMarkState
349fillState10Menum : FillMarkState
352fillVolfloatfill volatility @ fillLimitRefUPrc & fillLimitRefSDiv
355fillVolSfloatfill volatility @ surfaceUPrc & surfaceSDiv
358fillProbfloatT+10m probability for the fill @ fill arrival send time
361fillLimitRefUPrcdoublelimit reference underlier price @ fill arrival time
364fillLimitRefSDivdoublelimit reference sdiv value @ fill arrival time
367fillLimitPrcdoubleparent order limit price @ fill arrival time
370fillVefloatfill vega
373fillGafloatfill gamma
376fillDefloatfill delta
379fillThfloatfill theta
382fillVeRatiofloatfill ve / fill atm ve
385fillBetafloatSpiderRock estimate of beta to SPX
388fillProcDetailtext1fill processing detail (SR internal)
391priceTypeenum : PriceType
394execBrkrAccntstring(16)account at executing broker (if any)
397execBrkrClFirmstring(16)client/firm at executing broker (if any)
400execBrkrUserNamestring(16)userName at execution broker (if any)
403clearingFlipTypeenum : FlipTypeClearing Flip Type (None, ExecBroker, CMTA, Giveup, DTCC, QSR, etc)
406clearingFlipFirmstring(6)Clearing Flip Firm (if any)
409clearingFlipAccntstring(10)Clearing Flip Account (if any)
412clearingAgentstring(10)Clearing Agent (if any)
415clearingTaxIDstring(10)Clearing TaxID (if any)
418clearingBrkrMPIDstring(8)Clearing Broker MPID (equity only)
421badgestring(16)
424spdrOrderStatusenum : SpdrOrderStatus
427spdrCloseReasonenum : SpdrCloseReason
430cumFillQuantityintcumulative fills (this parent number only)
433avgFillPricedouble
436cumLegFillQuantityintcumulative fills (spread only)
439avgLegFillPricedouble
442leavesQtyint
445childShapeenum : SpdrOrderShape
448childOrderStatusenum : OrderStatus
451childSizeintchild order size
454childPricedoublechild order price
457childDttmDateTimechild order generation date/time
460childExchintchild order exchange (SR exchange number)
463childExDeststring(16)child order exchange destination code
466childFaceSideenum : FaceSide
469childFaceShapeenum : FaceShape
472childExecBrokerstring(8)executing broker that child order was routed to
475childIsDirectedenum : YesNochild order isDirected flag
478childIsoSweepenum : YesNochild order ISO sweep flag
481childTimeInForceenum : TimeInForce
484childOrderHandlingstring(24)order handling string from the algo that generated the child order
487childAlgoHandlerenum : ChildHandleralgo handler for this child order
490childCreateReasonenum : ChildCreateReason
493childCancelReasonenum : ChildCancelReason
496childMakerTakerenum : MakerTaker
499childUBiddoubleunderlier market bid at @ child order send time
502childUAskdoubleunderlier market ask at @ child order send time
505childBiddoublemarket bid at the @ child order send time
508childAskdoublemarket ask at the @ child order send time
511childMarkdoublemid-market (SR surface price if option) @ child order send time
514childFairWidthdoublemodel fair width @ child order create
517childVolfloatchild order volatility @ childLimitRefUPrc
520childProbfloatSR probability for the child order @ child order send time
523childLimitRefUPrcdoublelimit reference underlier price @ child order send time
526childLimitPrcdoubleparent order limit price @ child order send time
529childVolAtmfloatatm volatility @ child order send time
532childFirmTypeenum : FirmTypechild order firm type [Customer, ProCust, Firm, MM, etc]
535childOrderCapacityenum : OrderCapacitychild order capacity
538childPosTypeenum : PositionTypechild order position type
541childFirmOptPositioninteffective firm option position @ child order send time
544childSSaleFlagenum : ShortSaleFlagshort sale flag
547childFirmStkPositioninteffective firm stock position @ child order send time
550childFirmOpenSellShintopen sell orders counted in marking @ child order send time
553childLocateQuanintavailable locate quantity (if selling short) @ child order send time
556childLocateFirmstring(6)firm granting the locate
559childLocatePoolstring(16)locate pool @ firm granting locate
562childMktStanceenum : MktStancechild order was expected to be marketable @ child send time
565childRiskCxlenum : YesNocancel was generated from risk controls
568childCxlAttemptedenum : YesNocancel attempt was made on the child order prior to receiving this fill
571childCxlTexttext1
574childCxlFillLatencyfloatcancel attempt -to- fill report latency (in seconds)
577childMethodstring(8)execution method string
580childSourcestring(12)execution source string
583priAggGroupstring(16)primary aggregation group
586secAggGroupstring(16)secondary aggregation group
589directedClientFirmstring(16)
592noticeCommissionfloat
595hasNoticeCommenum : YesNonoticeCommision contains responder auction commission; otherwise, commission is as agreed elsewhere
598custCommPayingenum : YesNoclient is commission paying (to the responder)
601responseTypestring(4)usually an exch auction response type
604completionTypeenum : CompletionTypeNone, DAC, POC, TAS, TACO, BTIC
607completionStateenum : CompletionState
610completionPricedoublecompletion trade price (final trade price)
613completionSecKeyOptionKeyfinal settlement secKey (contract that DAC, TAS, TACO, etc. will convert to; might not be valid until completed)
616completionSecTypeenum : SpdrKeyTypeusually Future or Option (None if not yet valid)
619riskVegafloatrisk vega
622riskWtVegafloatrisk gamma
625riskNValuefloatrisk delta
628riskDeltafloatrisk delta
631riskDDeltafloatrisk ddelta
634riskRm1floatuser defined (from parent order) [used to manage order groups]
637riskRm2floatuser defined (from parent order) [used to manage order groups]
640riskRm3floatuser defined (from parent order) [used to manage order groups]
643riskRm4floatuser defined (from parent order) [used to manage order groups]
646riskRm5floatuser defined (from parent order) [used to manage order groups]
649riskRm6floatuser defined (from parent order) [used to manage order groups]
652riskRm7floatuser defined (from parent order) [used to manage order groups]
655marginUDnVDnfloatunderlier down, vol down
658marginUDnVUpfloatunderlier down, vol up
661marginUUpVDnfloatunderlier up, vol down
664marginUUpVUpfloatunderlier up, vol up
667riskU15Dnfloatunderlier dn 15% shock slide
670riskU15Upfloatunderlier up 15% shock slide
673riskU50Dnfloatunderlier dn 50% shock slide
676riskU50Upfloatunderlier up 50% shock slide
679fillBrkrRatefloatbilling brokerage rate (tier 1)
682fillRoutingRatefloatbilling routing rate (tier 1)
685mmPrefCodestring(6)market maker preference code (if any)
688mmCreditfloatexpected market maker credit (if any)
691riskCodeenum : RiskCodeSpiderRock Risk Code (if any)
694billingSecTypeenum : BillingSecTypeSpiderRock billing security type
697billingCategoryenum : BillingCategorySpiderRock billing category
700spdrLiquidityTagstring(2)SpiderRock normalized liquidity tag
703exchLiquidityTagstring(4)liquidity tag as reported by downstream venue (if any)
706fillExchDetailtext1other fix tags (tag:value#tag:value) [additional detail used for analysis]
709crossSideenum : CrossSideindicates if this order was the initiator or responder of the cross fill (None if not cross)
712isCrossBreakupFillenum : YesNocross order was broken up on exchange, and this execution was filled by party not specified on the original cross order
715exchFirmTypestring(6)used to reflect field from a downstread execution back up to upstream fill report
718extExecBrokerstring(12)used to reflect field from a downstream destination back up to and upstream fill report
721relationshipTypeenum : RelationshipTypetype of SR <-> client relationship
724clearingFirmstring(4)clearing firm
727clearingAccntstring(12)clearing firm account (if any)
730clArriveMarkfloatclient specified arrival mark (passed through from parent order)
733parentDttmDateTimeparent order creation date/time
736parentOrderSizeintparent order size
739parentUBiddoubleunderlier market bid @ parent order arrival
742parentUAskdoubleunderlier market ask @ parent order arrival
745parentUMarkdoubleunderlier mid mark @ parent order arrival
748parentBiddoublemarket bid @ parent order arrival
751parentAskdoublemarket ask @ parent order arrival
754parentMarkdoublemid-market (or SR surface price) @ parent order arrival
757parentFairWidthdoublemodel fair width @ parent order arrival
760parentSurfVoldoubleSR surf vol @ parent order arrival
763parentLimitTypeenum : SpdrLimitTypePrimary Limit Type (Prc, Vol, Rel, Market, Smrt, etc)
766parentLimitVolfloatparent order limit volatilty (if any)
769parentLimitPrcdoubleparent order limit price @ fill arrival
772parentLimitRefUPrcdoublelimit reference underlier price @ fill arrival
775parentTheoVolfloatclient supplied theoretical volatility (used for markup only) [copied from parent order]
778parentTheoPrcfloatoption price corresponding parentTheoVol @ fillUMark
781parentPosTypeenum : PositionTypeparent order position type
784parentSSaleFlagenum : ShortSaleFlagshort sale flag on parent order
787parentStrategystring(36)client strategy [usually client supplied]
790noticeNumberlongRFR / Auction noticeNumber (if any)
793userData1text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
796userData2text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
797pricingVersionenum : PricingVersionpricing library version
799autoHedgeenum : AutoHedgeauto-hedge algorithm (if any)
802hedgeSecKeyExpiryKeyauto-hedge sec key (if any)
805hedgeSecTypeenum : SpdrKeyTypeauto-hedge sec type (if any)
808hedgeBetaRatiofloatportion of executed $delta to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0])
811hedgeScopeenum : HedgeScopehedge group scope
814yearsfloatyears to expiration
817underliersPerCnintoption delivery underliers per contract
820underlierTypeenum : UnderlierTypetype of underlier (affects $greek calculations)
823tickValuefloat$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)
826pointValuefloat$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)
829pointCurrencyenum : Currency
832uPrcRatiofloatUPrcRatio (SymbolRatio) from product definition
835minTickSizefloatminimum market price variation (dnTickSize if on a boundary)
838priceFormatenum : PriceFormatSpiderRock price display format code
841uPriceFormatenum : PriceFormatSpiderRock underlier price display format code
844priceNotionaldoublefillQuantity * fillPrice (Stk)
847uPrcNotionaldoubleFillSize * Underlying Price (mid market) * Underliers Per Contract * pointValue (Opt only)
850strikeNotionaldoubleFillSize * Strike Price * Underliers Per Contract * pointValue (Opt only)
853realmCurrencyenum : CurrencyBase currency of realm execution recieved in
856pointToRealmRatedoubleFOREX rate from pointCurrency to realm base currency at time of execution
859contraMPIDstring(4)contra exchange member ID
862contraPositionTypeenum : SRPosType
865contraOrderCapacityenum : OrderCapacitycust, proCust, firm, etc.
868contraClearFirmstring(5)contra clearing (CMTA) instructions
871contraClearAccntstring(5)
874contraMarketMakerstring(10)contra market maker ID (if any)
877contraDetailtext1additional contra side detail
880uRefTypeenum : URefType
883uPrcTriggerLeveldouble
886cxlUPrcdoubleuPrc @ cancel (or cancel/replace) trigger (compare to uPrcTriggerLevel)
889cxlSourceenum : CancelSource
892cxlSrcTimestamplongexchange or SIP (claimed) cxl trigger timestamp (from an underlier print or quote market data event)
895cxlEngTimestamplongtrigger event arrival to an SR (street, sgw, or edge) NIC card
898cxlSndTimestamplongcancel (or cancel/replace) send timestamp
901fillUPrcDriftMs25doubleunderlier price drift (fillUPrc + 25ms to fillUPrc) (+=beneficial, -=detrimental)
904uSlipfloatdir * sign(de) * dContigency; dContigency = uPrc slip through cxl trigger or zero (>= 0)
907opxSlipfloatabs(de) * uSlip + 0.5 * ga * uSlip * uSlip (>= 0)
910volSlipfloat0.01 * opxSlip / ve
913prtUBidfloatlive uBid/uAsk at the time print event was received
916prtUAskfloat
919prtSizeint
922prtTimestamplongprintEvent.srcTimestamp
925srcTimestamplongstreet/exchange (claimed) print time
928sgwTimestamplongprint arrival to an SR (street or edge) NIC card
931engTimestamplongprint arrival in an SR (execution or edge) engine
934liveUPrcdoubleSpiderRock internal use only
937liveMarkdoubleSpiderRock internal use only
940timestampDateTimetimestamp of this record [not necessarily the timstamp of the fill itself]

Get Schema API Call

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 = 'SpdrParentExecutionV2'

# 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)

Get Msg API Call

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 = 'SpdrParentExecutionV2'

# Replace with your pkey value for getting the specific message desired
PKEY = 'ReplaceThisValueForTheQueryToWork'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned.
VIEW = 'sysRealm|sysEnvironment|runStatus|version|routingCode|execStatus|execShape|origExecID|lastExecID|remoteText|integrityError|parentNumber|parentVersion|baseParentNumber|clOrdId|streetClOrdId|streetOrderId|crossClOrdId|faceSideClOrdId|reviewClOrdId|altFillId|altOrderId|altCrossId|altLegRefId|altAccnt|altUserName|srcRoutingCode|riskGroupId|triggerGroupId|triggerTimestamp|packageId|parentShape|ticker|secKey|secType|accnt|clientFirm|orderSide|spdrSource|groupingCode|engineName|gatewayName|execRole|execBrkrCode|execBrkrMPID|userName|strategyAccnt|coreClientFirm|sponsorClientFirm|fillTransactDttm|fillTs|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillReportDetail|fillFirmType|fillOrderCapacity|fillBid|fillAsk|fillMark|fillFairWidth|fillUMark|fillUBid|fillUAsk|fillVolAtm|fillMark1M|fillMark10M|fillBid1M|fillAsk1M|fillBid10M|fillAsk10M|fillUMark1M|fillUMark10M|fillVolAtm1M|fillVolAtm10M|fillState1M|fillState10M|fillVol|fillVolS|fillProb|fillLimitRefUPrc|fillLimitRefSDiv|fillLimitPrc|fillVe|fillGa|fillDe|fillTh|fillVeRatio|fillBeta|fillProcDetail|priceType|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|clearingBrkrMPID|badge|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|childShape|childOrderStatus|childSize|childPrice|childDttm|childExch|childExDest|childFaceSide|childFaceShape|childExecBroker|childIsDirected|childIsoSweep|childTimeInForce|childOrderHandling|childAlgoHandler|childCreateReason|childCancelReason|childMakerTaker|childUBid|childUAsk|childBid|childAsk|childMark|childFairWidth|childVol|childProb|childLimitRefUPrc|childLimitPrc|childVolAtm|childFirmType|childOrderCapacity|childPosType|childFirmOptPosition|childSSaleFlag|childFirmStkPosition|childFirmOpenSellSh|childLocateQuan|childLocateFirm|childLocatePool|childMktStance|childRiskCxl|childCxlAttempted|childCxlText|childCxlFillLatency|childMethod|childSource|priAggGroup|secAggGroup|directedClientFirm|noticeCommission|hasNoticeComm|custCommPaying|responseType|completionType|completionState|completionPrice|completionSecKey|completionSecType|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU15Dn|riskU15Up|riskU50Dn|riskU50Up|fillBrkrRate|fillRoutingRate|mmPrefCode|mmCredit|riskCode|billingSecType|billingCategory|spdrLiquidityTag|exchLiquidityTag|fillExchDetail|crossSide|isCrossBreakupFill|exchFirmType|extExecBroker|relationshipType|clearingFirm|clearingAccnt|clArriveMark|parentDttm|parentOrderSize|parentUBid|parentUAsk|parentUMark|parentBid|parentAsk|parentMark|parentFairWidth|parentSurfVol|parentLimitType|parentLimitVol|parentLimitPrc|parentLimitRefUPrc|parentTheoVol|parentTheoPrc|parentPosType|parentSSaleFlag|parentStrategy|noticeNumber|userData1|userData2|pricingVersion|autoHedge|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|priceNotional|uPrcNotional|strikeNotional|realmCurrency|pointToRealmRate|contraMPID|contraPositionType|contraOrderCapacity|contraClearFirm|contraClearAccnt|contraMarketMaker|contraDetail|uRefType|uPrcTriggerLevel|cxlUPrc|cxlSource|cxlSrcTimestamp|cxlEngTimestamp|cxlSndTimestamp|fillUPrcDriftMs25|uSlip|opxSlip|volSlip|prtUBid|prtUAsk|prtSize|prtTimestamp|srcTimestamp|sgwTimestamp|engTimestamp|liveUPrc|liveMark|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 = 'streetClOrdId: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)

Get Msgs API Call

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 = 'SpdrParentExecutionV2'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sysRealm|sysEnvironment|runStatus|version|routingCode|execStatus|execShape|origExecID|lastExecID|remoteText|integrityError|parentNumber|parentVersion|baseParentNumber|clOrdId|streetClOrdId|streetOrderId|crossClOrdId|faceSideClOrdId|reviewClOrdId|altFillId|altOrderId|altCrossId|altLegRefId|altAccnt|altUserName|srcRoutingCode|riskGroupId|triggerGroupId|triggerTimestamp|packageId|parentShape|ticker|secKey|secType|accnt|clientFirm|orderSide|spdrSource|groupingCode|engineName|gatewayName|execRole|execBrkrCode|execBrkrMPID|userName|strategyAccnt|coreClientFirm|sponsorClientFirm|fillTransactDttm|fillTs|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillReportDetail|fillFirmType|fillOrderCapacity|fillBid|fillAsk|fillMark|fillFairWidth|fillUMark|fillUBid|fillUAsk|fillVolAtm|fillMark1M|fillMark10M|fillBid1M|fillAsk1M|fillBid10M|fillAsk10M|fillUMark1M|fillUMark10M|fillVolAtm1M|fillVolAtm10M|fillState1M|fillState10M|fillVol|fillVolS|fillProb|fillLimitRefUPrc|fillLimitRefSDiv|fillLimitPrc|fillVe|fillGa|fillDe|fillTh|fillVeRatio|fillBeta|fillProcDetail|priceType|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|clearingBrkrMPID|badge|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|childShape|childOrderStatus|childSize|childPrice|childDttm|childExch|childExDest|childFaceSide|childFaceShape|childExecBroker|childIsDirected|childIsoSweep|childTimeInForce|childOrderHandling|childAlgoHandler|childCreateReason|childCancelReason|childMakerTaker|childUBid|childUAsk|childBid|childAsk|childMark|childFairWidth|childVol|childProb|childLimitRefUPrc|childLimitPrc|childVolAtm|childFirmType|childOrderCapacity|childPosType|childFirmOptPosition|childSSaleFlag|childFirmStkPosition|childFirmOpenSellSh|childLocateQuan|childLocateFirm|childLocatePool|childMktStance|childRiskCxl|childCxlAttempted|childCxlText|childCxlFillLatency|childMethod|childSource|priAggGroup|secAggGroup|directedClientFirm|noticeCommission|hasNoticeComm|custCommPaying|responseType|completionType|completionState|completionPrice|completionSecKey|completionSecType|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU15Dn|riskU15Up|riskU50Dn|riskU50Up|fillBrkrRate|fillRoutingRate|mmPrefCode|mmCredit|riskCode|billingSecType|billingCategory|spdrLiquidityTag|exchLiquidityTag|fillExchDetail|crossSide|isCrossBreakupFill|exchFirmType|extExecBroker|relationshipType|clearingFirm|clearingAccnt|clArriveMark|parentDttm|parentOrderSize|parentUBid|parentUAsk|parentUMark|parentBid|parentAsk|parentMark|parentFairWidth|parentSurfVol|parentLimitType|parentLimitVol|parentLimitPrc|parentLimitRefUPrc|parentTheoVol|parentTheoPrc|parentPosType|parentSSaleFlag|parentStrategy|noticeNumber|userData1|userData2|pricingVersion|autoHedge|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|priceNotional|uPrcNotional|strikeNotional|realmCurrency|pointToRealmRate|contraMPID|contraPositionType|contraOrderCapacity|contraClearFirm|contraClearAccnt|contraMarketMaker|contraDetail|uRefType|uPrcTriggerLevel|cxlUPrc|cxlSource|cxlSrcTimestamp|cxlEngTimestamp|cxlSndTimestamp|fillUPrcDriftMs25|uSlip|opxSlip|volSlip|prtUBid|prtUAsk|prtSize|prtTimestamp|srcTimestamp|sgwTimestamp|engTimestamp|liveUPrc|liveMark|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 = 'streetClOrdId:eq:ExampleString'

# Replace with your desired limit of how many messages you receive. The default limit is 500
LIMIT = 500

# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'sysRealm:ASC'

# Request Parameters for getmsgs Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsgs',
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE,
"limit": LIMIT,
"order": ORDER
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Aggregate API Call

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 = 'SpdrParentExecutionV2'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysRealm|sysEnvironment|runStatus|version|routingCode|execStatus|execShape|origExecID|lastExecID|remoteText|integrityError|parentNumber|parentVersion|baseParentNumber|clOrdId|streetClOrdId|streetOrderId|crossClOrdId|faceSideClOrdId|reviewClOrdId|altFillId|altOrderId|altCrossId|altLegRefId|altAccnt|altUserName|srcRoutingCode|riskGroupId|triggerGroupId|triggerTimestamp|packageId|parentShape|ticker|secKey|secType|accnt|clientFirm|orderSide|spdrSource|groupingCode|engineName|gatewayName|execRole|execBrkrCode|execBrkrMPID|userName|strategyAccnt|coreClientFirm|sponsorClientFirm|fillTransactDttm|fillTs|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillReportDetail|fillFirmType|fillOrderCapacity|fillBid|fillAsk|fillMark|fillFairWidth|fillUMark|fillUBid|fillUAsk|fillVolAtm|fillMark1M|fillMark10M|fillBid1M|fillAsk1M|fillBid10M|fillAsk10M|fillUMark1M|fillUMark10M|fillVolAtm1M|fillVolAtm10M|fillState1M|fillState10M|fillVol|fillVolS|fillProb|fillLimitRefUPrc|fillLimitRefSDiv|fillLimitPrc|fillVe|fillGa|fillDe|fillTh|fillVeRatio|fillBeta|fillProcDetail|priceType|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|clearingBrkrMPID|badge|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|childShape|childOrderStatus|childSize|childPrice|childDttm|childExch|childExDest|childFaceSide|childFaceShape|childExecBroker|childIsDirected|childIsoSweep|childTimeInForce|childOrderHandling|childAlgoHandler|childCreateReason|childCancelReason|childMakerTaker|childUBid|childUAsk|childBid|childAsk|childMark|childFairWidth|childVol|childProb|childLimitRefUPrc|childLimitPrc|childVolAtm|childFirmType|childOrderCapacity|childPosType|childFirmOptPosition|childSSaleFlag|childFirmStkPosition|childFirmOpenSellSh|childLocateQuan|childLocateFirm|childLocatePool|childMktStance|childRiskCxl|childCxlAttempted|childCxlText|childCxlFillLatency|childMethod|childSource|priAggGroup|secAggGroup|directedClientFirm|noticeCommission|hasNoticeComm|custCommPaying|responseType|completionType|completionState|completionPrice|completionSecKey|completionSecType|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU15Dn|riskU15Up|riskU50Dn|riskU50Up|fillBrkrRate|fillRoutingRate|mmPrefCode|mmCredit|riskCode|billingSecType|billingCategory|spdrLiquidityTag|exchLiquidityTag|fillExchDetail|crossSide|isCrossBreakupFill|exchFirmType|extExecBroker|relationshipType|clearingFirm|clearingAccnt|clArriveMark|parentDttm|parentOrderSize|parentUBid|parentUAsk|parentUMark|parentBid|parentAsk|parentMark|parentFairWidth|parentSurfVol|parentLimitType|parentLimitVol|parentLimitPrc|parentLimitRefUPrc|parentTheoVol|parentTheoPrc|parentPosType|parentSSaleFlag|parentStrategy|noticeNumber|userData1|userData2|pricingVersion|autoHedge|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|priceNotional|uPrcNotional|strikeNotional|realmCurrency|pointToRealmRate|contraMPID|contraPositionType|contraOrderCapacity|contraClearFirm|contraClearAccnt|contraMarketMaker|contraDetail|uRefType|uPrcTriggerLevel|cxlUPrc|cxlSource|cxlSrcTimestamp|cxlEngTimestamp|cxlSndTimestamp|fillUPrcDriftMs25|uSlip|opxSlip|volSlip|prtUBid|prtUAsk|prtSize|prtTimestamp|srcTimestamp|sgwTimestamp|engTimestamp|liveUPrc|liveMark|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysRealm|sysEnvironment|runStatus|execStatus|execShape|parentShape|secType|orderSide|spdrSource|execRole|fillFirmType|fillOrderCapacity|fillState1M|fillState10M|priceType|clearingFlipType|spdrOrderStatus|spdrCloseReason|childShape|childOrderStatus|childFaceSide|childFaceShape|childIsDirected|childIsoSweep|childTimeInForce|childAlgoHandler|childCreateReason|childCancelReason|childMakerTaker|childFirmType|childOrderCapacity|childPosType|childSSaleFlag|childMktStance|childRiskCxl|childCxlAttempted|hasNoticeComm|custCommPaying|completionType|completionState|completionSecType|riskCode|billingSecType|billingCategory|crossSide|isCrossBreakupFill|relationshipType|parentLimitType|parentPosType|parentSSaleFlag|pricingVersion|autoHedge|hedgeSecType|hedgeScope|underlierType|pointCurrency|priceFormat|uPriceFormat|realmCurrency|contraPositionType|contraOrderCapacity|uRefType|cxlSource'

# 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 = 'streetClOrdId: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)

Get Count API Call

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 = 'SpdrParentExecutionV2'

# 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 = 'streetClOrdId: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)