Skip to main content
Version: 8.6.3.4

Schema: ParentOrderGatewayExt (ID: 5185)

Records inserted, updated, or replaced into the ParentOrderGatewayExt table are validated and then converted to SpdrParentOrder records and forwarded to the appropriate execution engine for futher processing. Parent orders can be inserted as either active/ready or in a wait start mode that requires subsequent release.

See the SpiderRock Execution Engine concept guide for more details.

METADATA

AttributeValue
Topic5120-srse-gateway
MLink TokenInternal
MLink EndpointMLink-Live
SRSE ProductSRTrade

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

BODY

#FieldTypeDefault ValueComment
10=secKeyOptionKey-EQT-NMS-2000-01-01-0-CSR SecKey
11=secTypeenum : SpdrKeyTypeSR SecKeyType (Stock, Future, or Option)
12=accntstring(16)SR Account (default = primary account associated with SRSE login)
13=orderSideenum : BuySellParent Order Size
14=groupingCodelongParent Grouping Code
15=clientFirmstring(16)
103spdrActionTypeenum : SpdrActionTypeAddReplace[Add (new order), AddReplace (add or replace order), Cancel (cxl existing), Replace (update existing only), Release (modify order active size)]
106altOrderIdstring(24)Alternate client order ID. This order ID will be copied to all execution reports.
109altAutoHedgeIdstring(24)alternate order ID for child autohedge orders (if any)
112altAccntstring(32)alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings]
115altUserNamestring(24)alternate (client assigned) user name (optional) [used to map between client and SR account strings]
118accntRouteCodetext1accntRoute acronym
918execBrkrCodestring(16)
919externExDeststring(16)routing code for orders directed to an external order router (default = null); should match FixRoutingTable.destination (in SR accnt config)
124externParamstext1external algo names/parameters (usually just an algo name)
127strategystring(36)Client strategy string. This value will appear on the SR Trade Monitor and in execution reports.
925strategyAccntstring(16)SR strategy account (option; if exists will be validated)
927visibleInSVenum : YesNoallow order to be visible in SV (do not use for high volume of orders)
133securityDesctext1additional security description
136orderDttmDateTimeorder entry time (from client;if any)
139orderSizeint-1parent order size (contracts) [-1 = no change;used when spdrActionType=Release]
142orderActiveSizeint-1total activated size (total size released for execution) (-1 = all available size)
145curCumFillQuantityintset order size = orderSize - Max(0, curCumFillQty - ee.cumFillQty) (used to ensure integrity of submitted cxl/replace orders)
148addCumFillQuantityenum : YesNoNoIf Yes then OrderSize is calculated @ order arrival as requested OrderSize + existing 'CumFillQuantity'.
928exchMasklong0eligible exchanges (0 = all)
154maxExposureSizeint-1maximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1]
157numMakeExchangesbyte1number 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.
160publicSizeenum : PublicSizeHandlingNonepublic order size handling: None=use default size handling (usually limits public size to 'typical' market size); Randomize=randomize public size; MktSize=expose only 'typical' market size; FullSize=expose entire order size where possible
163randomizeSizeenum : YesNoYesrandomize public order size
166canOverlapCxlReplenum : YesNoNocan execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order)
169progressRuleenum : ProgressRuleNoneNone = all size immediately available;TWAP = size released in time intervals;VWAP = size released in volume intervals;
172twapSliceCntbyte0[ProgressSliceCnt] number of progress slices to use. if none given will compute based on active size and duration. [max 20]
175progressExposeTimeint0minimum 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)
178auctionResponderenum : AuctionResponderNoneif set, parent order can be an auction responder
181maxMakeExchFeefloat0maximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
184maxTakeExchFeefloat0maximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]
187incTakeExchFeeenum : IncExchFeeNoneinclude exchange fee in probability and surface based take limit calculations
190incMakeExchFeeenum : IncExchFeeNoneinclude exchange fee in probability and surface based make limit calculations
193makeExchRuleenum : MakeExchRuleNoneActiveMaker exchange preference rule: 'MaxPart' will pick exchanges to maximize participation; 'FeeOrder' will pick exchanges to minimize fees [maximize rebates]; 'ImprvOnly' will only make when improving NBBO.
196minMktOnClosePctbyte
199triggerTypeenum : TriggerTypetype of trigger (PrintVol/SurfVol only for options) [print = print or actionable quote]
202triggerLevelfloatstop/trigger price for parent order to go active
205cxlUPrcRangeenum : UPrcCxlNonecancel parent order if/when outside min/max uPrc range [_Halt = also cancel if the security/underlier has been halted]
208minUBidfloat0[optional]
211maxUAskfloat0[optional] (< $0.01 = none)
214minMaxTypeenum : MinMaxTypePrcif Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival
217minOptionPxfloat0[optional] option price floor for tied to stock orders
220maxChildOrdersint1000maximum 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]
223spdrStageTypeenum : SpdrStageTypeNoneSizeLock = stage pending modification (can reduce size); SizeModify = stage pending modification (can increase/reduce size)
911marketSessionenum : MarketSessionRegMkt
229startDttmDateTime2000-01-01[optional] (parent order start time)
232orderDurationint-1[optional] (number of seconds)
912activeDurationint-1[optional] (number of seconds)
235goodTillDttmDateTime2000-01-01[optional] (default: 2000-01-01)
238startTypeenum : StartTypeNone[WaitTrigger]
241triggerGroupIdlong-1WaitTrigger group Id; all child orders parent orders with the same triggerGroupId will optimized and released together when the group is triggered; used to effect cross exchange and cross product market ISO and price level sweeps
244triggerTimestamplong0WaitTrigger trigger timestamp (nanoseconds since epoch)
250parentOrderHandlingenum : ParentOrderHandlingActiveTaker
253parentBalanceHandlingenum : ParentBalanceHandlingPostLimit
929atsVisibilityenum : AtsVisibilityNonefor BlockAuction orders, visibility (to responders) is neither, side only, or side + price
921includeSRNetworkenum : InclExclDiscloseNone
256orderLimitTypeenum : SpdrLimitTypeMarketVarious (Prc, PrcDe, Vol, Rel, Market); establishes the primary LimitPrice for a parent order
259takeLimitClassenum : SpdrLimitClassSimpleSimple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)
262makeLimitClassenum : SpdrLimitClassSimpleSimple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit)
265takeReachRuleenum : ReachRuleNoneNone = 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]
913leadSideenum : BuySellNonefor legged orders, which side to lead with. (optional, None ok)
914maxCompletionSlippagedouble0Maximum price slippage to complete an open basket or a cross auction (face side slippage)
268orderPrcLimitdouble0Applies if LimitType = Prc[]
271orderRefUPrcdouble0default=underlier.mid
274orderRefDeltafloat-99default=option.delta
277orderRefGammafloat-99default=option.gamma
280orderVolLimitfloat0Applies if LimitType = Vol[] [uses SR dividends and borrow rates]
283rateOverridefloat-1zero = ignore;> zero = override
286sdivOverridefloat-1Default: 0.
289ddivOverridetext2Discrete dividend string override ([yearsToExpiry,divYears:divAmount,divYears:divAmount, ...])
292overrideCodeenum : OverrideCodeNoneoverride default SR dividend and rate details (only used if LimitType = Vol)
295orderPrcOffsetdouble0default=0
298orderRefEventMultfloat
301orderRefEventDttmDateTime
304takeAlphaTypeenum : AlphaTypeNoneApplies if takeLimitClass = Probability
307makeAlphaTypeenum : AlphaTypeNoneApplies if makeLimitClass = Probability
310takeAlphaFactorfloat0[-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if takeAlphaType = Relative]
313makeAlphaFactorfloat0[-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if makeAlphaType = Relative]
316takeProbabilityfloat0takeProbLimit = takeProbability [if takeAlphaType = Static]
319makeProbabilityfloat0makeProbLimit = makeProbability [if makeAlphaType = Static]
322takeSurfPrcOffsetdouble0default=0
325takeSurfVolOffsetfloat0default=0
328takeSurfWidthOffsetfloat0[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
331makeSurfPrcOffsetdouble0default=0
334makeSurfVolOffsetfloat0default=0
337makeSurfWidthOffsetfloat0[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth
340autoHedgeenum : AutoHedgeNone
343hedgeInstrumentenum : HedgeInstDefaultDefault=underlier (EQT or FUT) [Index Options use ETF]; FrontMonth=underlier (EQT) or front month (FUT) [Index Options use FM Fut]; Stock=hedgeSecKey; Future=hedgeSecKey
346hedgeSecKeyExpiryKey-EQT-NMS-1900-01-01autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]
349hedgeBetaRatiofloat1.0portion of executed $delta to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0])
352hedgeScopeenum : HedgeScopeRiskGroup
915hedgeSessionenum : MarketSessionRegMkt
926hedgeFillUMarkLmtPrcenum : YesNoNoset a price limit on the autohedge order based on the most recent option fillUMark
358positionTypeenum : PositionTypeAuto
361ssaleFlagenum : ShortSaleFlagAutoUsed to determine stock auto-hedge flags.
364firmTypeenum : FirmTypeNoneUsed to override firmType in account config. Default: None (use SpiderRock account configuration).
367theoVolfloat0client supplied theoretical volatility (used for markup only)
412riskGroupIdlong0All group (grp) risk limits below are relative to this riskGroupId. Default: 0 (none). Required to be non-zero if autoHedge is something other than None.
916reqAuxRiskGroupCtrlenum : YesNo
370refRMetric1Srcenum : RMetricSource
373refRMetric2Srcenum : RMetricSource
376refRMetric3Srcenum : RMetricSource
379refRMetric4Srcenum : RMetricSource
382refRMetric5Srcenum : RMetricSource
385refRMetric6Srcenum : RMetricSource
388refRMetric7Srcenum : RMetricSource
391orderRefRMetric1floatuser supplied RMetric1 value (used in RiskGroupID risk controls) [netRMetric1 = sum(fillQty * orderRefRMetric1 * underlierPerCn)]
394orderRefRMetric2floatuser supplied RMetric2 value (used in RiskGroupID risk controls) [netRMetric2 = sum(fillQty * orderRefRMetric2 * underlierPerCn)]
397orderRefRMetric3floatuser supplied RMetric3 value (used in RiskGroupID risk controls) [netRMetric3 = sum(fillQty * orderRefRMetric3 * underlierPerCn)]
400orderRefRMetric4floatuser supplied RMetric4 value (used in RiskGroupID risk controls) [netRMetric4 = sum(fillQty * orderRefRMetric4 * underlierPerCn)]
403orderRefRMetric5floatuser supplied RMetric5 value (used in RiskGroupID risk controls) [netRMetric5 = sum(fillQty * orderRefRMetric5 * underlierPerCn)]
406orderRefRMetric6floatuser supplied RMetric6 value (used in ExpDay risk controls) [netRMetric6 = sum(fillQty * orderRefRMetric6 * underlierPerCn)]
409orderRefRMetric7floatuser supplied RMetric7 value (used in SymDay risk controls) [netRMetric7 = sum(fillQty * orderRefRMetric7 * underlierPerCn)]
439expDayWtVegaOffsetfloat0max acct+symbol day wtVega offset (target)
433maxExpDayWtVegaLnfloat-1max accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
436maxExpDayWtVegaShfloat-1max accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
469maxExpDayRMetric6Lnfloat-1max acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter
472maxExpDayRMetric6Shfloat-1max acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter
466symDayDDeltaOffsetfloat0max acct+symbol day $delta offset (target)
460maxSymDayDDeltaLnfloat-1max acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
463maxSymDayDDeltaShfloat-1max acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
448symDayVegaOffsetfloat0max acct+symbol day vega offset (target)
442maxSymDayVegaLnfloat-1max acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
445maxSymDayVegaShfloat-1max acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
457symDayWtVegaOffsetfloat0max acct+symbol day wtVega offset (target)
451maxSymDayWtVegaLnfloat-1max acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset)
454maxSymDayWtVegaShfloat-1max acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset)
478maxSymDayRMetric7Lnfloat-1max acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter
481maxSymDayRMetric7Shfloat-1max acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter
487maxGrpDayDDeltaLnfloat-1max acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter
490maxGrpDayDDeltaShfloat-1max acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter
493maxGrpDayVegaLnfloat-1max acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter
496maxGrpDayVegaShfloat-1max acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter
499maxGrpDayVegaAbsfloat-1max acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
502grpDayVegaRatiofloat1.0target bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega)
553maxGrpDayContractsLnint-1max acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter
556maxGrpDayContractsShint-1max acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter
559maxGrpDayContractsAbsint-1max acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
517maxGrpDayRMetric1Lnfloat-1max acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter
520maxGrpDayRMetric1Shfloat-1max acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter
523maxGrpDayRMetric1Absfloat-1max acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter)
526grpDayRMetric1Ratiofloat1.0target bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1)
529maxGrpDayRMetric2Lnfloat-1max acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter
532maxGrpDayRMetric2Shfloat-1max acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter
535maxGrpDayRMetric3Lnfloat-1max acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter
538maxGrpDayRMetric3Shfloat-1max acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter
541maxGrpDayRMetric4Lnfloat-1max acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter
544maxGrpDayRMetric4Shfloat-1max acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter
547maxGrpDayRMetric5Lnfloat-1max acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter
550maxGrpDayRMetric5Shfloat-1max acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter
562symEmaCxlDDeltaLnfloat-1max 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]
565symEmaCxlDDeltaShfloat-1max acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit)
568symEmaCxlWtVegaLnfloat-1max 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]
571symEmaCxlWtVegaShfloat-1max acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit)
574traderNamestring(32)Name of the trader associated with the order
577userData1text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
580userData2text1client supplied data field; passes through to parent and child executions and reports as well as FIX drops
583childDatatext1client supplied data field; passes through to down stream child orders
631mlegTickerTickerKey-None-Nonestock ticker
634mlegStockSideenum : BuySellNone[Buy
637mlegStockSharesint0number of shares included (zero if none)
640mlegStockLegIdlong0SR stock leg ID
643mlegAltStkLegIdstring(24)client stock leg ID (usually from a FIX order)
646mlegSSaleFlagenum : ShortSaleFlagNonestock short sale flag
652mlegRefUPrcfloat0reference underlier price (PrcDe orders)
655mlegNumLegsbyte0number of valid legs below
658mlegSecKey1OptionKey-None-None-1900-00-00-0-Cleg #1
661mlegSecType1enum : SpdrKeyTypeNone
664mlegMult1ushort0
667mlegSide1enum : BuySellNone
670mlegLegId1long0SR leg Id
673mlegAltLegId1string(24)client leg Id (usually from a FIX order)
676mlegPosType1enum : PositionTypeNone
682mlegSsaleFlag1enum : ShortSaleFlagNone
688mlegVega1float0
691mlegRefUPrc1double0reference underlier price (PrcDe orders)
694mlegRefDelta1float0reference delta (for PrcDe order handling)
697mlegRefEarnCnt1byte0reference # of earnings moves before expiration
700mlegSecKey2OptionKey-None-None-1900-00-00-0-Cleg #2
703mlegSecType2enum : SpdrKeyTypeNone
706mlegMult2ushort0
709mlegSide2enum : BuySellNone
712mlegLegId2long0SR leg Id
715mlegAltLegId2string(24)client leg Id (usually from a FIX order)
718mlegPosType2enum : PositionTypeNone
724mlegSsaleFlag2enum : ShortSaleFlagNone
730mlegVega2float0
733mlegRefUPrc2double0reference underlier price (PrcDe orders)
736mlegRefDelta2float0reference delta (for PrcDe order handling)
739mlegRefEarnCnt2byte0reference # of earnings moves before expiration
742mlegSecKey3OptionKey-None-None-1900-00-00-0-Cleg #3
745mlegSecType3enum : SpdrKeyTypeNone
748mlegMult3ushort0
751mlegSide3enum : BuySellNone
754mlegLegId3long0SR leg Id
757mlegAltLegId3string(24)client leg Id (usually from a FIX order)
760mlegPosType3enum : PositionTypeNone
766mlegSsaleFlag3enum : ShortSaleFlagNone
772mlegVega3float0
775mlegRefUPrc3double0reference underlier price (PrcDe orders)
778mlegRefDelta3float0reference delta (for PrcDe order handling)
781mlegRefEarnCnt3byte0reference # of earnings moves before expiration
784mlegSecKey4OptionKey-None-None-1900-00-00-0-Cleg #4
787mlegSecType4enum : SpdrKeyTypeNone
790mlegMult4ushort0
793mlegSide4enum : BuySellNone
796mlegLegId4long0SR leg Id
799mlegAltLegId4string(24)client leg Id (usually from a FIX order)
802mlegPosType4enum : PositionTypeNone
808mlegSsaleFlag4enum : ShortSaleFlagNone
814mlegVega4float0
817mlegRefUPrc4double0reference underlier price (PrcDe orders)
820mlegRefDelta4float0reference delta (for PrcDe order handling)
823mlegRefEarnCnt4byte0reference # of earnings moves before expiration
826mlegSecKey5OptionKey-None-None-1900-00-00-0-Cleg #5
829mlegSecType5enum : SpdrKeyTypeNone
832mlegMult5ushort0
835mlegSide5enum : BuySellNone
838mlegLegId5long0SR leg Id
841mlegAltLegId5string(24)client leg Id (usually from a FIX order)
844mlegPosType5enum : PositionTypeNone
850mlegSsaleFlag5enum : ShortSaleFlagNone
856mlegVega5float0
859mlegRefUPrc5double0reference underlier price (PrcDe orders)
862mlegRefDelta5float0reference delta (for PrcDe order handling)
865mlegRefEarnCnt5byte0reference # of earnings moves before expiration
868mlegSecKey6OptionKey-None-None-1900-00-00-0-Cleg #6
871mlegSecType6enum : SpdrKeyTypeNone
874mlegMult6ushort0
877mlegSide6enum : BuySellNone
880mlegLegId6long0SR leg Id
883mlegAltLegId6string(24)client leg Id (usually from a FIX order)
886mlegPosType6enum : PositionTypeNone
892mlegSsaleFlag6enum : ShortSaleFlagNone
898mlegVega6float0
901mlegRefUPrc6double0reference underlier price (PrcDe orders)
904mlegRefDelta6float0reference delta (for PrcDe order handling)
907mlegRefEarnCnt6byte0reference # of earnings moves before expiration
917optPremiumfloat0The premium for the option legs, a contribution to the order premium. Valid range is [-9999.0, 9999.0]. Default: 0.
910checksumbyteMust be set to 13. This helps detect some column/value misalignments.

REPEATING FIELDS

DirectedCounterParty

#FieldTypeDefault ValueComment
923clientFirmstring(16)
924inclExclenum : InclExclDisclose

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

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

# 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 = 'spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|accntRouteCode|execBrkrCode|externExDest|externParams|strategy|strategyAccnt|visibleInSV|securityDesc|orderDttm|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|minMktOnClosePct|triggerType|triggerLevel|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|atsVisibility|includeSRNetwork|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|orderRefEventMult|orderRefEventDttm|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|positionType|ssaleFlag|firmType|theoVol|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|traderName|userData1|userData2|childData|mlegTicker|mlegStockSide|mlegStockShares|mlegStockLegId|mlegAltStkLegId|mlegSSaleFlag|mlegRefUPrc|mlegNumLegs|mlegSecKey1|mlegSecType1|mlegMult1|mlegSide1|mlegLegId1|mlegAltLegId1|mlegPosType1|mlegSsaleFlag1|mlegVega1|mlegRefUPrc1|mlegRefDelta1|mlegRefEarnCnt1|mlegSecKey2|mlegSecType2|mlegMult2|mlegSide2|mlegLegId2|mlegAltLegId2|mlegPosType2|mlegSsaleFlag2|mlegVega2|mlegRefUPrc2|mlegRefDelta2|mlegRefEarnCnt2|mlegSecKey3|mlegSecType3|mlegMult3|mlegSide3|mlegLegId3|mlegAltLegId3|mlegPosType3|mlegSsaleFlag3|mlegVega3|mlegRefUPrc3|mlegRefDelta3|mlegRefEarnCnt3|mlegSecKey4|mlegSecType4|mlegMult4|mlegSide4|mlegLegId4|mlegAltLegId4|mlegPosType4|mlegSsaleFlag4|mlegVega4|mlegRefUPrc4|mlegRefDelta4|mlegRefEarnCnt4|mlegSecKey5|mlegSecType5|mlegMult5|mlegSide5|mlegLegId5|mlegAltLegId5|mlegPosType5|mlegSsaleFlag5|mlegVega5|mlegRefUPrc5|mlegRefDelta5|mlegRefEarnCnt5|mlegSecKey6|mlegSecType6|mlegMult6|mlegSide6|mlegLegId6|mlegAltLegId6|mlegPosType6|mlegSsaleFlag6|mlegVega6|mlegRefUPrc6|mlegRefDelta6|mlegRefEarnCnt6|optPremium|checksum'

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

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|accntRouteCode|execBrkrCode|externExDest|externParams|strategy|strategyAccnt|visibleInSV|securityDesc|orderDttm|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|minMktOnClosePct|triggerType|triggerLevel|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|atsVisibility|includeSRNetwork|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|orderRefEventMult|orderRefEventDttm|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|positionType|ssaleFlag|firmType|theoVol|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|traderName|userData1|userData2|childData|mlegTicker|mlegStockSide|mlegStockShares|mlegStockLegId|mlegAltStkLegId|mlegSSaleFlag|mlegRefUPrc|mlegNumLegs|mlegSecKey1|mlegSecType1|mlegMult1|mlegSide1|mlegLegId1|mlegAltLegId1|mlegPosType1|mlegSsaleFlag1|mlegVega1|mlegRefUPrc1|mlegRefDelta1|mlegRefEarnCnt1|mlegSecKey2|mlegSecType2|mlegMult2|mlegSide2|mlegLegId2|mlegAltLegId2|mlegPosType2|mlegSsaleFlag2|mlegVega2|mlegRefUPrc2|mlegRefDelta2|mlegRefEarnCnt2|mlegSecKey3|mlegSecType3|mlegMult3|mlegSide3|mlegLegId3|mlegAltLegId3|mlegPosType3|mlegSsaleFlag3|mlegVega3|mlegRefUPrc3|mlegRefDelta3|mlegRefEarnCnt3|mlegSecKey4|mlegSecType4|mlegMult4|mlegSide4|mlegLegId4|mlegAltLegId4|mlegPosType4|mlegSsaleFlag4|mlegVega4|mlegRefUPrc4|mlegRefDelta4|mlegRefEarnCnt4|mlegSecKey5|mlegSecType5|mlegMult5|mlegSide5|mlegLegId5|mlegAltLegId5|mlegPosType5|mlegSsaleFlag5|mlegVega5|mlegRefUPrc5|mlegRefDelta5|mlegRefEarnCnt5|mlegSecKey6|mlegSecType6|mlegMult6|mlegSide6|mlegLegId6|mlegAltLegId6|mlegPosType6|mlegSsaleFlag6|mlegVega6|mlegRefUPrc6|mlegRefDelta6|mlegRefEarnCnt6|optPremium|checksum'

# 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 = 'spdrActionType: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 = 'ParentOrderGatewayExt'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|accntRouteCode|execBrkrCode|externExDest|externParams|strategy|strategyAccnt|visibleInSV|securityDesc|orderDttm|orderSize|orderActiveSize|curCumFillQuantity|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|minMktOnClosePct|triggerType|triggerLevel|cxlUPrcRange|minUBid|maxUAsk|minMaxType|minOptionPx|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|triggerGroupId|triggerTimestamp|parentOrderHandling|parentBalanceHandling|atsVisibility|includeSRNetwork|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|orderRefUPrc|orderRefDelta|orderRefGamma|orderVolLimit|rateOverride|sdivOverride|ddivOverride|overrideCode|orderPrcOffset|orderRefEventMult|orderRefEventDttm|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|takeSurfPrcOffset|takeSurfVolOffset|takeSurfWidthOffset|makeSurfPrcOffset|makeSurfVolOffset|makeSurfWidthOffset|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|positionType|ssaleFlag|firmType|theoVol|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|traderName|userData1|userData2|childData|mlegTicker|mlegStockSide|mlegStockShares|mlegStockLegId|mlegAltStkLegId|mlegSSaleFlag|mlegRefUPrc|mlegNumLegs|mlegSecKey1|mlegSecType1|mlegMult1|mlegSide1|mlegLegId1|mlegAltLegId1|mlegPosType1|mlegSsaleFlag1|mlegVega1|mlegRefUPrc1|mlegRefDelta1|mlegRefEarnCnt1|mlegSecKey2|mlegSecType2|mlegMult2|mlegSide2|mlegLegId2|mlegAltLegId2|mlegPosType2|mlegSsaleFlag2|mlegVega2|mlegRefUPrc2|mlegRefDelta2|mlegRefEarnCnt2|mlegSecKey3|mlegSecType3|mlegMult3|mlegSide3|mlegLegId3|mlegAltLegId3|mlegPosType3|mlegSsaleFlag3|mlegVega3|mlegRefUPrc3|mlegRefDelta3|mlegRefEarnCnt3|mlegSecKey4|mlegSecType4|mlegMult4|mlegSide4|mlegLegId4|mlegAltLegId4|mlegPosType4|mlegSsaleFlag4|mlegVega4|mlegRefUPrc4|mlegRefDelta4|mlegRefEarnCnt4|mlegSecKey5|mlegSecType5|mlegMult5|mlegSide5|mlegLegId5|mlegAltLegId5|mlegPosType5|mlegSsaleFlag5|mlegVega5|mlegRefUPrc5|mlegRefDelta5|mlegRefEarnCnt5|mlegSecKey6|mlegSecType6|mlegMult6|mlegSide6|mlegLegId6|mlegAltLegId6|mlegPosType6|mlegSsaleFlag6|mlegVega6|mlegRefUPrc6|mlegRefDelta6|mlegRefEarnCnt6|optPremium|checksum'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'spdrActionType|visibleInSV|addCumFillQuantity|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|auctionResponder|incTakeExchFee|incMakeExchFee|makeExchRule|triggerType|cxlUPrcRange|minMaxType|spdrStageType|marketSession|startType|parentOrderHandling|parentBalanceHandling|atsVisibility|includeSRNetwork|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|overrideCode|takeAlphaType|makeAlphaType|autoHedge|hedgeInstrument|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|positionType|ssaleFlag|firmType|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src|mlegStockSide|mlegSSaleFlag|mlegSecType1|mlegSide1|mlegPosType1|mlegSsaleFlag1|mlegSecType2|mlegSide2|mlegPosType2|mlegSsaleFlag2|mlegSecType3|mlegSide3|mlegPosType3|mlegSsaleFlag3|mlegSecType4|mlegSide4|mlegPosType4|mlegSsaleFlag4|mlegSecType5|mlegSide5|mlegPosType5|mlegSsaleFlag5|mlegSecType6|mlegSide6|mlegPosType6|mlegSsaleFlag6'

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

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