Skip to main content
Version: 8.4.10.4

Schema: SpdrParentBrkrDetail (ID: 4060)

SpdrParentBrkrDetail records are created/published by SpiderRock Execution Engines. Each record describes the current active detail of a single parent broker.

METADATA

AttributeValue
Topic3985-parent-orders
MLink TokenInternal
SRSE ProductSRTrade

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

BODY

#FieldTypeComment
10=accntstring(16)
11=secKeyOptionKey
12=secTypeenum : SpdrKeyType
13=spdrSourceenum : SpdrSource
14=groupingCodelong
15=orderSideenum : BuySell
16=clientFirmstring(16)SR client firm
100userNamestring(24)SR user name string
106engineNametext1server stripe
109parentNumberlongSR parent number
112baseParentNumberlong
115riskGroupIdlongall orders with the same riskGroupId share a common set of risk counters;.Grp. risk limits apply to these shared counters
118triggerGroupIdlong
124strategystring(36)parent order strategy (description only)
581spdrStageTypeenum : SpdrStageTypeparent is a staged order [ToolVisible]
582startTypeenum : StartType
127maxExposureSizeintmaximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1]
130numMakeExchangesbytenumber 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.
133publicSizeenum : PublicSizeHandlingpublic order size handling
136canOverlapCxlReplenum : YesNocan execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order)
139progressRuleenum : ProgressRuleImmediate = all size immediately available;TWAP = size released in time intervals;VWAP = size released in volume intervals;
142progressSliceCntbytenumber of progress slices to use (default = 4 or 8) [max 20]
145progressExposeTimeintminimum 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)
148vwapParticipationfloattarget vwap participation rate (target % of trade activity)
151minMktOnClosePctbyteMinimum pct [0 - 100] of order reserved for the on-close auction
154triggerTypeenum : TriggerTypetype of trigger (PrintVol/SurfVol only for options) [print = print or actionable quote]
157triggerLevelfloatstop/trigger price for parent order to go active
583marketSessionenum : MarketSession
163startDttmDateTime[optional] (parent order start time)
166orderDurationint[optional] (number of seconds)
169goodTillDttmDateTime[optional] (default: 2099-01-01)
584expireDttmDateTimeEE Parent Order Expiry Dttm
172cxlUPrcRangeenum : UPrcCxlcancel spdr order if/when outside stock price range
175minUBidfloat[optional]
178maxUAskfloat[optional] (< $0.01 = none)
181minMaxTypeenum : MinMaxTypeif Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival
184minOptionPxfloat[optional] option price floor for tied to stock orders
187maxChildOrdersintmaximum 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]
190exchMaskuinteligible exchanges (0 = all)
587externExDeststring(16)
586execBrkrCodestring(16)execBrkrCode attached to parent order (if any)
196positionTypeenum : PositionType
199ssaleFlagenum : ShortSaleFlag
202locateQuanintavailable locate quantity (if selling short) @ child order send time
205locateFirmstring(6)firm granting the locate (also locate firm used on street FIX orders)
208locatePoolstring(16)locate pool @ firm granting the locate
211parentOrderHandlingenum : ParentOrderHandling
214parentBalanceHandlingenum : ParentBalanceHandling
217blockVisibilityenum : BlockVisibility
220orderLimitTypeenum : SpdrLimitType
223takeLimitClassenum : SpdrLimitClassSimple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)
226makeLimitClassenum : SpdrLimitClassSimple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)
229takeReachRuleenum : 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]
232orderPrcLimitdoubleApplies if LimitType = Prc[]
235orderRefUPrcdoubledefault=underlier.mid
238orderRefDeltafloatdefault=option.delta
241orderRefGammafloatdefault=option.gamma
244orderRefThetafloat
247orderRefYearsfloat
250orderVolLimitfloatApplies if LimitType = Vol[] [uses SR dividends and borrow rates]
253rateOverridefloatzero = ignore;> zero = override
256sdivOverridefloat
259ddivOverridetext2discrete dividend string override ([yearsToExpiry,divYears:divAmount,divYears:divAmount, ...])
262overrideCodeenum : OverrideCode
265orderPrcOffsetdoubledefault=0
268takeAlphaTypeenum : AlphaTypeApplies if takeLimitClass = Probability
271makeAlphaTypeenum : AlphaTypeApplies if makeLimitClass = Probability
274takeAlphaFactorfloat[-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if takeAlphaType = Relative]
277makeAlphaFactorfloat[-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if makeAlphaType = Relative]
280takeProbabilityfloattakeProbLimit = takeProbability [if takeAlphaType = Static]
283makeProbabilityfloatmakeProbLimit = makeProbability [if makeAlphaType = Static]
286takeSurfPrcOffsetdoubledefault=0
289takeSurfVolOffsetfloatdefault=0
292takeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
295makeSurfPrcOffsetdoubledefault=0
298makeSurfVolOffsetfloatdefault=0
301makeSurfWidthOffsetfloat[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
328expDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
322maxExpDayWtVegaLnfloatmax accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
325maxExpDayWtVegaShfloatmax accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
358maxExpDayRMetric6Lnfloatmax acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter
361maxExpDayRMetric6Shfloatmax acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter
355symDayDDeltaOffsetfloatmax acct+symbol day $delta offset (target)
349maxSymDayDDeltaLnfloatmax acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
352maxSymDayDDeltaShfloatmax acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
337symDayVegaOffsetfloatmax acct+symbol day vega offset (target)
331maxSymDayVegaLnfloatmax acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
334maxSymDayVegaShfloatmax acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
346symDayWtVegaOffsetfloatmax acct+symbol day wtVega offset (target)
340maxSymDayWtVegaLnfloatmax acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
343maxSymDayWtVegaShfloatmax acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
367maxSymDayRMetric7Lnfloatmax acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter
370maxSymDayRMetric7Shfloatmax acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter
376maxGrpDayDDeltaLnfloatmax acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter
379maxGrpDayDDeltaShfloatmax acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter
385maxGrpDayVegaLnfloatmax acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter
388maxGrpDayVegaShfloatmax acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter
391maxGrpDayVegaAbsfloatmax acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
394grpDayVegaRatiofloattarget bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega)
445maxGrpDayContractsLnintmax acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter
448maxGrpDayContractsShintmax acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter
451maxGrpDayContractsAbsintmax acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
409maxGrpDayRMetric1Lnfloatmax acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter
412maxGrpDayRMetric1Shfloatmax acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter
415maxGrpDayRMetric1Absfloatmax acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
418grpDayRMetric1Ratiofloattarget bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1)
421maxGrpDayRMetric2Lnfloatmax acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter
424maxGrpDayRMetric2Shfloatmax acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter
427maxGrpDayRMetric3Lnfloatmax acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter
430maxGrpDayRMetric3Shfloatmax acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter
433maxGrpDayRMetric4Lnfloatmax acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter
436maxGrpDayRMetric4Shfloatmax acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter
439maxGrpDayRMetric5Lnfloatmax acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter
442maxGrpDayRMetric5Shfloatmax acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter
454symEmaCxlDDeltaLnfloatmax 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]
457symEmaCxlDDeltaShfloatmax acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit)
460symEmaCxlWtVegaLnfloatmax 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]
463symEmaCxlWtVegaShfloatmax acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit)
466arriveBiddouble
469arriveAskdouble
472arriveSweepCountintnumber of parent orders arriving with immediately available sweep qty
475arriveSweepOrderQtyinttotal size of all child orders generated due to parent order arrival sweep
478arriveSweepFillQtyinttotal fill size due to parent order arrival sweep
481numSweepChildOrdersintchild orders generated in initial arrival sweep
484auctionLinkinttotal linkage auction contracts while parent order was active
487auctionFaceinttotal facilitation auction contracts while parent order was active
490auctionRespinttotal auction response contracts
493prtActiveCntinttotal print events while parent order was active; [any exchange; all prints]
496prtQtyActiveinttotal quantity printed while parent order was active; [any exchange; all prints]
499prtQtyActiveMnyfloattotal of (quantity printed x print price) while parent order was active
502prtEligibleCntinttotal eligible (public) print events while parent order was active; [any exchange; all eligible prints]
505prtQtyEligibleinttotal eligible (public) quantity printed while parent order was active; [any exchange; all eligible prints]
508prtQtyLimitOKinttotal quantity printed at or better than parent limit while parent was active; SUM(MIN(PrintSize,OpenParentOrderSize)) [any exchange]
511prtQtyCompeteinttotal quantity printed on an exchange on which we had a competitive child order on that exchange; SUM(MIN(PrintSize, OpenChildOrderSize)) [childOrder.exch = print.exch]
514prtQtyAwayChldinttotal quantity printed on an away exchange when we had a competitive child order(s) in the market and the away exchange was competitive prior to the print; SUM(MIN(PrintSize, OpenChildOrderSize)) [childOrder.exch != print.exch]
517prtQtyNoCompeteinttotal quantity printed on an exchange when the print exchange was not competitive prior to the print (non quote-competitive prints)
520prtQtyNoCompNbbointtotal quantity printed on an exchange when the NBBO was not competitive prior to the print (non nbbo-competitive prints)
523mkCheckCntinttotal number of times order was checked for making
526minMkProbfloatmin make probability while broker active
529avgMkProbfloataverage make probability while broker active
532curMkProbfloatcurrent make probability
535tkCheckCntinttotal number of times order was checked for taking
538maxTkProbfloatmax take probability while broker active
541avgTkProbfloataverage take probability while broker active
544curTkProbfloatcurrent take probability
547prtPrbCntinttotal number of print probability records while broker active (all limit types)
550prtPrbCheckintnumber of print probability records with active probability printTake handler
553prtPrbLmtOKintnumber of print probability records that pass broker takeLimit
556tkQtyLmtOKinttotal quantity available to take at parent limit or better while broker active
559avgQteSzRatiofloataverage ratio of child size / nbbo size during the life of the working order when child order is at nbbo
562cntQteSzRatiointsample counter for above [1 second intervals]; qteCnRatio / qteCnRatioCnt = avg of child size / nbbo size while broker active
565minQteWidthfloatminimum quote width during active order window
568avgQteWidthfloataverage quote width (during active order window)
571cntQteWidthint
574updateSrcenum : UpdateSource
577numUpdatesintnumber of record updates (cumulative for the day)
580timestampDateTimeSR system timestamp

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

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

