Skip to main content
Version: 8.4.08.4

Schema: SpdrParentOrder (ID: 4095)

SpdrParentOrder records are visible in SRSE immediately after receipt. Parent orders received via FIX, SRSE or SpiderRock GUI tools, or 3rd party vendor systems are all visible in this table.

Parent orders can be for stocks, futures, options or spreads. And they can be one-sided (agency) or two-sided (facilitation) orders. Parent order records should be immutable and not update.

SpdrParentOrder records are published to the SpiderRock elatic cluster on arrival.

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

#FieldTypeComment
10=parentNumberlongSPDR order number
100sysEnvironmentenum : SysEnvironmentoriginal (source) sys environment [Stable, Current, etc]
103runStatusenum : RunStatusoriginal (source) run status [Prod,Beta]
106spdrActionTypeenum : SpdrActionType
109parentShapeenum : SpdrOrderShape
112clientSeqNumInintinbound client seq number (FIX orders only)
115altOrderIdstring(24)alternate order ID (usually clOrdId from client)
118altPrevOrderIdstring(24)alternate prev order ID (usually origClOrdId from client during cxl/replace)
124altAutoHedgeIdstring(24)alternate order ID for child autohedge orders (if any)
127altAccntstring(32)alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings]
130altUserNamestring(24)alternate (client assigned) user name (optional) [used to map between client and SR account strings]
133srcRoutingCodetext1inbound FIX routing code or SRSE/tool server appID (if any)
136packageIdlongreferences spread orderNumber, if a legged spread order or auto-hedge order
139secKeyOptionKeyComposite Security Key
142secTypeenum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
145securityDesctext1additional security description
148accntstring(16)SR trading account
151clientFirmstring(16)SR client firm
154spdrSourceenum : SpdrSource
157groupingCodelongunique broker code;broker.pkey = (key + accnt + spdrSource + groupingCode)
1039execBrkrCodestring(16)overrides the default executing broker for this parent order
163externExDeststring(16)routing code for orders directed to an external order router (default = null); must match an exDest associated with a RouteDefinition
166externParamstext1external algo names/parameters (usually just an algo name)
169strategystring(36)client-supplied strategy string;visible on SpiderRock GUI tools and other order reports.
172userNamestring(24)name of the user entering the order
1031userSourceenum : SpdrSourceSpdrSource of this order (assumed to be the same as spdrSource if None)
178orderDttmDateTimeorder entry time (from client;if any)
181orderSideenum : BuySell
184orderSizeintmaximum fill size (contracts)
187orderActiveSizeinttotal activated size (total size released for execution) (-1 = all available size)
190curCumFillQuantityintset order size = orderSize - Max(0, curCumFillQty - ee.cumFillQty) (used to ensure integrity of submitted cxl/replace orders)
193addCumFillQuantityenum : YesNoIf Yes then OrderSize is calculated @ order arrival as requested OrderSize + existing 'CumFillQuantity'.
196maxExposureSizeintmaximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1]
199numMakeExchangesbytenumber of exchanges (1 - 4) on which to publish public making orders. Effective number might be less than requested number if sufficient exchanges are not available.
202publicSizeenum : 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
205canOverlapCxlReplenum : YesNocan execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order)
208progressRuleenum : ProgressRuleImmediate = all size immediately available; TWAP = work from arrival to expiration; VWAP = work order not faster than participation rate
211blockVisibilityenum : BlockVisibilityfor BlockAuction orders, visibility (to responders) is neither, side only, or side + price
214progressSliceCntbytenumber of slices to use (default = 4 or 8) [max 20]
217progressExposeTimeintminimum 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)
220vwapParticipationfloattarget vwap participation rate (target % of trade activity)
223minMktOnClosePctbyteMinimum pct [0 - 100] of order reserved for the on-close (MOC) auction
226triggerTypeenum : TriggerTypetype of trigger (PrintVol/SurfVol only for options) [print = print or actionable quote]
229triggerLevelfloatstop/trigger level for parent order to go active (can be either a price or vol)
232auctionResponderenum : AuctionResponderif set, parent order can be an auction responder
235maxMakeExchFeefloatmaximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
238maxTakeExchFeefloatmaximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
241incTakeExchFeeenum : IncExchFeeinclude exchange fee in probability and surface based take limit calculations
244incMakeExchFeeenum : IncExchFeeinclude exchange fee in probability and surface based make limit calculations
247makeExchRuleenum : MakeExchRuleActiveMaker exch preference: 'MaxPart' = max participation; 'FeeOrder' = minimize fees [max rebates]; 'ImprvOnly' will only make when improving NBBO; 'RoundRobin' will rotate through exch list; 'ProRataOptim' will post on pro-rata only.
250cxlUPrcRangeenum : UPrcCxlcancel parent order if/when outside the uPrice range [ _Halt = also cancel if halted ]
253minUBidfloat[optional]
256maxUAskfloat[optional] (< $0.01 = none)
259minMaxTypeenum : MinMaxTypeif Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival
262minOptionPxfloat[optional] option price floor for tied to stock orders
265maxChildOrdersintmaximum 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]
268exchMaskuinteligible exchanges (0 = all)
271spdrStageTypeenum : SpdrStageTypenote: stageType != None implies both KeepAlive behavior and makes the order visible on tools
1032marketSessionenum : MarketSession
277startDttmDateTime[optional] (parent order start time)
280orderDurationint[optional] (number of seconds)
1033activeDurationint
283goodTillDttmDateTime[optional] (default: 2099-01-01)
286startTypeenum : StartTypeWaitTrigger associates this order with a triggerGroupId. The initial wave of child orders from the TriggerGroup will be send when a (final) parent order with startType=TriggerAll or when an external trigger signal is received.
289triggerGroupIdlongtriggerGroupId is required if startType=WaitTrigger; note that child orders from all parent orders in the trigger group will be organized and released optimally when the triggerGroup is released
292triggerTimestamplongWaitTrigger trigger timestamp (nanoseconds since epoch)
298parentOrderHandlingenum : ParentOrderHandling
301parentBalanceHandlingenum : ParentBalanceHandling
304orderLimitTypeenum : SpdrLimitType
307takeLimitClassenum : SpdrLimitClassSimple = LimitPrice +/- offset, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit), SurfProb = BEST(LimitPrice, SurfLimit, ProbLimit)
310makeLimitClassenum : SpdrLimitClassSimple = LimitPrice +/- offset, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit), SurfProb = BEST(LimitPrice, SurfLimit, ProbLimit)
313takeReachRuleenum : ReachRuleNone = size 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]
316orderPrcLimitdoubleApplies if LimitType = Prc[]
319orderRefUPrcdoubledefault=underlier.mid
322orderRefDeltafloatdefault=option.delta
325orderRefGammafloatdefault=option.gamma
328orderVolLimitfloatApplies if LimitType = Vol[] [uses SR dividends and borrow rates]
331rateOverridefloatzero = ignore; > zero = override
334sdivOverridefloat
337ddivOverridetext1discrete dividend string override ([yearsToExpiry,divYears:divAmount,divYears:divAmount, ...])
340overrideCodeenum : OverrideCode
343orderPrcOffsetdoubledefault=0 [surface, relX and pegX limit offsets]
346stateModelenum : StateModel
349uStateModelenum : StateModel
352takeAlphaTypeenum : AlphaTypeApplies if takeLimitClass = Probability
355makeAlphaTypeenum : AlphaTypeApplies if makeLimitClass = Probability
358takeAlphaFactorfloat[-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if AlphaType = Relative]
361makeAlphaFactorfloat[-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if AlphaType = Relative]
364takeProbabilityfloattakeProbLimit = takeProbability [if AlphaType = Static]
367makeProbabilityfloatmakeProbLimit = makeProbability [if AlphaType = Static]
370takeSurfPrcOffsetdoubledefault=0
373takeSurfVolOffsetfloatdefault=0
376takeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
379makeSurfPrcOffsetdoubledefault=0
382makeSurfVolOffsetfloatdefault=0
385makeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
388orderRefEventMultfloatexpected underlier abs move (0.01 = 1%) @ orderRefEventDttm
391orderRefEventDttmDateTimeDate/time of the next event. Note that events are usually earnings but are not required to be.
394autoHedgeenum : AutoHedge
397hedgeInstrumentenum : HedgeInstDefault=actual underlier (EQT or FUT) [IndexOptions use ETF]; FrontMonth=actual underlier (EQT) or front month (FUT) [IndexOptions use FM Fut]; Stock=hedgeSecKey.TickerKey; Future=hedgeSecKey.ExpiryKey
400hedgeSecKeyExpiryKeyautohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]
403hedgeBetaRatiofloatportion of executed $money to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0]
406hedgeScopeenum : HedgeScopehedge group scope [RiskGroup or Accnt]
1034hedgeSessionenum : MarketSessionmarket session for the autohedge order [defaults to pOrder.marketSession]
412externHedgeExDeststring(16)external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type (eg. #Nighthawk)
415externHedgeParamstext1external algo names/parameters (usually just an algo name) # usually copied from the FixRoutingTable.externParams
418firmTypeenum : FirmTypeused to override firmType in account config
421orderCapacityenum : OrderCapacity
424positionTypeenum : PositionType
427ssaleFlagenum : ShortSaleFlagused to determine stock auto-hedge flags
430noCrossGroupstring(16)
433exchTraderIdstring(16)
436largeTraderIdstring(16)
439tradingLocationstring(16)
484leadSideenum : BuySellfor legged orders, which side to lead with. (optional, None ok)
487maxCompletionSlippagedoublemaximum price slippage to complete an open basket
490orderRefPremiumfloatreference premium (mleg orders only)
1038noticeNumberlongrequired when parentOrderHandling = BlockResponse
496theoVolfloatclient supplied theoretical volatility (used for markup only)
499clArriveMarkfloatclient specified arrival mark (passed through to ParentExecution; markup only)
502riskGroupIdlongall orders with the same riskGroupId share a common set of risk counters;.Grp. risk limits apply to these shared counters
1036reqAuxRiskGroupCtrlenum : YesNo
442refRMetric1Srcenum : RMetricSource
445refRMetric2Srcenum : RMetricSource
448refRMetric3Srcenum : RMetricSource
451refRMetric4Srcenum : RMetricSource
454refRMetric5Srcenum : RMetricSource
457refRMetric6Srcenum : RMetricSource
460refRMetric7Srcenum : RMetricSource
463orderRefRMetric1floatuser supplied RMetric1 value (used in RiskGroupID risk controls) [netRMetric1 = sum(fillQty * orderRefRMetric1 * underlierPerCn)]
466orderRefRMetric2floatuser supplied RMetric2 value (used in RiskGroupID risk controls) [netRMetric2 = sum(fillQty * orderRefRMetric2 * underlierPerCn)]
469orderRefRMetric3floatuser supplied RMetric3 value (used in RiskGroupID risk controls) [netRMetric3 = sum(fillQty * orderRefRMetric3 * underlierPerCn)]
472orderRefRMetric4floatuser supplied RMetric4 value (used in RiskGroupID risk controls) [netRMetric4 = sum(fillQty * orderRefRMetric4 * underlierPerCn)]
475orderRefRMetric5floatuser supplied RMetric5 value (used in RiskGroupID risk controls) [netRMetric5 = sum(fillQty * orderRefRMetric5 * underlierPerCn)]
478orderRefRMetric6floatuser supplied RMetric6 value (used in ExpDay risk controls) [netRMetric6 = sum(fillQty * orderRefRMetric6 * underlierPerCn)]
481orderRefRMetric7floatuser supplied RMetric7 value (used in SymDay risk controls) [netRMetric7 = sum(fillQty * orderRefRMetric7 * underlierPerCn)]
529expDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
523maxExpDayWtVegaLnfloatmax accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
526maxExpDayWtVegaShfloatmax accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
559maxExpDayRMetric6Lnfloatmax acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter
562maxExpDayRMetric6Shfloatmax acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter
556symDayDDeltaOffsetfloatmax acct+symbol day $delta offset (target)
550maxSymDayDDeltaLnfloatmax acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
553maxSymDayDDeltaShfloatmax acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
538symDayVegaOffsetfloatmax acct+symbol day vega offset (target)
532maxSymDayVegaLnfloatmax acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
535maxSymDayVegaShfloatmax acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
547symDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
541maxSymDayWtVegaLnfloatmax acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
544maxSymDayWtVegaShfloatmax acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
568maxSymDayRMetric7Lnfloatmax acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter
571maxSymDayRMetric7Shfloatmax acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter
577maxGrpDayDDeltaLnfloatmax acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter
580maxGrpDayDDeltaShfloatmax acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter
586maxGrpDayVegaLnfloatmax acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter
589maxGrpDayVegaShfloatmax acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter
592maxGrpDayVegaAbsfloatmax acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
595grpDayVegaRatiofloattarget bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega)
646maxGrpDayContractsLnintmax acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter
649maxGrpDayContractsShintmax acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter
652maxGrpDayContractsAbsintmax acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
610maxGrpDayRMetric1Lnfloatmax acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter
613maxGrpDayRMetric1Shfloatmax acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter
616maxGrpDayRMetric1Absfloatmax acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
619grpDayRMetric1Ratiofloattarget bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1)
622maxGrpDayRMetric2Lnfloatmax acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter
625maxGrpDayRMetric2Shfloatmax acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter
628maxGrpDayRMetric3Lnfloatmax acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter
631maxGrpDayRMetric3Shfloatmax acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter
634maxGrpDayRMetric4Lnfloatmax acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter
637maxGrpDayRMetric4Shfloatmax acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter
640maxGrpDayRMetric5Lnfloatmax acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter
643maxGrpDayRMetric5Shfloatmax acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter
655symEmaCxlDDeltaLnfloatmax acct+symbol 60s EMA $delta long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
658symEmaCxlDDeltaShfloatmax acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit)
661symEmaCxlWtVegaLnfloatmax acct+symbol 60s EMA wtVega long (positive number; <= 0 is no limit) [will immediately cxl all option orders in a symbol if any order in the symbol breaches]
664symEmaCxlWtVegaShfloatmax acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit)
667lastFillDttmDateTime
670userData1text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
673userData2text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
676childDatatext1client supplied data field; passes through to down stream child orders
679srcTimestamplong
682sgwTimestamplong
685timestampDateTime
1037includeSRNetworkenum : InclExclDisclose

