Schema: TradeCubeDetailV5 (ID: 4870)
TradeCubeDetail records are published by CoreRiskServers and are visible in SRSE throughout the day. They are designed to be aggregated and analyzed over time.
TradeCubeDetail records are published to the SpiderRock Archive Host data pipeline after all markup detail is complete.
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
SRSE Product | SRRisk |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | fillNumber | long | SpiderRock execution number (globally unique over trailing 10 days) |
11= | tradeDate | DateKey | trade date |
100 | runStatus | enum : RunStatus | |
103 | sysEnvironment | enum : SysEnvironment | |
106 | version | byte | record version number; starts at zero and goes up every time an execution record is re-published (eg, bust, +1m marks, +10m marks, etc) |
109 | clOrdId | string(24) | clOrdId resulting in fill (child order) |
112 | parentNumber | long | SpiderRock parent number |
115 | packageId | long | groups related order/brokers together (eg. Legger w/MLeg Parent) |
118 | altOrderId | string(24) | alternate order ID (usually clOrdId from client) |
121 | srcRoutingCode | text1 | inbound FIX routing code, if any |
124 | spdrSource | enum : SpdrSource | SpiderRock parent order source code [broker pkey] |
127 | groupingCode | long | SpiderRock parent broker number [broker pkey] |
130 | accnt | string(16) | SpiderRock Accnt Code |
133 | clientFirm | string(16) | SpiderRock ClientFirm Code |
136 | priAggGroup | string(16) | primary aggregation group |
139 | secAggGroup | string(16) | secondary aggregation group |
145 | secKey | OptionKey | security key |
148 | secType | enum : SpdrKeyType | security type [Stock, Future, Option] |
151 | ticker | TickerKey | base ticker |
154 | viewGroup1 | string(12) | viewGroup1 (user supplied; if any) |
157 | viewGroup2 | string(12) | viewGroup2 (user supplied; if any) |
160 | viewGroup3 | string(12) | viewGroup3 (user supplied; if any) |
163 | riskClass | string(8) | user supplied risk class code (from SymbolControl record) |
166 | symbolType | enum : SymbolType | symbol type |
169 | sector | string(16) | user supplied sector code (from SymbolControl record) |
172 | indNum | int | ind num (00) |
175 | subNum | int | sub num (0000) |
178 | grpNum | int | grp num (000000) |
181 | nbrNum | int | nbr num (00000000) |
184 | edays | short | days to next earnings [-5, +60] |
187 | expCode | enum : ExpCode | expiration tenor code |
190 | skewCode | enum : SkewCode | strike skew code |
193 | widthCode | enum : WidthCode | market width code |
196 | priceFormat | enum : PriceFormat | SpiderRock price display format code |
199 | uPriceFormat | enum : PriceFormat | SpiderRock underlier price display code |
202 | years | float | years to expiration |
205 | underliersPerCn | int | underliers per contract (futures and options) |
208 | underlierType | enum : UnderlierType | underlier type (affects $greek calcs) |
211 | tickValue | float | $NLV value of a single tick change in display premium (pointValue = tickValue / tickSize) |
214 | pointValue | float | $NLV value of a point |
217 | pointCurrency | enum : Currency | |
220 | uPrcRatio | float | UPrcRatio (SymbolRatio) from product definition |
223 | minTickSize | float | |
226 | routingCode | text1 | SpiderRock market routing code |
229 | origExecID | string(20) | original execution ID string (child order) |
232 | lastExecID | string(20) | most recent execution ID (same as origExecID unless CANCEL/CORRECTION has been processed) |
235 | transactDttm | DateTime | transaction date/time as reported by exchange or down stream broker |
238 | execStatus | enum : ExecStatus | SpiderRock execution status (Fill,Bust,Correct,Reject,SysRej) |
241 | remoteText | string(64) | text comment from endpoint (if any) |
244 | orderLimitType | enum : SpdrLimitType | parent order limit type [Vol, VolX, PrcDe, PrcDeX, etc] |
247 | orderLimitClass | enum : SpdrLimitClass | parent order limit class (makeLimitClass if fill was from making; takeLimitClass if fill was from taking) |
250 | parentShape | enum : SpdrOrderShape | |
253 | parentOrderHandling | enum : ParentOrderHandling | base parent order algo [take style algo] |
256 | parentBalanceHandling | enum : ParentBalanceHandling | base parent order balance handling [make style algo] |
259 | parentOrderSize | int | parent order size |
262 | method | string(16) | execution method string |
265 | strategy | string(36) | client strategy [usually client supplied] |
268 | userName | string(24) | SpiderRock user name associated with the parent order |
271 | origin | string(16) | parent order origin string |
274 | source | string(16) | execution source string |
277 | server | string(20) | SpiderRock execution engine that handled the parent order |
280 | clearingFirm | string(8) | clearing firm (delivery) |
283 | clearingAccnt | string(16) | clearing firm account (if any) |
286 | lastCapacity | enum : OrderCapacity | child order capacity |
289 | execRole | enum : ExecRole | SpiderRock relationship to this execution record (Direct, Drop, etc) |
705 | execBrkrCode | string(16) | SR exec broker acronym |
295 | execBrkrAccnt | string(16) | account at executing broker/prime (if any) |
298 | execBrkrClFirm | string(16) | client/firm at executing broker/prime (if any) |
301 | execBrkrUserName | string(16) | |
304 | clearingFlipType | enum : FlipType | clearingFlip Type (CMTA or Giveup) |
307 | clearingFlipFirm | string(6) | clearingFlip Broker/MPID/CMTA |
310 | clearingFlipAccnt | string(10) | clearingFlip additional detail (sub-accnt) |
313 | riskGroupId | long | riskGroupId (parent order group ID) for this execution report |
316 | fillBrkrRate | float | billing brokerage rate (tier 1) |
319 | fillRoutingRate | float | billing routing rate (tier 1) |
322 | billingSecType | enum : BillingSecType | SpiderRock billing security type |
325 | billingCategory | enum : BillingCategory | SpiderRock billing category |
328 | firmType | enum : FirmType | chld order firm type [Customer, ProCust, Firm, MM, etc] |
331 | side | enum : BuySell | parent/child order side |
334 | priceType | enum : PriceType | order limit price type |
337 | ssaleFlag | enum : ShortSaleFlag | child order short sale flag |
340 | spdrSSaleFlag | enum : ShortSaleFlag | parent order short sale flag |
343 | positionType | enum : PositionType | child order position type |
346 | autoHedge | enum : AutoHedge | SpiderRock auto-hedge algorithm (if any) |
349 | orderDttm | DateTime | Date/time of parent order arrival |
352 | orderUBid | double | underlier market bid @ parent order arrival |
355 | orderUAsk | double | underlier market ask @ parent order arrival |
358 | orderBid | double | option market bid @ parent order arrival (options only) |
361 | orderAsk | double | option market ask @ parent order arrival (options only) |
364 | orderSurfPrc | float | SpiderRock surface price @ parent order arrival (options only) |
367 | orderSurfVol | float | |
370 | orderLimitVol | float | parent order limit volatilty (options only) |
373 | orderLimitPrc | double | parent order limit price @ parent order arrival |
376 | orderLimitRefUPrc | double | limit reference underlier price @ parent order arrival (options only) |
379 | childShape | enum : SpdrOrderShape | |
382 | childSize | int | child order size |
385 | childPrice | double | child order price |
388 | childExch | string(6) | child order exchange code (SpiderRock) |
706 | childExDest | string(16) | child order exchange code (downstream) |
394 | childDttm | DateTime | child order send date/time |
397 | childUBid | double | underlier market bid @ child order send time |
400 | childUAsk | double | underlier market bid @ child order send time |
403 | childBid | double | option market bid @ child order send time (options only) |
406 | childAsk | double | option market ask @ child order send time (options only) |
409 | childSurfPrc | float | SpiderRock surface price @ child order send time (options only) |
412 | childVol | float | child order volatilty (options only) |
415 | childProb | float | child order probability (T+x) |
418 | childLimitPrc | double | parent order limit price @ child order send time |
421 | childLimitRefUPrc | double | limit reference underlier price @ child order send time (options only) |
424 | childLimitPnl | float | child limit improvement pnl (childLimitPrc to fillPrice) |
427 | childAlgoHandler | enum : ChildHandler | algo that generated the child order responsible for this fill |
430 | childOrderHandling | string(24) | algo that generated the child order responsible for this fill |
433 | childCreateReason | enum : ChildCreateReason | child order create reason code |
436 | childCancelReason | enum : ChildCancelReason | child order cancel reason code |
439 | childMktStance | enum : MktStance | child order was expected to be marketable @ child send time |
442 | childCxlAttempted | enum : YesNo | cancel attempt was made on the child order prior to receiving this fill |
445 | childCxlFillLatency | float | cancel latency (for fills with a cancel attempt) |
448 | fillExch | string(12) | ExDest code from child order execution report (lastMkt) |
451 | fillPrice | double | fill price |
454 | fillTs | double | fill report ts (seconds since startup; 100 nanosec resolution) |
457 | fillDttm | DateTime | Date/time of fill arrival |
460 | fillSize | int | fill quantity |
463 | effFillSize | int | fill size x underliers per contract |
466 | fillVol | float | fill volatilty (options only) |
469 | fillProb | float | fill order probability (T+x) |
472 | fillLimitPrc | double | parent order limit price @ fill arrival time |
475 | fillLimitRefUPrc | double | limit reference underlier price @ fill arrival time (options only) |
478 | fillLimitPnl | float | fill limit improvement pnl (fillLimitPrc to fillPrice) |
481 | fillDe | float | fill delta |
484 | fillVe | float | fill vega |
487 | fillTh | float | fill theta |
493 | fillUPrc | double | fill underlier mid-market |
496 | fillBeta | float | SpiderRock estimate of beta to SPX |
532 | fillTv | float | theo vol (user supplied) |
535 | fillTp | float | theo price |
538 | fillUBid | double | underlier market bid @ fill arrival |
541 | fillUAsk | double | underlier market ask @ fill arrival |
544 | fillBid | double | option market bid @ fill arrival |
547 | fillAsk | double | option market ask @ fill arrival |
550 | fillSurfPrc | float | SpiderRock surface price @ fill arrival |
553 | fillPostUMark1M | double | underlier mark @ fill arrival + 1M |
556 | fillPostUMark10M | double | underlier mark @ fill arrival + 10M |
559 | fillPostMark1M | double | SpiderRock mid or surface mark @ fill arrival + 1M |
562 | fillPostMark10M | double | SpiderRock mid or surface mark @ fill arrival + 10M |
701 | marginUDnVDn | float | Aggregate RiskSlide: uPrc dn, vol dn |
702 | marginUDnVUp | float | Aggregate RiskSlide: uPrc dn, vol up |
703 | marginUUpVDn | float | Aggregate RiskSlide: uPrc up, vol dn |
704 | marginUUpVUp | float | Aggregate RiskSlide: uPrc up, vol up |
565 | riskCode | enum : RiskCode | SpiderRock Risk Code (if any) |
568 | exchLiquidityTag | string(4) | liquidity tag (exchange) |
571 | spdrLiquidityTag | string(2) | SpiderRock normalized liquidity tag |
574 | fillExchDetail | text1 | other fix tags (tag:value#tag:value) [additional detail used for analysis] |
577 | notionalValue | float | cn * mult * uPrc |
580 | marketValue | float | cn * mult * fillPrice |
583 | orderMktWidth | float | market width @ parent order arrival |
586 | childMktWidth | float | market width @ child order send time |
589 | fillMktWidth | float | market width @ fill arrival |
592 | parentOrderAge | float | elaspsed time from parent order entry/update to this fill event |
595 | parentAgeCode | enum : ParentAge | elaspsed time from parent order entry/update to this fill event [coded] |
598 | trdDelta | float | trade delta |
601 | trdDDelta | float | trade $delta |
604 | trdGamma | float | trade gamma |
607 | trdVega | float | trade vega |
610 | trdWtVega | float | trade wtVega (vega * vol / sqrt(max(0.1, years * 4))) |
613 | trdTheta | float | trade theta |
616 | trdPrem | float | trade premium over parity |
619 | trdBeta | float | trade beta |
622 | trdDBeta | float | trade $beta |
625 | surfEdge | float | SR surface edge (user supplied theo vol/prc to SpiderRock surface price) |
628 | surfEdgeUnit | float | SR surface edge normalized to $100 underlier |
631 | theoEdge | float | theo edge (user supplied theo vol/prc to SpiderRock surface price) |
634 | theoEdgeUnit | float | theo edge normalized to $100 underlier |
637 | exchFee | float | SpiderRock exchange fee estimate |
640 | halfWidthPnl | float | estimated half-width Pnl |
643 | clArrivePnl | float | -dir * qty * (fillPrice - clArriveMark) # maybe use orderSurfPrc instead |
646 | arrivePnl | float | -dir * qty * (fillPrice - 0.5 * (orderBid + orderAsk)) # maybe use orderSurfPrc instead |
649 | arriveDnPnl | float | arrivePnl - uDriftArrivePnl |
652 | uDriftArrivePnl | float | -dir * qty * fillDe * (0.5 * (fillUBid + fillUAsk) - 0.5 * (orderUBid + orderUAsk)) |
655 | dayDnPnl | float | delta neutral Pnl (to EOD) |
658 | dayM1Pnl | float | delta neutral Pnl (Fill + 1M) |
661 | dayM10Pnl | float | delta neutral Pnl (Fill + 10M) |
664 | uDriftDayPnl | float | underlier delta drift Pnl (to EOD) |
667 | uDriftM1Pnl | float | underlier delta drift Pnl (Fill + 1M) |
670 | uDriftM10Pnl | float | underlier delta drift Pnl (Fill + 10M) |
673 | dayPnl | float | actual Pnl to EOD |
676 | liveMark | double | SpiderRock internal use |
679 | liveUPrc | double | SpiderRock internal use |
682 | pendMark | double | SpiderRock internal use |
685 | pendUPrc | double | SpiderRock internal use |
688 | trdMarkError | string(8) | trade mark error code |
691 | dayMarkError | string(8) | day mark error code |
694 | userData1 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops |
697 | userData2 | text1 | client supplied data field; passes through to parent and child executions and reports as well as FIX drops |
700 | 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 = 'TradeCubeDetailV5'
# 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=TradeCubeDetailV5'
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 = 'TradeCubeDetailV5'
# 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 = 'runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|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 = 'clOrdId: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=TradeCubeDetailV5' \
--data-urlencode 'view=runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|timestamp' \
--data-urlencode 'where=clOrdId: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 = 'TradeCubeDetailV5'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|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 = 'clOrdId: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 = 'runStatus: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=TradeCubeDetailV5' \
--data-urlencode 'view=runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|timestamp' \
--data-urlencode 'where=clOrdId:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=runStatus: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 = 'TradeCubeDetailV5'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'runStatus|sysEnvironment|spdrSource|secType|symbolType|expCode|skewCode|widthCode|priceFormat|uPriceFormat|underlierType|pointCurrency|execStatus|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|lastCapacity|execRole|clearingFlipType|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|childShape|childAlgoHandler|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|riskCode|parentAgeCode'
# 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 = 'clOrdId: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=TradeCubeDetailV5' \
--data-urlencode 'measure=runStatus|sysEnvironment|version|clOrdId|parentNumber|packageId|altOrderId|srcRoutingCode|spdrSource|groupingCode|accnt|clientFirm|priAggGroup|secAggGroup|secKey|secType|ticker|viewGroup1|viewGroup2|viewGroup3|riskClass|symbolType|sector|indNum|subNum|grpNum|nbrNum|edays|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|routingCode|origExecID|lastExecID|transactDttm|execStatus|remoteText|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|parentOrderSize|method|strategy|userName|origin|source|server|clearingFirm|clearingAccnt|lastCapacity|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|riskGroupId|fillBrkrRate|fillRoutingRate|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|orderDttm|orderUBid|orderUAsk|orderBid|orderAsk|orderSurfPrc|orderSurfVol|orderLimitVol|orderLimitPrc|orderLimitRefUPrc|childShape|childSize|childPrice|childExch|childExDest|childDttm|childUBid|childUAsk|childBid|childAsk|childSurfPrc|childVol|childProb|childLimitPrc|childLimitRefUPrc|childLimitPnl|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childCxlFillLatency|fillExch|fillPrice|fillTs|fillDttm|fillSize|effFillSize|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillLimitPnl|fillDe|fillVe|fillTh|fillUPrc|fillBeta|fillTv|fillTp|fillUBid|fillUAsk|fillBid|fillAsk|fillSurfPrc|fillPostUMark1M|fillPostUMark10M|fillPostMark1M|fillPostMark10M|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskCode|exchLiquidityTag|spdrLiquidityTag|fillExchDetail|notionalValue|marketValue|orderMktWidth|childMktWidth|fillMktWidth|parentOrderAge|parentAgeCode|trdDelta|trdDDelta|trdGamma|trdVega|trdWtVega|trdTheta|trdPrem|trdBeta|trdDBeta|surfEdge|surfEdgeUnit|theoEdge|theoEdgeUnit|exchFee|halfWidthPnl|clArrivePnl|arrivePnl|arriveDnPnl|uDriftArrivePnl|dayDnPnl|dayM1Pnl|dayM10Pnl|uDriftDayPnl|uDriftM1Pnl|uDriftM10Pnl|dayPnl|liveMark|liveUPrc|pendMark|pendUPrc|trdMarkError|dayMarkError|userData1|userData2|timestamp' \
--data-urlencode 'group=runStatus|sysEnvironment|spdrSource|secType|symbolType|expCode|skewCode|widthCode|priceFormat|uPriceFormat|underlierType|pointCurrency|execStatus|orderLimitType|orderLimitClass|parentShape|parentOrderHandling|parentBalanceHandling|lastCapacity|execRole|clearingFlipType|billingSecType|billingCategory|firmType|side|priceType|ssaleFlag|spdrSSaleFlag|positionType|autoHedge|childShape|childAlgoHandler|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|riskCode|parentAgeCode' \
--data-urlencode 'where=clOrdId: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 = 'TradeCubeDetailV5'
# 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 = 'clOrdId: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=TradeCubeDetailV5' \
--data-urlencode 'where=clOrdId:eq:ExampleString'