Skip to main content
Version: 8.4.08.4

Schema: SpdrParentReport (ID: 4100)

SpdrParentReport records contain the current state of a parent order and update as/when the order state changes.

SpdrParentReport records are published to the SpiderRock elastic cluster when they reach a terminal state (closed, rejected, filled, etc.)

METADATA

AttributeValue
Topic3985-parent-orders
MLink TokenSystemData
SRSE ProductSRTrade

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

BODY

#FieldTypeComment
10=parentNumberlongSPDR order number
100sysRealmenum : SysRealm
103sysEnvironmentenum : SysEnvironment
106runStatusenum : RunStatus
109reportNumberlong
112parentShapeenum : SpdrOrderShape
115recordVersionshort
118recordSourceenum : RecordSource
121parentVersionshortSPDR order instance number (1 = original order; 2 = 1st cancel/replace, etc)
124baseParentNumberlongSPDR order number (initial number in cancel/replace sequence) (also, source parent for dynamically generated orders;eg auto-hedges)
1037prevParentNumberlongSPDR order number (order being cancelled/replaced) (zero if none)
1038nextParentNumberlongSPDR order number (next order in cxl/replace sequence) (zero if none)
133prevParentCreateDttmDateTimenone/undefined if first order in a sequence
136prevParentCumFillQtyint
139clientSeqNumInintinbound client seq number (FIX orders only)
142altOrderIdstring(24)usually client clOrdId (from FIX or SRSE)
145altPrevOrderIdstring(24)usually previous/orig (cxl/repl) client clOrdId (from FIX or SRSE)
151altCancelIdstring(24)client cancelId (from FIX or SRSE) [identifies the message responsible for user cxl actions]
154srcRoutingCodetext1inbound FIX routing code, if any
157packageIdlongreferences spread orderNumber, if a legged spread order
160prevPackageIdlong
163riskGroupIdlongall orders with the same riskGroupId share a common set of risk counters; .Grp. risk limits apply to these shared counters
166triggerGroupIdlongWaitTrigger group Id
169secKeyOptionKey
172secTypeenum : SpdrKeyType
175accntstring(16)SR trading account
178clientFirmstring(16)SR client firm
1039coreClientFirmstring(16)
1040sponsorClientFirmstring(16)
181clientAccntstring(32)client assigned "long" account string (from AccountConfig) [used to map between client and SR account strings]
184userNamestring(24)name of the user entering the order
1041userSourceenum : SpdrSourceSpdrSource of this order
187altAccntstring(32)alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings]
190altUserNamestring(24)alternate (client assigned) user name (optional) [used to map between client and SR account strings]
1094execBrkrCodestring(16)overrides the default executing broker for this parent order
196externExDeststring(16)routing code for orders directed to an external order router (default = null); must match an exDest associated with a RouteDefinition
199externParamstext1external algo names/parameters (usually just an algo name)
202spdrSourceenum : SpdrSourceparent order source enum
205groupingCodelongunique broker code; broker.pkey = (key + accnt + spdrSource + groupingCode)
1042engineNamestring(32)execution engine (partition) handling this parent order
211orderDttmDateTime
214orderSideenum : BuySell
217priceTypeenum : PriceType
220orderSizeint
223orderActiveSizeinttotal activated size (total size released for execution) (-1 = all available size)
226spdrStageTypeenum : SpdrStageTypeSizeLock = stage pending modification (can reduce size); SizeModify = stage pending modification (can increase/reduce size)
1043stageReviewenum : StageReview
229parentOrderHandlingenum : ParentOrderHandling
232parentBalanceHandlingenum : ParentBalanceHandling
235limitPricedoublelimit price @ order arrival
238orderLimitTypeenum : SpdrLimitType
241takeLimitClassenum : SpdrLimitClass
244makeLimitClassenum : SpdrLimitClass
247startTypeenum : StartTypeWaitTrigger associates this order with a triggerGroupId. The initial wave of child orders from the TriggerGroup will be simultaneously delivered when a trigger signal is received.
1044marketSessionenum : MarketSession
253startDttmDateTime[optional] (default: 2000-01-01)
256goodTillDttmDateTime[optional] (default: 2099-01-01)
259autoHedgeenum : AutoHedge
262hedgeInstrumentenum : HedgeInstDefault=underlier (EQT or FUT) [Index Options use ETF]; FrontMonth=underlier (EQT) or front month (FUT) [Index Options use FM Fut]; Stock=hedgeSecKey; Future=hedgeSecKey
265hedgeSecKeyExpiryKey
268hedgeSecTypeenum : SpdrKeyType
271hedgeBetaRatiofloatportion of executed $money to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0])
274hedgeScopeenum : HedgeScopehedge group scope [RiskGroup or Accnt]
1045hedgeSessionenum : MarketSessionmarket session for the autohedge order
280orderCreateDttmDateTimeorder send time
283orderCreateLatencyfloatorder send to order ack latency (in milliseconds)
286cancelReasonenum : OrderCancelReason
289orderCancelDttmDateTimeorder cancel time
292orderCancelLatencyfloatcancel send to cancel ack latency (in milliseconds)
295orderWorkingDttmDateTimeorder send ack time (acknowleged working/new) (first exec report indicating the order is active)
298orderClosedDttmDateTimeorder terminated ack time (first exec report indicating the order is in a terminal state;eg. cancelled, filled, rejected, etc)
301orderClosedTexttext1
1046maxExposureSizeintmaximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1]
1047publicSizeenum : PublicSizeHandlingpublic order size handling: None=algo default; Randomize=randomize public size; MktSize=expose typical market size; FullSize=expose entire order size where possible; FullSizeR=randomize full size
1048canOverlapCxlReplenum : YesNocan execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order)
1049progressExposeTimeintminimum time (secs) to expose order (0 = no minimum; used to guarantee that the order is exposed at mid-market for some time before actively taking)
1050progressRuleenum : ProgressRuleImmediate = all size immediately available; TWAP = work from arrival to expiration; VWAP = work order not faster than participation rate
1051progressSliceCntbytenumber of slices to use (default = 4 or 8) [max 20]
1052vwapParticipationfloattarget vwap participation rate (target % of trade activity)
1053auctionResponderenum : AuctionResponderif set, parent order can be an auction responder
1054maxMakeExchFeefloatmaximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
1055maxTakeExchFeefloatmaximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
1056incTakeExchFeeenum : IncExchFeeinclude exchange fee in probability and surface based take limit calculations
1057incMakeExchFeeenum : IncExchFeeinclude exchange fee in probability and surface based make limit calculations
1058makeExchRuleenum : MakeExchRuleActiveMaker exchange preference rule: 'MaxPart' = maximize participation; 'FeeOrder' = minimize fees [maximize rebates]; 'ImprvOnly' will only make when improving NBBO; 'RoundRobin' will rotate through exch list
1059cxlUPrcRangeenum : UPrcCxlcancel parent order if/when outside the uPrice range [ _Halt = also cancel if halted ]
1060minUBidfloat[optional]
1061maxUAskfloat[optional] (< $0.01 = none)
1062minOptionPxfloat[optional] option price floor for tied to stock orders
1063maxChildOrdersintmaximum number of child orders that can be generated by this parent order [order will terminate if/when this cap is reached;zero or neg = unlimited]
1064orderDurationint[optional] (number of seconds)
1065takeReachRuleenum : ReachRuleImmediate = reach room immediately available; Delayed = available after [1-3] seconds; Passive = available if contra side aggresses; WeakOnly = only take if available size < avgMarketSize; ISOSweep = Intermarket Sweep [requires WaitTrigger]
1066orderPrcLimitdoubleApplies if LimitType = Prc[]
1067orderRefUPrcdoubledefault=underlier.mid
1068orderRefDeltafloatdefault=option.delta
1069orderRefGammafloatdefault=option.gamma
1070orderVolLimitfloatApplies if LimitType = Vol[] [uses SR dividends and borrow rates]
1071rateOverridefloatzero = ignore; > zero = override
1072sdivOverridefloat
1073ddivOverridetext1discrete dividend string override ([yearsToExpiry,divYears:divAmount,divYears:divAmount, ...])
1074overrideCodeenum : OverrideCode
1075orderPrcOffsetdoubledefault=0 [surface, relX and pegX limit offsets]
1076takeAlphaTypeenum : AlphaTypeApplies if takeLimitClass = Probability
1077makeAlphaTypeenum : AlphaTypeApplies if makeLimitClass = Probability
1078takeAlphaFactorfloat[-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if AlphaType = Relative]
1079makeAlphaFactorfloat[-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if AlphaType = Relative]
1080takeProbabilityfloattakeProbLimit = takeProbability [if AlphaType = Static]
1081makeProbabilityfloatmakeProbLimit = makeProbability [if AlphaType = Static]
1082takeSurfPrcOffsetdoubledefault=0
1083takeSurfVolOffsetfloatdefault=0
1084takeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
1085makeSurfPrcOffsetdoubledefault=0
1086makeSurfVolOffsetfloatdefault=0
1087makeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
1088orderRefEventMultfloat
1089orderRefEventDttmDateTime
1090externHedgeExDeststring(16)external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type (eg. #Nighthawk)
1091externHedgeParamstext1external algo names/parameters (usually just an algo name) # usually copied from the FixRoutingTable.externParams
304spdrOrderStatusenum : SpdrOrderStatus
307spdrCloseReasonenum : SpdrCloseReason
310spdrRejectReasonenum : SpdrRejectReason
1092spdrRejectLevelenum : SpdrRiskLevel
313firmTypeenum : FirmType
316orderCapacityenum : OrderCapacity
319ssaleFlagenum : ShortSaleFlagprimary short sale flag (single leg orders)
322positionTypeenum : PositionTypeprimary position type (single leg orders)
325arriveFirmPosintfirm position [resolved @ parent order arrival]
328arriveSSaleFlagenum : ShortSaleFlagprimary short sale flag (single leg orders) [resolved @ parent order arrival; short if any of order size would be short]
331noCrossGroupstring(16)
334exchTraderIdstring(16)
337largeTraderIdstring(16)
340tradingLocationstring(16)
343firmPositionint
346openSellShint
349locateQuanintavailable locate quantity (if selling short) @ arrival time
352locateFirmstring(6)locate firm (usually an MPID)
355locatePoolstring(16)locate pool @ locate firm
358clearingFirmstring(4)clearing firm [from AccountConfig; may not match parent execution]
361clearingAccntstring(12)clearing firm [from AccountConfig; may not match parent execution]
364catReportableenum : CatReportTypeCAT reportable type (from AccountConfig.catReportable)
367catSrcBrkrIMIDstring(16)B/D firm FDID (only exists if a B/D is the source) (supplied by FINRA fbo client) (from ClientFirm.catSrcBrkrIMID)
370catSrcAccntTypeenum : CatAccntTypeCAT account holder type (from AccountConfig.catSrcAccntType [Eqt, Opt])
373catSrcFirmTypeenum : CatFirmTypeCAT source type (from AccountConfig.catSrcType [Eqt, Opt])
376catDestDeptTypeenum : CatDeptTypeInfer from ParentOrder Agency or ATS (BlockInitiate/BlockRespond)
379catAccnttext1CAT Firm Designated ID
382catBrkrAccnttext1Brokers CAT Firm Designated ID
385cumFillQuantityint
388avgFillPricedouble
391avgFillUPricedouble
394leavesQtyint
397lastFillNumberlong
400lastFillDttmDateTime
403reviewClOrdIdstring(24)
406reviewOrigClOrdIdstring(24)
409reviewCancelClOrdIdstring(24)
412reviewOrderSizeint
415reviewOrderActiveSizeint
418reviewCumFillQuantityint
421reviewAvgFillPricedouble
424reviewLeavesQtyint
427reviewOrderStatusenum : SpdrOrderStatus
433maxProgressenum : MaxProgress
436maxProgressDetailstring(48)
439maxProgressTimeDateTime
442numChildOrdersint[is390Eligible] (numChildOrders > 0 if parent order is 390 Eligible and also generated at least 1 child order)
445nbboBiddoublebest nbbo bid @ arrival time
448nbboAskdoublebest nbbo ask @ arrival time
451nbboBidSzintpublic cumulative bid size @ nbboBid
454nbboAskSzintpublic cumulative ask size @ nbboAsk
457mktStanceenum : MktStance
460parentStrategystring(36)client strategy [usually client supplied]
463tickerTickerKeyunderlier (option only)
466tickValuefloat$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)
469pointValuefloat$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)
472pointCurrencyenum : Currency
475notionalMultfloat
478securityIDstring(24)from ProductDefinition.securityID
481securityDesctext1from ProductDefinition.securityDesc
484productGroupstring(6)from ProductDefinition.productGroup
487productClassenum : ProductClassfrom ProductDefinition.productClass
490undKeyExpiryKeyfrom ProductDefinition.undKey
493undTypeenum : SpdrKeyTypefrom ProductDefinition.undType
496uSecDescstring(6)[options only] underlier security description
499priceFormatenum : PriceFormat
502userData1text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
505userData2text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
508timestampDateTime
1093includeSRNetworkenum : InclExclDisclose

