Schema: MLegOrderGateway (ID: 5155)
Records inserted, updated, or replaced into the MLegOrderGateway 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
Attribute | Value |
---|---|
Topic | 5120-srse-gateway |
MLink Token | Internal |
SRSE Product | SRTrade |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | ticker | TickerKey | |
11= | accnt | string(16) | Will automatically be set to the account associated with DB login |
12= | groupingCode | long | Client supplied order |
13= | orderSide | enum : BuySell | |
14= | clientFirm | string(16) | |
103 | spdrActionType | enum : SpdrActionType | [Add (new order), AddReplace (add or replace order), Cancel (cxl existing), Replace (update existing only), Release (modify order active size)] |
106 | altOrderId | string(24) | Alternate client order ID. This order ID will be copied to all execution reports. |
109 | altAutoHedgeId | string(24) | alternate order ID for child autohedge orders (if any) |
112 | altAccnt | string(32) | alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings] |
115 | altUserName | string(24) | alternate (client assigned) user name (optional) [used to map between client and SR account strings] |
607 | execBrkrCode | string(16) | (optional) override the default execBrkrCode for this order |
121 | strategy | string(36) | Client strategy string. This value will appear on the SR Trade Monitor and in execution reports. |
127 | orderDttm | DateTime | order entry time (from client;if any) |
130 | orderSize | int | parent order size (contracts) [-1 = no change;used when spdrActionType=Release] |
133 | orderActiveSize | int | total activated size (total size released for execution) (-1 = all available size) |
136 | addCumFillQuantity | enum : YesNo | If Yes then OrderSize is calculated @ order arrival as requested OrderSize + existing 'CumFillQuantity'. |
139 | exchMask | uint | eligible exchanges (0 = all) |
142 | maxExposureSize | int | maximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1] |
145 | numMakeExchanges | byte | number 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. |
148 | publicSize | enum : PublicSizeHandling | public 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 |
151 | randomizeSize | enum : YesNo | randomize public order size |
154 | canOverlapCxlRepl | enum : YesNo | can execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order) |
157 | progressRule | enum : ProgressRule | None = all size immediately available;TWAP = size released in time intervals;VWAP = size released in volume intervals; |
160 | twapSliceCnt | byte | [ProgressSliceCnt] number of progress slices to use (default = 4 or 8) [max 20] |
163 | progressExposeTime | int | minimum 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) |
166 | auctionResponder | enum : AuctionResponder | if set, parent order can be an auction responder |
169 | autoHedge | enum : AutoHedge | |
172 | hedgeInstrument | enum : HedgeInst | Default=underlier (EQT or FUT) [Index Options use ETF]; FrontMonth=underlier (EQT) or front month (FUT) [Index Options use FM Fut]; Stock=hedgeSecKey; Future=hedgeSecKey |
175 | hedgeSecKey | ExpiryKey | auto-hedge instrument (either TickerKey or ExpiryKey) |
178 | hedgeBetaRatio | float | Portion of executed $money to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0] |
181 | hedgeScope | enum : HedgeScope | Auto-hedge at the RiskGroup or Accnt level |
596 | hedgeSession | enum : MarketSession | |
187 | cxlUPrcRange | enum : UPrcCxl | cancel parent order if/when outside min/max uPrc range [_Halt = also cancel if the security/underlier has been halted] |
190 | minUBid | float | [optional] |
193 | maxUAsk | float | [optional] (< $0.01 = none) |
196 | minMaxType | enum : MinMaxType | if Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival |
199 | maxChildOrders | int | maximum 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] |
202 | spdrStageType | enum : SpdrStageType | SizeLock = stage pending modification (can reduce size); SizeModify = stage pending modification (can increase/reduce size) |
597 | marketSession | enum : MarketSession | |
208 | startDttm | DateTime | [optional] (parent order start time) |
211 | orderDuration | int | [optional] (number of seconds) |
598 | activeDuration | int | |
214 | goodTillDttm | DateTime | [optional] (default: 2000-01-01) |
217 | startType | enum : StartType | [WaitTrigger] |
223 | parentOrderHandling | enum : ParentOrderHandling | |
226 | parentBalanceHandling | enum : ParentBalanceHandling | |
229 | orderLimitType | enum : SpdrLimitType | Various (Prc, PrcDe, Rel, Market);establishes the primary LimitPrice for a parent order |
232 | takeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit) |
235 | makeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Surface = BEST(LimitPrice, SurfLimit), Probability = BEST(LimitPrice, ProbLimit) |
238 | takeReachRule | enum : ReachRule | None = 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] |
241 | leadSide | enum : BuySell | for legged orders, which side to lead with. (optional, None ok) |
244 | maxCompletionSlippage | double | Maximum price slippage to complete an open basket or a cross auction (face side slippage) |
247 | orderPrcLimit | double | Applies if LimitType = Prc[] |
250 | takeSurfPrcOffset | double | default=0 |
253 | takeSurfVolOffset | float | default=0 |
256 | orderPrcOffset | double | default=0 |
259 | takeAlphaType | enum : AlphaType | Applies if takeLimitClass = Probability |
262 | makeAlphaType | enum : AlphaType | Applies if makeLimitClass = Probability |
265 | takeAlphaFactor | float | [-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if takeAlphaType = Relative] |
268 | makeAlphaFactor | float | [-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if takeAlphaType = Relative] |
271 | takeProbability | float | takeProbLimit = takeProbability [if takeAlphaType = Static] |
274 | makeProbability | float | makeProbLimit = makeProbability [if makeAlphaType = Static] |
277 | firmType | enum : FirmType | Used to override firmType in account config. Default: None (use SpiderRock account configuration). |
280 | stockSide | enum : BuySell | Stock Orde Side (if any). |
283 | ssaleFlag | enum : ShortSaleFlag | Used to determine stock auto-hedge flags. |
286 | stockShares | int | Number of shares in spread package. Default: 0 (none). |
289 | altStkLegID | string(24) | Optional stock leg ID. |
292 | numOptionLegs | byte | The number of valid legs below. The first leg is required and the rest are optional. For each optional leg okey_ and mult_ must be valid values whereas side_ , positionType_ , and legID_ will be assigned default values. |
295 | multihedge | enum : Multihedge | |
298 | optionType | enum : OptionType | |
301 | underliersPerCn | int | Default: 100. |
304 | okey1 | OptionKey | Option symbol for leg #1. Must be a valid option symbol. |
307 | mult1 | ushort | Multiplier for leg #1. Must be greater than zero. |
310 | side1 | enum : BuySell | Order side for leg #1. |
313 | positionType1 | enum : PositionType | Position type for leg #1. |
316 | altLegID1 | string(24) | ID for leg #1. If left blank will be assigned an auto-generated ID. |
319 | okey2 | OptionKey | Option symbol for leg #2. Must be a valid option symbol. |
322 | mult2 | ushort | Multiplier for leg #2. Must be greater than zero. |
325 | side2 | enum : BuySell | Order side for leg #2. |
328 | positionType2 | enum : PositionType | Position type for leg #2. |
331 | altLegID2 | string(24) | ID for leg #2. If left blank will be assigned an auto-generated ID. |
334 | okey3 | OptionKey | Option symbol for leg #3. Must be a valid option symbol. |
337 | mult3 | ushort | Multiplier for leg #3. Must be greater than zero. |
340 | side3 | enum : BuySell | Order side for leg #3. |
343 | positionType3 | enum : PositionType | Position type for leg #3. |
346 | altLegID3 | string(24) | ID for leg #3. If left blank will be assigned an auto-generated ID. |
349 | okey4 | OptionKey | Option symbol for leg #4. Must be a valid option symbol. |
352 | mult4 | ushort | Multiplier for leg #4. Must be greater than zero. |
355 | side4 | enum : BuySell | Order side for leg #4. |
358 | positionType4 | enum : PositionType | Position type for leg #4. |
361 | altLegID4 | string(24) | ID for leg #4. If left blank will be assigned an auto-generated ID. |
364 | okey5 | OptionKey | Option symbol for leg #5. Must be a valid option symbol. |
367 | mult5 | ushort | Multiplier for leg #5. Must be greater than zero. |
370 | side5 | enum : BuySell | Order side for leg #5. |
373 | positionType5 | enum : PositionType | Position type for leg #5. |
376 | altLegID5 | string(24) | ID for leg #5. If left blank will be assigned an auto-generated ID. |
379 | okey6 | OptionKey | Option symbol for leg #6. Must be a valid option symbol. |
382 | mult6 | ushort | Multiplier for leg #6. Must be greater than zero. |
385 | side6 | enum : BuySell | Order side for leg #6. |
388 | positionType6 | enum : PositionType | Position type for leg #6. |
391 | altLegID6 | string(24) | ID for leg #6. If left blank will be assigned an auto-generated ID. |
394 | optPremium | float | The premium for the option legs, a contribution to the order premium. Valid range is [-9999.0, 9999.0]. Default: 0. |
397 | orderRefUPrc | float | The stock reference price, a contribution to the order premium. Default: 0. |
400 | riskGroupId | long | Default: 0 (none). Required to be non-zero if autoHedge is something other than None. |
599 | reqAuxRiskGroupCtrl | enum : YesNo | |
403 | refRMetric1Src | enum : RMetricSource | |
406 | refRMetric2Src | enum : RMetricSource | |
409 | refRMetric3Src | enum : RMetricSource | |
412 | refRMetric4Src | enum : RMetricSource | |
415 | refRMetric5Src | enum : RMetricSource | |
600 | refRMetric6Src | enum : RMetricSource | |
418 | refRMetric7Src | enum : RMetricSource | |
421 | orderRefRMetric1 | float | user supplied RMetric1 value (used in RiskGroupID risk controls) [netRMetric1 = sum(fillQty * orderRefRMetric1 * underlierPerCn)] |
424 | orderRefRMetric2 | float | user supplied RMetric2 value (used in RiskGroupID risk controls) [netRMetric2 = sum(fillQty * orderRefRMetric2 * underlierPerCn)] |
427 | orderRefRMetric3 | float | user supplied RMetric3 value (used in RiskGroupID risk controls) [netRMetric3 = sum(fillQty * orderRefRMetric3 * underlierPerCn)] |
430 | orderRefRMetric4 | float | user supplied RMetric4 value (used in RiskGroupID risk controls) [netRMetric4 = sum(fillQty * orderRefRMetric4 * underlierPerCn)] |
433 | orderRefRMetric5 | float | user supplied RMetric5 value (used in RiskGroupID risk controls) [netRMetric5 = sum(fillQty * orderRefRMetric5 * underlierPerCn)] |
601 | orderRefRMetric6 | float | user supplied RMetric6 value (used in ExpDay risk controls) [netRMetric6 = sum(fillQty * orderRefRMetric6 * underlierPerCn)] |
436 | orderRefRMetric7 | float | user supplied RMetric7 value (used in SymDay risk controls) [netRMetric7 = sum(fillQty * orderRefRMetric7 * underlierPerCn)] |
602 | expDayWtVegaOffset | float | max acct+symbol day wtVega offset (target) |
603 | maxExpDayWtVegaLn | float | max accnt+expiration day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
604 | maxExpDayWtVegaSh | float | max accnt+expiration day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
605 | maxExpDayRMetric6Ln | float | max acct+expiration day rMetric6 long (positive number;-1=no limit);risk limit = max limit - current net counter |
606 | maxExpDayRMetric6Sh | float | max acct+expiration day rMetric6 short (positive number;-1=no limit);risk limit = max limit + current net counter |
481 | symDayDDeltaOffset | float | max acct+symbol day $delta offset (target) |
475 | maxSymDayDDeltaLn | float | max acct+symbol day $delta long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
478 | maxSymDayDDeltaSh | float | max acct+symbol day $delta short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
463 | symDayVegaOffset | float | max acct+symbol day vega offset (target) |
457 | maxSymDayVegaLn | float | max acct+symbol day vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
460 | maxSymDayVegaSh | float | max acct+symbol day vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
472 | symDayWtVegaOffset | float | max acct+symbol day wtVega offset (target) |
466 | maxSymDayWtVegaLn | float | max acct+symbol day (time weighted) vega long (positive number;-1=no limit);risk limit = max limit - (current net counter - offset) |
469 | maxSymDayWtVegaSh | float | max acct+symbol day (time weighted) vega short (positive number;-1=no limit);risk limit = max limit + (current net counter - offset) |
484 | maxSymDayRMetric7Ln | float | max acct+symbol day rMetric7 long (positive number;-1=no limit);risk limit = max limit - current net counter |
487 | maxSymDayRMetric7Sh | float | max acct+symbol day rMetric7 short (positive number;-1=no limit);risk limit = max limit + current net counter |
493 | maxGrpDayDDeltaLn | float | max acct+riskGroup day $delta long (positive number;-1=no limit);risk limit = max limit - current net counter |
496 | maxGrpDayDDeltaSh | float | max acct+riskGroup day $delta short (positive number;-1=no limit);risk limit = max limit + current net counter |
502 | maxGrpDayVegaLn | float | max acct+riskGroup day vega long (positive number;-1=no limit);risk limit = max limit - current net counter |
505 | maxGrpDayVegaSh | float | max acct+riskGroup day vega short (positive number;-1=no limit);risk limit = max limit + current net counter |
508 | maxGrpDayVegaAbs | float | max acct+riskGroup day vega abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
511 | grpDayVegaRatio | float | target bot / sld ratio (eg ratio=2.0 means that neutral is bot vega = 2x sld vega) |
562 | maxGrpDayContractsLn | int | max acct+riskGroup day opt contracts long (positive number;-1=no limit);risk limit = max limit - current net counter |
565 | maxGrpDayContractsSh | int | max acct+riskGroup day opt contracts short (positive number;-1=no limit);risk limit = max limit + current net counter |
568 | maxGrpDayContractsAbs | int | max acct+riskGroup day opt contracts abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
526 | maxGrpDayRMetric1Ln | float | max acct+riskGroup day rMetric1 long (positive number;-1=no limit);risk limit = max limit - current net counter |
529 | maxGrpDayRMetric1Sh | float | max acct+riskGroup day rMetric1 short (positive number;-1=no limit);risk limit = max limit + current net counter |
532 | maxGrpDayRMetric1Abs | float | max acct+riskGroup day rMetric1 abs (positive number;-1=no limit);risk limit = max limit - abs(current net counter) |
535 | grpDayRMetric1Ratio | float | target bot / sld ratio (eg ratio=0.5 means that neutral is bot rMetric1 = 0.5x sld rMetric1) |
538 | maxGrpDayRMetric2Ln | float | max acct+riskGroup day rMetric2 long (positive number;-1=no limit);risk limit = max limit - current net counter |
541 | maxGrpDayRMetric2Sh | float | max acct+riskGroup day rMetric2 short (positive number;-1=no limit);risk limit = max limit + current net counter |
544 | maxGrpDayRMetric3Ln | float | max acct+riskGroup day rMetric3 long (positive number;-1=no limit);risk limit = max limit - current net counter |
547 | maxGrpDayRMetric3Sh | float | max acct+riskGroup day rMetric3 short (positive number;-1=no limit);risk limit = max limit + current net counter |
550 | maxGrpDayRMetric4Ln | float | max acct+riskGroup day rMetric4 long (positive number;-1=no limit);risk limit = max limit - current net counter |
553 | maxGrpDayRMetric4Sh | float | max acct+riskGroup day rMetric4 short (positive number;-1=no limit);risk limit = max limit + current net counter |
556 | maxGrpDayRMetric5Ln | float | max acct+riskGroup day rMetric5 long (positive number;-1=no limit);risk limit = max limit - current net counter |
559 | maxGrpDayRMetric5Sh | float | max acct+riskGroup day rMetric5 short (positive number;-1=no limit);risk limit = max limit + current net counter |
571 | symEmaCxlDDeltaLn | float | max 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] |
574 | symEmaCxlDDeltaSh | float | max acct+symbol 60s EMA $delta short (positive number; <= 0 is no limit) |
577 | symEmaCxlWtVegaLn | float | max 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] |
580 | symEmaCxlWtVegaSh | float | max acct+symbol 60s EMA wtVega short (positive number; <= 0 is no limit) |
583 | traderName | string(32) | Name of the trader associated with the order |
586 | userData1 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops |
589 | userData2 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops |
592 | childData | text1 | client supplied data field; passes through to down stream child orders |
595 | checksum | byte | Must be set to 13. This helps detect some column/value misalignments. |
Get Schema API Call
- Python
- cUrl
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 = 'MLegOrderGateway'
# 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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getschema' \
--data-urlencode 'msgType=MLegOrderGateway'
Get Msg API Call
- Python
- cUrl
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 = 'MLegOrderGateway'
# 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|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsg' \
--data-urlencode 'pkey=ReplaceThisValueForTheQueryToWork' \
--data-urlencode 'msgType=MLegOrderGateway' \
--data-urlencode 'view=spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|checksum' \
--data-urlencode 'where=accnt:eq:ExampleString'
Get Msgs API Call
- Python
- cUrl
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 = 'MLegOrderGateway'
# 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|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsgs' \
--data-urlencode 'msgType=MLegOrderGateway' \
--data-urlencode 'view=spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|checksum' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=spdrActionType:ASC'
Get Aggregate API Call
- Python
- cUrl
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 = 'MLegOrderGateway'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|checksum'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'spdrActionType|addCumFillQuantity|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|auctionResponder|autoHedge|hedgeInstrument|hedgeScope|hedgeSession|cxlUPrcRange|minMaxType|spdrStageType|marketSession|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|takeAlphaType|makeAlphaType|firmType|stockSide|ssaleFlag|multihedge|optionType|side1|positionType1|side2|positionType2|side3|positionType3|side4|positionType4|side5|positionType5|side6|positionType6|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src'
# 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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getaggregate' \
--data-urlencode 'msgType=MLegOrderGateway' \
--data-urlencode 'measure=spdrActionType|altOrderId|altAutoHedgeId|altAccnt|altUserName|execBrkrCode|strategy|orderDttm|orderSize|orderActiveSize|addCumFillQuantity|exchMask|maxExposureSize|numMakeExchanges|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|twapSliceCnt|progressExposeTime|auctionResponder|autoHedge|hedgeInstrument|hedgeSecKey|hedgeBetaRatio|hedgeScope|hedgeSession|cxlUPrcRange|minUBid|maxUAsk|minMaxType|maxChildOrders|spdrStageType|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|maxCompletionSlippage|orderPrcLimit|takeSurfPrcOffset|takeSurfVolOffset|orderPrcOffset|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|firmType|stockSide|ssaleFlag|stockShares|altStkLegID|numOptionLegs|multihedge|optionType|underliersPerCn|okey1|mult1|side1|positionType1|altLegID1|okey2|mult2|side2|positionType2|altLegID2|okey3|mult3|side3|positionType3|altLegID3|okey4|mult4|side4|positionType4|altLegID4|okey5|mult5|side5|positionType5|altLegID5|okey6|mult6|side6|positionType6|altLegID6|optPremium|orderRefUPrc|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|checksum' \
--data-urlencode 'group=spdrActionType|addCumFillQuantity|publicSize|randomizeSize|canOverlapCxlRepl|progressRule|auctionResponder|autoHedge|hedgeInstrument|hedgeScope|hedgeSession|cxlUPrcRange|minMaxType|spdrStageType|marketSession|startType|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|takeReachRule|leadSide|takeAlphaType|makeAlphaType|firmType|stockSide|ssaleFlag|multihedge|optionType|side1|positionType1|side2|positionType2|side3|positionType3|side4|positionType4|side5|positionType5|side6|positionType6|reqAuxRiskGroupCtrl|refRMetric1Src|refRMetric2Src|refRMetric3Src|refRMetric4Src|refRMetric5Src|refRMetric6Src|refRMetric7Src' \
--data-urlencode 'where=accnt:eq:ExampleString'
Get Count API Call
- Python
- cUrl
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 = 'MLegOrderGateway'
# 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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getcount' \
--data-urlencode 'msgType=MLegOrderGateway' \
--data-urlencode 'where=accnt:eq:ExampleString'