REPEATING FIELDS

DirectedCounterParty

FieldTypeComment
697clientFirmstring(16)
700inclExclenum : InclExclDisclose

OrderLegs

FieldTypeComment
754tickerTickerKey
757stockSideenum : BuySell
760stockSharesint
763stockLegIdlong
766altStkLegIdstring(24)
769ssaleFlagenum : ShortSaleFlag
775refUPrcfloat
778numLegsbyte
781secKey1OptionKey
784secType1enum : SpdrKeyType
787mult1ushort
790side1enum : BuySell
793legId1long
796altLegId1string(24)
799posType1enum : PositionType
805ssaleFlag1enum : ShortSaleFlag
811vega1float
814refUPrc1double
817refDelta1float
820refEarnCnt1byte
823secKey2OptionKey
826secType2enum : SpdrKeyType
829mult2ushort
832side2enum : BuySell
835legId2long
838altLegId2string(24)
841posType2enum : PositionType
847ssaleFlag2enum : ShortSaleFlag
853vega2float
856refUPrc2double
859refDelta2float
862refEarnCnt2byte
865secKey3OptionKey
868secType3enum : SpdrKeyType
871mult3ushort
874side3enum : BuySell
877legId3long
880altLegId3string(24)
883posType3enum : PositionType
889ssaleFlag3enum : ShortSaleFlag
895vega3float
898refUPrc3double
901refDelta3float
904refEarnCnt3byte
907secKey4OptionKey
910secType4enum : SpdrKeyType
913mult4ushort
916side4enum : BuySell
919legId4long
922altLegId4string(24)
925posType4enum : PositionType
931ssaleFlag4enum : ShortSaleFlag
937vega4float
940refUPrc4double
943refDelta4float
946refEarnCnt4byte
949secKey5OptionKey
952secType5enum : SpdrKeyType
955mult5ushort
958side5enum : BuySell
961legId5long
964altLegId5string(24)
967posType5enum : PositionType
973ssaleFlag5enum : ShortSaleFlag
979vega5float
982refUPrc5double
985refDelta5float
988refEarnCnt5byte
991secKey6OptionKey
994secType6enum : SpdrKeyType
997mult6ushort
1000side6enum : BuySell
1003legId6long
1006altLegId6string(24)
1009posType6enum : PositionType
1015ssaleFlag6enum : ShortSaleFlag
1021vega6float
1024refUPrc6double
1027refDelta6float
1030refEarnCnt6byte

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

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