REPEATING FIELDS

DirectedCounterParty

FieldTypeComment
520clientFirmstring(16)
523inclExclenum : InclExclDisclose

OrderLegs

FieldTypeComment
616lastLegRefIdlong
619lastFillDttmDateTime
622cumSquareQtyint
625avgSquarePrcdouble
628lastSquareDttmDateTime
631cumPartialQtyint
634reviewCumSquareQtyint
637reviewAvgSquarePrcdouble
640reviewLastSquareDttmDateTime
643reviewCumPartialQtyint
646tickerTickerKey
649stockSideenum : BuySell
652stockSharesint
655stockLegIdlong
658altStkLegIdstring(24)
661reviewStkLegIdstring(24)
664reviewStkLegAltIdstring(24)
667ssaleFlagenum : ShortSaleFlag
670stockCumFillQtyint
673stockAvgFillPrcdouble
676stockReviewCumFillQtyint
679stockReviewAvgFillPrcdouble
682numLegsbyte
685secKey1OptionKey
688secType1enum : SpdrKeyType
691mult1ushort
694side1enum : BuySell
697legId1long
700altLegId1string(24)
703reviewLegId1string(24)
706reviewLegAltId1string(24)
709posType1enum : PositionType
712ssaleFlag1enum : ShortSaleFlag
715legCumFillQty1int
718legAvgFillPrc1double
721legReviewCumFillQty1int
724legReviewAvgFillPrc1double
727secKey2OptionKey
730secType2enum : SpdrKeyType
733mult2ushort
736side2enum : BuySell
739legId2long
742altLegId2string(24)
745reviewLegId2string(24)
748reviewLegAltId2string(24)
751posType2enum : PositionType
754ssaleFlag2enum : ShortSaleFlag
757legCumFillQty2int
760legAvgFillPrc2double
763legReviewCumFillQty2int
766legReviewAvgFillPrc2double
769secKey3OptionKey
772secType3enum : SpdrKeyType
775mult3ushort
778side3enum : BuySell
781legId3long
784altLegId3string(24)
787reviewLegId3string(24)
790reviewLegAltId3string(24)
793posType3enum : PositionType
796ssaleFlag3enum : ShortSaleFlag
799legCumFillQty3int
802legAvgFillPrc3double
805legReviewCumFillQty3int
808legReviewAvgFillPrc3double
811secKey4OptionKey
814secType4enum : SpdrKeyType
817mult4ushort
820side4enum : BuySell
823legId4long
826altLegId4string(24)
829reviewLegId4string(24)
832reviewLegAltId4string(24)
835posType4enum : PositionType
838ssaleFlag4enum : ShortSaleFlag
841legCumFillQty4int
844legAvgFillPrc4double
847legReviewCumFillQty4int
850legReviewAvgFillPrc4double
853secKey5OptionKey
856secType5enum : SpdrKeyType
859mult5ushort
862side5enum : BuySell
865legId5long
868altLegId5string(24)
871reviewLegId5string(24)
874reviewLegAltId5string(24)
877posType5enum : PositionType
880ssaleFlag5enum : ShortSaleFlag
883legCumFillQty5int
886legAvgFillPrc5double
889legReviewCumFillQty5int
892legReviewAvgFillPrc5double
895secKey6OptionKey
898secType6enum : SpdrKeyType
901mult6ushort
904side6enum : BuySell
907legId6long
910altLegId6string(24)
913reviewLegId6string(24)
916reviewLegAltId6string(24)
919posType6enum : PositionType
922ssaleFlag6enum : ShortSaleFlag
925legCumFillQty6int
928legAvgFillPrc6double
931legReviewCumFillQty6int
934legReviewAvgFillPrc6double

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

