Schema: SpdrParentBrkrState (ID: 4070)
SpdrParentBrkrState records are created/published by SpiderRock Execution Engines. Each record describes the current state of one (or more) parent orders. If a parent order is canceled/replaced then entire chain is represented by a single broker state record.
METADATA
| Attribute | Value |
|---|---|
| Topic | 3985-parent-orders |
| MLink Token | ClientTrading |
| SRSE Product | SRTrade |
Note: The symbol
=next to a field number indicates that it is a primary key.
BODY
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 10= | accnt | string(16) | ||
| 11= | secKey | OptionKey | ||
| 12= | secType | enum : SpdrKeyType | ||
| 13= | spdrSource | enum : SpdrSource | ||
| 14= | groupingCode | long | ||
| 15= | orderSide | enum : BuySell | ||
| 16= | clientFirm | string(16) | SR client firm | |
| 100 | userName | string(24) | SR user name string | |
| 106 | parentNumber | long | SR parent number | |
| 109 | baseParentNumber | long | ||
| 596 | modifyNumber | long | most recent parent number affecting this order (AddReplace or Modify) | |
| 604 | noticeNumber | long | SR noticeNumber [required when parentOrderHandling = AtsResponse | |
| 112 | riskGroupId | long | all orders with the same riskGroupId share a common set of risk counters;.Grp. risk limits apply to these shared counters | |
| 115 | triggerGroupId | long | ||
| 613 | completionType | enum : CompletionType | None, DAC, POC, TAS, TACO, BTIC | |
| 614 | completionState | enum : CompletionState | None, Pending, Complete | |
| 615 | avgCompletionPrice | double | completion trade price (final trade price) [also avg completion price] | |
| 616 | completionSecKey | OptionKey | final settlement secKey (contract that DAC, TAS, TACO, etc. will convert to; might not be valid until completed) | |
| 617 | completionSecType | enum : SpdrKeyType | usually Future or Option (None if not yet valid) | |
| 118 | strategy | string(36) | parent order strategy string (can be user supplied) | |
| 608 | strategyAccnt | string(16) | SR strategy account (option; if exists will be validated) | |
| 606 | execBrkrCode | string(16) | execBrkrCode attached to parent order (if any) | |
| 121 | altOrderId | text1 | alternate order ID (usually clOrdId from client) | |
| 124 | packageId | long | groups related order/brokers together (eg. Legger w/MLeg Parent) | |
| 127 | altAccnt | text1 | alternate (client assigned) "long" account string (optional) | |
| 130 | altUserName | string(24) | alternate (client assigned) user name (optional) | |
| 133 | stageType | enum : SpdrStageType | parent is a staged order [ToolVisible] | |
| 136 | isFlagged | enum : YesNo | broker state records is flagged for action (user alert only) | |
| 139 | ticker | TickerKey | underlier ticker | |
| 142 | uPrc | double | underlier price (usually mid-market) | |
| 145 | uPrcOrder | double | underlier price at the time of last parent order arrival | |
| 148 | nbboBid | double | current option nbbo bid (at time of record publish) | |
| 151 | nbboAsk | double | current option nbbo ask (at time of record publish) | |
| 154 | nbboBidSz | int | current option nbbo cum bid size (at time of record publish) | |
| 157 | nbboAskSz | int | current option nbbo cum ask size (at time of record publish) | |
| 160 | surfacePrc | float | SR surface price @ record publish | |
| 163 | surfaceVol | float | SR surface volatility @ record publish | |
| 166 | orderRefSDiv | float | ||
| 169 | orderRefSDivType | enum : RefSDivType | ||
| 172 | spdrBrokerStatus | enum : SpdrBrokerStatus | ||
| 175 | spdrOrderStatus | enum : SpdrOrderStatus | status of the most recent parent order handled by this broker | |
| 178 | spdrCloseReason | enum : SpdrCloseReason | close reason of most recent parent order | |
| 181 | spdrRejectReason | enum : SpdrRejectReason | reject reason (if any) of most recent parent order | |
| 599 | spdrRejectLevel | enum : SpdrRiskLevel | reject level (if any) of most recent parent order | |
| 618 | activeHoldState | enum : ActiveHoldState | ||
| 619 | activeHoldReason | text1 | ||
| 184 | isPermanentlyClosed | enum : YesNo | indicates that this broker is permanently closed (cannot be cxl/replaced or re-opened) [auto-hedge orders only] | |
| 187 | numExternRiskHold | int | num external risk management rejects received | |
| 190 | lastExternRiskText | text1 | last external (exch?) risk management reject | |
| 193 | lastExternRiskReject | DateTime | ||
| 196 | spdrComment | text1 | ||
| 199 | orderSize | int | order size of most recent parent order | |
| 202 | orderActiveSize | int | total activated size (total size released for execution) (-1 = all available size) | |
| 600 | activeDuration | int | [optional] (number of seconds) | |
| 205 | updateDttm | DateTime | ||
| 208 | goodTillDttm | DateTime | order expiration date/time (most recent parent order in cxl/replace chain) | |
| 211 | leavesQuantity | int | current child order leaves quantity (quantity actively working in the market;all child orders) | |
| 214 | avgFillPrice | double | average fill price | |
| 217 | avgFillUPrice | double | average fill underlier price | |
| 220 | cumFillQuantity | int | cumulative fill quantity | |
| 223 | avgFillVol | float | average fill volatility | |
| 226 | cumFillVega | float | cumulative fill vega | |
| 229 | cumFillTheta | float | cumulative fill theta | |
| 232 | cumFillDDelta | float | cumulative fill $Delta | |
| 235 | cumExchFee | float | cumulative fill exch fee | |
| 238 | cumM10Pnl | float | ||
| 241 | cumArrivalPnl | float | ||
| 244 | lastFillDttm | DateTime | ||
| 612 | locateFirm | string(6) | firm granting the locate (also locate firm used on street FIX orders) | |
| 247 | riskLimitSize | int | risk limit size (maximum size to nearest risk limit) | |
| 250 | riskLimitDesc | enum : SpdrRisk | reason for size reduction | |
| 601 | riskLimitLevel | enum : SpdrRiskLevel | risk limit level responsible for reduction | |
| 602 | riskLimitDetail | text1 | risk limit detail | |
| 253 | limitPrice | double | simple limit | |
| 605 | limitRefUPrc | double | ||
| 256 | limitErr | enum : LimitError | ||
| 259 | limitErrDesc | text1 | ||
| 262 | bestLimitOffset | float | (possible price improvement) (gap between best price and init/limit price) (Face/Matrix orders) | |
| 265 | makeProbLimit | float | ||
| 268 | makeSurfOffset | float | ||
| 271 | makeLimitPrice | double | make limit | |
| 274 | makeLimitErr | enum : LimitError | ||
| 277 | takeProbLimit | float | ||
| 280 | takeSurfOffset | float | ||
| 283 | takeLimitPrice | double | take limit | |
| 286 | takeLimitErr | enum : LimitError | ||
| 289 | autoHedge | enum : AutoHedge | ||
| 292 | hedgeInstrument | enum : HedgeInst | auto-hedge instrument (from parent order) | |
| 295 | hedgeSecKey | ExpiryKey | auto-hedge sec key (if any) | |
| 298 | hedgeSecType | enum : SpdrKeyType | auto-hedge sec type (Stock or Future) | |
| 301 | hedgeBetaRatio | float | auto-hedge ratio [from parent order (if supplied) or computed by SR] | |
| 304 | hedgeScope | enum : HedgeScope | hedge group scope [RiskGroup or Accnt] | |
| 603 | hedgeSession | enum : MarketSession | market session for the autohedge order | |
| 607 | externHedgeExDest | string(16) | external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type (eg. #Nighthawk) | |
| 313 | externHedgeParams | text1 | external algo names/parameters (usually just an algo name) # usually copied from the FixRoutingTable.externParams | |
| 609 | hedgeFillUMarkLmtPrc | enum : YesNo | set a price limit on the autohedge order based on the most recent option fillUMark | |
| 316 | userData1 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops | |
| 319 | userData2 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops | |
| 322 | maxProgress | enum : MaxProgress | maximum point of progress for most recent parent order | |
| 325 | maxProgressDetail | text1 | additional detail on point of maximum progress | |
| 328 | maxProgressTime | DateTime | time of last max progress advance | |
| 331 | brokerState | enum : BrokerState | broker monitor state | |
| 334 | brokerCounter | int | number of times order checked by broker monitor (note: most checks result in no action)] | |
| 337 | makeState | enum : AlgoState | [enum] current state of non-marketable order handler (maker) | |
| 340 | makeCounter | int | number of times order checked by post handler (note: most checks result in no action) | |
| 343 | takeState | enum : AlgoState | [enum] current state of marketable order handler (taker) | |
| 346 | takeCounter | int | number of times order checked by take handler (note: most checks result in no action) | |
| 349 | mktRespState | enum : MktRespState | [enum] current state of response handler (if any) | |
| 352 | mktRespCounter | int | number of times order checked by market response handler (note: most checks result in no action) | |
| 355 | mktCrossState | enum : MktCrossState | [enum] current state of mkt cross handler (if any) | |
| 358 | mktCrossCounter | int | number of times order checked by market cross handler (note: most checks result in no action) | |
| 361 | progressRuleDetail | text1 | Twap/Vwap progress detail | |
| 364 | lastChildEvent | enum : ChildEvent | [enum] last event code from broker/child order handler(s) | |
| 367 | lastChildRejectDttm | DateTime | last child order reject dttm (if any) | |
| 370 | lastChildRejectText | text1 | last child order reject reason/text (if any) | |
| 373 | spdrMktState | enum : SpdrMarketState | [enum] market state | |
| 376 | cpx1 | float | child price level #1 | |
| 379 | csz1 | int | cumulative size represented at this price | |
| 610 | cex1 | long | bit mask of all exchanges where we are at this price | |
| 385 | cnt1 | byte | number of child orders at price level #1 | |
| 388 | cpx2 | float | child price level #2 | |
| 391 | csz2 | int | cumulative size represented at this price | |
| 611 | cex2 | long | bit mask of all exchanges where we are at this price | |
| 397 | cnt2 | byte | number of child orders at price level #2 | |
| 400 | cMore | byte | number of additional child orders at inferior prices (if any) | |
| 406 | cnVol | float | ||
| 409 | cnYrs | float | ||
| 412 | cnUPrc | float | ||
| 415 | cnDe | float | delta per contract | |
| 418 | cnDd | float | $delta per contract | |
| 421 | cnVe | float | vega per contract | |
| 424 | cnGa | float | ||
| 427 | cnTh | float | ||
| 430 | cnPr | float | premium per contract | |
| 433 | ddMult | float | ||
| 436 | priceFormat | enum : PriceFormat | option price format code | |
| 439 | uPriceFormat | enum : PriceFormat | underlier price format code | |
| 442 | underliersPerCn | int | option delivery underliers per contract | |
| 445 | underlierType | enum : UnderlierType | type of underlier (affects $greek calculations) | |
| 448 | tickValue | float | $NLV value of a single tick change in display premium (pointValue = tickValue / tickSize) | |
| 451 | pointValue | float | $NLV value of a single point change in display premium (pointValue = tickValue / tickSize) | |
| 454 | pointCurrency | enum : Currency | ||
| 511 | theoVol | float | ||
| 514 | theoPrc | float | ||
| 517 | numNewOrders | int | number of child orders generated by this broker (all parent orders) | |
| 520 | numParentLimits | ushort | number of parent limit messages received for this broker | |
| 523 | brokerVwapMark | float | trade weighted average price (duration of parent order) | |
| 526 | brokerVwapUMark | float | option-trade weighted average underlier price (duration of parent order) | |
| 529 | brokerQwapMark | float | average quote mid-market (duration of parent order) | |
| 532 | brokerQwapUMark | float | average underlier quote mid-market (duration of parent order) | |
| 535 | vwapPnL | float | dir * qty * (brokerVwapMark - avgFillPrice) | |
| 538 | vwapDnPnL | float | vwapPnL - uDriftVwapPnL | |
| 541 | uDriftVwapPnL | float | (dir * (de * qty * (brokerVwapUMark - avgFillUPrice))) | |
| 544 | qwapPnL | float | dir * qty * (brokerQwapMark - avgFillPrice) | |
| 547 | qwapDnPnL | float | qwapPnL - uDriftQwapPnL | |
| 550 | uDriftQwapPnL | float | (dir * (de * qty * (brokerQwapUMark - avgFillUPrice))) | |
| 553 | numImprvChld | int | number of child orders that improved an existing market | |
| 556 | activeSeconds | float | number of seconds that the parent order was active | |
| 559 | withSeconds | float | number of seconds with one or more working child orders that are with of nbbo | |
| 562 | aloneSeconds | float | number of seconds with one or more working child orders that make up 100% of nbbo | |
| 565 | workingSeconds | float | number of child order seconds (can be greater than activeSeconds if working on more than one exchange) | |
| 568 | numRiskCancels | int | number of child orders cancels for risk reasons | |
| 571 | riskHoldSeconds | float | number of seconds with parent order active but on risk hold (zero child order risk size) | |
| 574 | riskThrtlSeconds | float | number of seconds with parent order active but in risk throttle condition (temporary hold after fast/mass risk cancel) | |
| 577 | numMakeThrottleSkips | int | number of childs orders not send to market dues to outbound lines being in a queued/throttled state | |
| 580 | sumMakeThrottleDelay | float | cumulative seconds of queue skip delay (seconds that a child order was not in the market dues to outbound lines being in a queued/throttled state) | |
| 583 | uPrcDrift | float | underlier drift (since parent order start) | |
| 586 | sVolDrift | float | surface vol drift (since parent order start) | |
| 589 | updateSrc | enum : UpdateSource | ||
| 592 | numUpdates | int | number of record updates (cumulative for the day) | |
| 595 | timestamp | DateTime | SR system timestamp |
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 = 'SpdrParentBrkrState'
# 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=SpdrParentBrkrState'
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 = 'SpdrParentBrkrState'
# 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|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|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)
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=SpdrParentBrkrState' \
--data-urlencode 'view=userName|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|updateSrc|numUpdates|timestamp' \
--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 = 'SpdrParentBrkrState'
# 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|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|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)
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=SpdrParentBrkrState' \
--data-urlencode 'view=userName|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|updateSrc|numUpdates|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=userName: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 = 'SpdrParentBrkrState'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'userName|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|updateSrc|numUpdates|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'completionType|completionState|completionSecType|stageType|isFlagged|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|isPermanentlyClosed|riskLimitDesc|riskLimitLevel|limitErr|makeLimitErr|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecType|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|maxProgress|brokerState|makeState|takeState|mktRespState|mktCrossState|lastChildEvent|spdrMktState|priceFormat|uPriceFormat|underlierType|pointCurrency|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)
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=SpdrParentBrkrState' \
--data-urlencode 'measure=userName|parentNumber|baseParentNumber|modifyNumber|noticeNumber|riskGroupId|triggerGroupId|completionType|completionState|avgCompletionPrice|completionSecKey|completionSecType|strategy|strategyAccnt|execBrkrCode|altOrderId|packageId|altAccnt|altUserName|stageType|isFlagged|ticker|uPrc|uPrcOrder|nbboBid|nbboAsk|nbboBidSz|nbboAskSz|surfacePrc|surfaceVol|orderRefSDiv|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|activeHoldReason|isPermanentlyClosed|numExternRiskHold|lastExternRiskText|lastExternRiskReject|spdrComment|orderSize|orderActiveSize|activeDuration|updateDttm|goodTillDttm|leavesQuantity|avgFillPrice|avgFillUPrice|cumFillQuantity|avgFillVol|cumFillVega|cumFillTheta|cumFillDDelta|cumExchFee|cumM10Pnl|cumArrivalPnl|lastFillDttm|locateFirm|riskLimitSize|riskLimitDesc|riskLimitLevel|riskLimitDetail|limitPrice|limitRefUPrc|limitErr|limitErrDesc|bestLimitOffset|makeProbLimit|makeSurfOffset|makeLimitPrice|makeLimitErr|takeProbLimit|takeSurfOffset|takeLimitPrice|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecKey|hedgeSecType|hedgeBetaRatio|hedgeScope|hedgeSession|externHedgeExDest|externHedgeParams|hedgeFillUMarkLmtPrc|userData1|userData2|maxProgress|maxProgressDetail|maxProgressTime|brokerState|brokerCounter|makeState|makeCounter|takeState|takeCounter|mktRespState|mktRespCounter|mktCrossState|mktCrossCounter|progressRuleDetail|lastChildEvent|lastChildRejectDttm|lastChildRejectText|spdrMktState|cpx1|csz1|cex1|cnt1|cpx2|csz2|cex2|cnt2|cMore|cnVol|cnYrs|cnUPrc|cnDe|cnDd|cnVe|cnGa|cnTh|cnPr|ddMult|priceFormat|uPriceFormat|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|theoVol|theoPrc|numNewOrders|numParentLimits|brokerVwapMark|brokerVwapUMark|brokerQwapMark|brokerQwapUMark|vwapPnL|vwapDnPnL|uDriftVwapPnL|qwapPnL|qwapDnPnL|uDriftQwapPnL|numImprvChld|activeSeconds|withSeconds|aloneSeconds|workingSeconds|numRiskCancels|riskHoldSeconds|riskThrtlSeconds|numMakeThrottleSkips|sumMakeThrottleDelay|uPrcDrift|sVolDrift|updateSrc|numUpdates|timestamp' \
--data-urlencode 'group=completionType|completionState|completionSecType|stageType|isFlagged|orderRefSDivType|spdrBrokerStatus|spdrOrderStatus|spdrCloseReason|spdrRejectReason|spdrRejectLevel|activeHoldState|isPermanentlyClosed|riskLimitDesc|riskLimitLevel|limitErr|makeLimitErr|takeLimitErr|autoHedge|hedgeInstrument|hedgeSecType|hedgeScope|hedgeSession|hedgeFillUMarkLmtPrc|maxProgress|brokerState|makeState|takeState|mktRespState|mktCrossState|lastChildEvent|spdrMktState|priceFormat|uPriceFormat|underlierType|pointCurrency|updateSrc' \
--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 = 'SpdrParentBrkrState'
# 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=SpdrParentBrkrState' \
--data-urlencode 'where=accnt:eq:ExampleString'