# 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 = 'userName|engineName|parentNumber|baseParentNumber|riskGroupId|triggerGroupId|strategy|spdrStageType|startType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|marketSession|startDttm|orderDuration|goodTillDttm|expireDttm|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|externExDest|execBrkrCode|positionType|ssaleFlag|locateQuan|locateFirm|locatePool|parentOrderHandling|parentBalanceHandling|blockVisibility|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderRefTheta|orderRefYears|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|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|arriveBid|arriveAsk|arriveSweepCount|arriveSweepOrderQty|arriveSweepFillQty|numSweepChildOrders|auctionLink|auctionFace|auctionResp|prtActiveCnt|prtQtyActive|prtQtyActiveMny|prtEligibleCnt|prtQtyEligible|prtQtyLimitOK|prtQtyCompete|prtQtyAwayChld|prtQtyNoCompete|prtQtyNoCompNbbo|mkCheckCnt|minMkProb|avgMkProb|curMkProb|tkCheckCnt|maxTkProb|avgTkProb|curTkProb|prtPrbCnt|prtPrbCheck|prtPrbLmtOK|tkQtyLmtOK|avgQteSzRatio|cntQteSzRatio|minQteWidth|avgQteWidth|cntQteWidth|updateSrc|numUpdates|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:valuse" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getmsg Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsg',
"pkey": PKEY,
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE
}

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

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

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'userName|engineName|parentNumber|baseParentNumber|riskGroupId|triggerGroupId|strategy|spdrStageType|startType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|marketSession|startDttm|orderDuration|goodTillDttm|expireDttm|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|externExDest|execBrkrCode|positionType|ssaleFlag|locateQuan|locateFirm|locatePool|parentOrderHandling|parentBalanceHandling|blockVisibility|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderRefTheta|orderRefYears|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|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|arriveBid|arriveAsk|arriveSweepCount|arriveSweepOrderQty|arriveSweepFillQty|numSweepChildOrders|auctionLink|auctionFace|auctionResp|prtActiveCnt|prtQtyActive|prtQtyActiveMny|prtEligibleCnt|prtQtyEligible|prtQtyLimitOK|prtQtyCompete|prtQtyAwayChld|prtQtyNoCompete|prtQtyNoCompNbbo|mkCheckCnt|minMkProb|avgMkProb|curMkProb|tkCheckCnt|maxTkProb|avgTkProb|curTkProb|prtPrbCnt|prtPrbCheck|prtPrbLmtOK|tkQtyLmtOK|avgQteSzRatio|cntQteSzRatio|minQteWidth|avgQteWidth|cntQteWidth|updateSrc|numUpdates|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

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

# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'userName: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 = 'SpdrParentBrkrDetail'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'userName|engineName|parentNumber|baseParentNumber|riskGroupId|triggerGroupId|strategy|spdrStageType|startType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|triggerType|triggerLevel|marketSession|startDttm|orderDuration|goodTillDttm|expireDttm|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|exchMask|externExDest|execBrkrCode|positionType|ssaleFlag|locateQuan|locateFirm|locatePool|parentOrderHandling|parentBalanceHandling|blockVisibility|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderRefTheta|orderRefYears|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|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|arriveBid|arriveAsk|arriveSweepCount|arriveSweepOrderQty|arriveSweepFillQty|numSweepChildOrders|auctionLink|auctionFace|auctionResp|prtActiveCnt|prtQtyActive|prtQtyActiveMny|prtEligibleCnt|prtQtyEligible|prtQtyLimitOK|prtQtyCompete|prtQtyAwayChld|prtQtyNoCompete|prtQtyNoCompNbbo|mkCheckCnt|minMkProb|avgMkProb|curMkProb|tkCheckCnt|maxTkProb|avgTkProb|curTkProb|prtPrbCnt|prtPrbCheck|prtPrbLmtOK|tkQtyLmtOK|avgQteSzRatio|cntQteSzRatio|minQteWidth|avgQteWidth|cntQteWidth|updateSrc|numUpdates|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'spdrStageType|startType|publicSize|canOverlapCxlRepl|progressRule|triggerType|marketSession|cxlUPrcRange|minMaxType|positionType|ssaleFlag|parentOrderHandling|parentBalanceHandling|blockVisibility|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|overrideCode|takeAlphaType|makeAlphaType|updateSrc'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getaggregate Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getaggregate',
"msgType": MSG_TYPE,
"measure": MEASURE,
"group": GROUP,
# Optional Parameters
"where": WHERE,
}

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

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

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getCount Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getcount',
"msgType": MSG_TYPE,
# Optional Parameters
"where": WHERE,
}

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