# 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 = 'SpdrParentReport'

# 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|reportNumber|parentShape|recordVersion|recordSource|parentVersion|baseParentNumber|prevParentNumber|nextParentNumber|prevParentCreateDttm|prevParentCumFillQty|clientSeqNumIn|altOrderId|altPrevOrderId|altCancelId|srcRoutingCode|packageId|prevPackageId|riskGroupId|triggerGroupId|secKey|secType|accnt|clientFirm|coreClientFirm|sponsorClientFirm|clientAccnt|userName|userSource|altAccnt|altUserName|execBrkrCode|externExDest|externParams|spdrSource|groupingCode|engineName|orderDttm|orderSide|priceType|orderSize|orderActiveSize|spdrStageType|stageReview|parentOrderHandling|parentBalanceHandling|limitPrice|orderLimitType|takeLimitClass|makeLimitClass|startType|marketSession|startDttm|goodTillDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|orderCreateDttm|orderCreateLatency|cancelReason|orderCancelDttm|orderCancelLatency|orderWorkingDttm|orderClosedDttm|orderClosedText|maxExposureSize|publicSize|canOverlapCxlRepl|progressExposeTime|progressRule|progressSliceCnt|vwapParticipation|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minOptionPx|maxChildOrders|orderDuration|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|externHedgeExDest|externHedgeParams|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|firmType|orderCapacity|ssaleFlag|positionType|arriveFirmPos|arriveSSaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|firmPosition|openSellSh|locateQuan|locateFirm|locatePool|clearingFirm|clearingAccnt|catReportable|catSrcBrkrIMID|catSrcAccntType|catSrcFirmType|catDestDeptType|catAccnt|catBrkrAccnt|cumFillQuantity|avgFillPrice|avgFillUPrice|leavesQty|lastFillNumber|lastFillDttm|reviewClOrdId|reviewOrigClOrdId|reviewCancelClOrdId|reviewOrderSize|reviewOrderActiveSize|reviewCumFillQuantity|reviewAvgFillPrice|reviewLeavesQty|reviewOrderStatus|maxProgress|maxProgressDetail|maxProgressTime|numChildOrders|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|mktStance|parentStrategy|ticker|tickValue|pointValue|pointCurrency|notionalMult|securityID|securityDesc|productGroup|productClass|undKey|undType|uSecDesc|priceFormat|userData1|userData2|timestamp|includeSRNetwork'