# 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 = 'sysEnvironment|runStatus|spdrActionType|parentShape|clientSeqNumIn|altOrderId|altPrevOrderId|altAutoHedgeId|altAccnt|altUserName|srcRoutingCode|packageId|secKey|secType|securityDesc|accnt|clientFirm|spdrSource|groupingCode|execBrkrCode|externExDest|externParams|strategy|userName|userSource|orderDttm|orderSide|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|blockVisibility|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|stateModel|uStateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|firmType|orderCapacity|positionType|ssaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|leadSide|maxCompletionSlippage|orderRefPremium|noticeNumber|theoVol|clArriveMark|riskGroupId|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src|orderRefRMetric1|orderRefRMetric2|orderRefRMetric3|orderRefRMetric4|orderRefRMetric5|orderRefRMetric6|orderRefRMetric7|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|lastFillDttm|userData1|userData2|childData|srcTimestamp|sgwTimestamp|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 = 'SpdrParentOrder'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sysEnvironment|runStatus|spdrActionType|parentShape|clientSeqNumIn|altOrderId|altPrevOrderId|altAutoHedgeId|altAccnt|altUserName|srcRoutingCode|packageId|secKey|secType|securityDesc|accnt|clientFirm|spdrSource|groupingCode|execBrkrCode|externExDest|externParams|strategy|userName|userSource|orderDttm|orderSide|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|blockVisibility|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|stateModel|uStateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|firmType|orderCapacity|positionType|ssaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|leadSide|maxCompletionSlippage|orderRefPremium|noticeNumber|theoVol|clArriveMark|riskGroupId|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src|orderRefRMetric1|orderRefRMetric2|orderRefRMetric3|orderRefRMetric4|orderRefRMetric5|orderRefRMetric6|orderRefRMetric7|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|lastFillDttm|userData1|userData2|childData|srcTimestamp|sgwTimestamp|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 = 'sysEnvironment: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 = 'SpdrParentOrder'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysEnvironment|runStatus|spdrActionType|parentShape|clientSeqNumIn|altOrderId|altPrevOrderId|altAutoHedgeId|altAccnt|altUserName|srcRoutingCode|packageId|secKey|secType|securityDesc|accnt|clientFirm|spdrSource|groupingCode|execBrkrCode|externExDest|externParams|strategy|userName|userSource|orderDttm|orderSide|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|blockVisibility|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|stateModel|uStateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|orderRefEventMult|orderRefEventDttm|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|firmType|orderCapacity|positionType|ssaleFlag|noCrossGroup|exchTraderId|largeTraderId|tradingLocation|leadSide|maxCompletionSlippage|orderRefPremium|noticeNumber|theoVol|clArriveMark|riskGroupId|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src|orderRefRMetric1|orderRefRMetric2|orderRefRMetric3|orderRefRMetric4|orderRefRMetric5|orderRefRMetric6|orderRefRMetric7|expDayWtVegaOffset|maxExpDayWtVegaLn|maxExpDayWtVegaSh|maxExpDayRMetric6Ln|maxExpDayRMetric6Sh|symDayDDeltaOffset|maxSymDayDDeltaLn|maxSymDayDDeltaSh|symDayVegaOffset|maxSymDayVegaLn|maxSymDayVegaSh|symDayWtVegaOffset|maxSymDayWtVegaLn|maxSymDayWtVegaSh|maxSymDayRMetric7Ln|maxSymDayRMetric7Sh|maxGrpDayDDeltaLn|maxGrpDayDDeltaSh|maxGrpDayVegaLn|maxGrpDayVegaSh|maxGrpDayVegaAbs|grpDayVegaRatio|maxGrpDayContractsLn|maxGrpDayContractsSh|maxGrpDayContractsAbs|maxGrpDayRMetric1Ln|maxGrpDayRMetric1Sh|maxGrpDayRMetric1Abs|grpDayRMetric1Ratio|maxGrpDayRMetric2Ln|maxGrpDayRMetric2Sh|maxGrpDayRMetric3Ln|maxGrpDayRMetric3Sh|maxGrpDayRMetric4Ln|maxGrpDayRMetric4Sh|maxGrpDayRMetric5Ln|maxGrpDayRMetric5Sh|symEmaCxlDDeltaLn|symEmaCxlDDeltaSh|symEmaCxlWtVegaLn|symEmaCxlWtVegaSh|lastFillDttm|userData1|userData2|childData|srcTimestamp|sgwTimestamp|timestamp|includeSRNetwork'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysEnvironment|runStatus|spdrActionType|parentShape|secType|spdrSource|userSource|orderSide|addCumFillQuantity|publicSize|canOverlapCxlRepl|progressRule|blockVisibility|triggerType|auctionResponder|incTakeExchFee|incMakeExchFee|makeExchRule|cxlUPrcRange|minMaxType|spdrStageType|marketSession|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|overrideCode|stateModel|uStateModel|takeAlphaType|makeAlphaType|autoHedge|hedgeInstrument|hedgeScope|hedgeSession|firmType|orderCapacity|positionType|ssaleFlag|leadSide|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src|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 = 'SpdrParentOrder'

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