# 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 = 'altOrderId: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 = 'SpdrParentReport'

# 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|reportNumber|parentShape|recordVersion|recordSource|parentVersion|baseParentNumber|prevParentNumber|nextParentNumber|prevParentCreateDttm|prevParentCumFillQty|clientSeqNumIn|altOrderId|altPrevOrderId|altCancelId|srcRoutingCode|packageId|prevPackageId|riskGroupId|triggerGroupId|secKey|secType|accnt|clientFirm|coreClientFirm|sponsorClientFirm|clientAccnt|userName|userSource|altAccnt|altUserName|execBrkrCode|externExDest|externParams|spdrSource|groupingCode|engineName|orderDttm|orderSide|priceType|orderSize|orderActiveSize|spdrStageType|stageReview|parentOrderHandling|parentBalanceHandling|limitPrice|orderLimitType|takeLimitClass|makeLimitClass|startType|marketSession|startDttm|goodTillDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|orderCreateDttm|orderCreateLatency|cancelReason|orderCancelDttm|orderCancelLatency|orderWorkingDttm|orderClosedDttm|orderClosedText|maxExposureSize|publicSize|canOverlapCxlRepl|progressExposeTime|progressRule|progressSliceCnt|vwapParticipation|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minOptionPx|maxChildOrders|orderDuration|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|externHedgeExDest|externHedgeParams|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|firmType|orderCapacity|ssaleFlag|positionType|arriveFirmPos|arriveSSaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|firmPosition|openSellSh|locateQuan|locateFirm|locatePool|clearingFirm|clearingAccnt|catReportable|catSrcBrkrIMID|catSrcAccntType|catSrcFirmType|catDestDeptType|catAccnt|catBrkrAccnt|cumFillQuantity|avgFillPrice|avgFillUPrice|leavesQty|lastFillNumber|lastFillDttm|reviewClOrdId|reviewOrigClOrdId|reviewCancelClOrdId|reviewOrderSize|reviewOrderActiveSize|reviewCumFillQuantity|reviewAvgFillPrice|reviewLeavesQty|reviewOrderStatus|maxProgress|maxProgressDetail|maxProgressTime|numChildOrders|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|mktStance|parentStrategy|ticker|tickValue|pointValue|pointCurrency|notionalMult|securityID|securityDesc|productGroup|productClass|undKey|undType|uSecDesc|priceFormat|userData1|userData2|timestamp|includeSRNetwork'

# 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 = 'altOrderId: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 = 'SpdrParentReport'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysRealm|sysEnvironment|runStatus|reportNumber|parentShape|recordVersion|recordSource|parentVersion|baseParentNumber|prevParentNumber|nextParentNumber|prevParentCreateDttm|prevParentCumFillQty|clientSeqNumIn|altOrderId|altPrevOrderId|altCancelId|srcRoutingCode|packageId|prevPackageId|riskGroupId|triggerGroupId|secKey|secType|accnt|clientFirm|coreClientFirm|sponsorClientFirm|clientAccnt|userName|userSource|altAccnt|altUserName|execBrkrCode|externExDest|externParams|spdrSource|groupingCode|engineName|orderDttm|orderSide|priceType|orderSize|orderActiveSize|spdrStageType|stageReview|parentOrderHandling|parentBalanceHandling|limitPrice|orderLimitType|takeLimitClass|makeLimitClass|startType|marketSession|startDttm|goodTillDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|orderCreateDttm|orderCreateLatency|cancelReason|orderCancelDttm|orderCancelLatency|orderWorkingDttm|orderClosedDttm|orderClosedText|maxExposureSize|publicSize|canOverlapCxlRepl|progressExposeTime|progressRule|progressSliceCnt|vwapParticipation|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minOptionPx|maxChildOrders|orderDuration|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|externHedgeExDest|externHedgeParams|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|firmType|orderCapacity|ssaleFlag|positionType|arriveFirmPos|arriveSSaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|firmPosition|openSellSh|locateQuan|locateFirm|locatePool|clearingFirm|clearingAccnt|catReportable|catSrcBrkrIMID|catSrcAccntType|catSrcFirmType|catDestDeptType|catAccnt|catBrkrAccnt|cumFillQuantity|avgFillPrice|avgFillUPrice|leavesQty|lastFillNumber|lastFillDttm|reviewClOrdId|reviewOrigClOrdId|reviewCancelClOrdId|reviewOrderSize|reviewOrderActiveSize|reviewCumFillQuantity|reviewAvgFillPrice|reviewLeavesQty|reviewOrderStatus|maxProgress|maxProgressDetail|maxProgressTime|numChildOrders|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|mktStance|parentStrategy|ticker|tickValue|pointValue|pointCurrency|notionalMult|securityID|securityDesc|productGroup|productClass|undKey|undType|uSecDesc|priceFormat|userData1|userData2|timestamp|includeSRNetwork'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysRealm|sysEnvironment|runStatus|parentShape|recordSource|secType|userSource|spdrSource|orderSide|priceType|spdrStageType|stageReview|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|startType|marketSession|autoHedge|hedgeInstrument|hedgeSecType|hedgeScope|hedgeSession|cancelReason|publicSize|canOverlapCxlRepl|progressRule|auctionResponder|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|takeReachRule|overrideCode|takeAlphaType|makeAlphaType|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|firmType|orderCapacity|ssaleFlag|positionType|arriveSSaleFlag|catReportable|catSrcAccntType|catSrcFirmType|catDestDeptType|reviewOrderStatus|maxProgress|mktStance|pointCurrency|productClass|undType|priceFormat|includeSRNetwork'

# 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 = 'altOrderId: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 = 'SpdrParentReport'

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