Schema: ToolCompositeExecution (ID: 3480)
METADATA
Attribute | Value |
---|---|
Topic | 3480-mlink-custom |
MLink Token | ClientTrading |
SRSE Product | SRTrade |
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) |
100 | tradeDate | DateKey | trade date |
103 | accnt | string(16) | SpiderRock Accnt Code |
106 | clientFirm | string(16) | SpiderRock ClientFirm Code |
109 | secKey | OptionKey | Security Key [can be partially filled in (look at secType)] |
112 | secType | enum : SpdrKeyType | Security Type [Stock, Future, Option] |
115 | side | enum : BuySell | order / execution side |
118 | 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) |
121 | parentNumber | long | SpiderRock parent number |
124 | baseParentNumber | long | SpiderRock base parent number |
127 | spdrSource | enum : SpdrSource | SpiderRock parent order source code [broker pkey] |
130 | groupingCode | long | SpiderRock parent broker number [broker pkey] |
133 | riskGroupId | long | riskGroupId (parent order group ID) for this execution report |
136 | altOrderId | string(24) | alternate order ID (usually clOrdId from client) |
139 | srcRoutingCode | text1 | inbound FIX routing code, if any |
142 | userName | string(24) | SpiderRock user name associated with the parent order |
145 | server | string(20) | SpiderRock execution engine that handled the parent order |
148 | ticker | TickerKey | SpiderRock underlier ticker key [synthetic for futures] |
151 | sector | string(16) | user supplied sector code (from SymbolControl record) |
154 | clientTags | text1 | |
157 | indNum | int | ind code (00) |
160 | subNum | int | sub code (0000) |
163 | grpNum | int | grp code (000000) |
166 | nbrNum | int | nbr code (00000000) |
169 | expCode | enum : ExpCode | expiration tenor code |
172 | skewCode | enum : SkewCode | strike skew code (@ parent order arrival) |
175 | widthCode | enum : WidthCode | market width code |
178 | priceFormat | enum : PriceFormat | SpiderRock price display format code |
181 | uPriceFormat | enum : PriceFormat | SpiderRock underlier price display code |
184 | years | float | years to expiration (@ parent order arrival) |
187 | underlierType | enum : UnderlierType | underlier type (affects $greek calcs) |
190 | minTickSize | float | $NLV value of a single tick change in display premium (pointValue = tickValue / tickSize) |
193 | pointValue | float | $NLV value of a point |
196 | pointCurrency | enum : Currency | |
199 | underliersPerCn | int | underliers per contract (futures and options) |
202 | parentShape | enum : SpdrOrderShape | parent order shape [Single, MLeg, etc] |
205 | parentLimitType | enum : SpdrLimitType | parent order limit type [Vol, VolX, PrcDe, PrcDeX, etc] |
208 | parentLimitClass | enum : SpdrLimitClass | parent order limit class (makeLimitClass if fill was from making; takeLimitClass if fill was from taking) |
211 | parentOrderHandling | enum : ParentOrderHandling | base parent order algo [take style algo] |
214 | parentBalanceHandling | enum : ParentBalanceHandling | base parent order balance handling [make style algo] |
217 | parentOrderSize | int | parent order size |
220 | parentDttm | DateTime | Date/time of parent order arrival |
223 | parentUMark | double | underlier mid mark @ parent order arrival (options only) |
226 | parentBid | double | market bid @ parent order arrival |
229 | parentAsk | double | market ask @ parent order arrival |
232 | parentFairPrc | float | SpiderRock fair price @ parent order arrival |
235 | parentFairWidth | float | SpiderRock fair width @ parent order arrival |
238 | parentLimitPrc | double | parent order limit price @ parent order arrival |
241 | parentLimitRefUPrc | double | limit reference underlier price @ parent order arrival (options only) |
244 | parentSSaleFlag | enum : ShortSaleFlag | parent order short sale flag (can be Auto) |
247 | parentPositionType | enum : PositionType | parent order position type (can be Auto) |
250 | parentStrategy | string(36) | parent strategy [usually client supplied] |
253 | parentAutoHedge | enum : AutoHedge | SpiderRock auto-hedge algorithm (if any) |
256 | childDttm | DateTime | child order send date/time (if any) |
259 | childClOrdId | string(24) | child order clOrdId resulting in fill (if any) |
262 | childRoutingCode | text1 | SpiderRock child order routing code (if any) |
265 | childSize | int | child order size |
268 | childPrice | double | child order price |
271 | childExch | string(6) | child order exchange code (SpiderRock) |
600 | childExDest | string(16) | child order exchange code (downstream) |
277 | childUPrc | double | underlier market price @ child order send time |
280 | childBid | double | market bid @ child order send time |
283 | childAsk | double | market ask @ child order send time |
286 | childFairPrc | float | SpiderRock fair price @ child order send time |
289 | childFairWidth | float | SpiderRock fair width @ child order send time |
292 | childVol | float | child order volatilty (options only) |
295 | childProb | float | child order probability (T+x) |
298 | childLimitPrc | double | parent order limit price @ child order send time |
301 | childLimitRefUPrc | double | limit reference underlier price @ child order send time (options only) |
304 | childAlgoHandler | enum : ChildHandler | algo that generated the child order responsible for this fill |
307 | childOrderHandling | string(24) | algo handler detail string |
310 | childCreateReason | enum : ChildCreateReason | child order create code |
313 | childCancelReason | enum : ChildCancelReason | child order cancel code (if any) |
316 | childMktStance | enum : MktStance | child order was expected to be marketable @ child send time |
319 | childCxlAttempted | enum : YesNo | cancel attempt was made on the child order prior to receiving this fill |
322 | childSSaleFlag | enum : ShortSaleFlag | child order short sale flag |
325 | childPositionType | enum : PositionType | child order position type |
328 | childFirmType | enum : FirmType | chld order firm type [Customer, ProCust, Firm, MM, etc] |
331 | childCapacity | enum : OrderCapacity | child order capacity |
334 | fillExch | string(12) | ExDest code from child order execution report (lastMkt) |
337 | fillPrice | double | fill price |
340 | fillDttm | DateTime | Date/time of fill arrival |
343 | fillSize | int | fill quantity |
346 | fillPointValue | int | fill size x pointValue |
349 | fillVol | float | fill volatilty (options only) |
352 | fillProb | float | fill order probability (T+x) |
355 | fillLimitPrc | double | parent order limit price @ fill arrival time |
358 | fillLimitRefUPrc | double | limit reference underlier price @ fill arrival time (options only) |
361 | fillUPrc | double | fill underlier mid-market |
364 | fillBeta | float | SpiderRock estimate of beta to SPX |
367 | fillTv | float | theo vol (user supplied) |
370 | fillTp | float | theo price |
373 | fillBid | double | option market bid @ fill arrival |
376 | fillAsk | double | option market ask @ fill arrival |
379 | fillFairPrc | float | SpiderRock fair price @ fill arrival |
382 | fillFairWidth | float | SpiderRock fair width @ fill arrival |
385 | fillBrkrRate | float | billing brokerage rate (tier 1) |
388 | fillRoutingRate | float | billing routing rate (tier 1) |
391 | fillOrigExecID | string(20) | original execution ID string (child order) |
394 | fillLastExecID | string(20) | most recent execution ID (same as origExecID unless CANCEL/CORRECTION has been processed) |
397 | fillExecStatus | enum : ExecStatus | SpiderRock execution status (Fill,Bust,Correct,Reject,SysRej) |
400 | fillRemoteText | string(64) | text comment from endpoint (if any) |
403 | fillTransactDttm | DateTime | transaction date/time as reported by exchange or down stream broker |
406 | fillLiquidityTag | string(2) | SpiderRock normalized exch liquidity tag |
409 | fillExchFee | float | SpiderRock exchange fee estimate |
412 | fillDe | float | |
415 | fillGa | float | |
418 | fillVe | float | |
421 | execRole | enum : ExecRole | SpiderRock relationship to this execution record (Direct, Drop, etc) |
599 | execBrkrCode | string(16) | exec broker acronym (usually an MPID) |
427 | execBrkrAccnt | string(16) | account at executing broker (if any) |
430 | execBrkrClFirm | string(16) | client/firm at executing broker (if any) |
433 | execBrkrUserName | string(16) | user executing broker (if any) |
436 | clearingFlipType | enum : FlipType | type of clearing corp delivery |
439 | clearingFlipFirm | string(6) | deliverTo clearing member (eg. OCC#, NSCC#, MPID, or InstitutionID) |
442 | clearingFlipAccnt | string(10) | deliverTo client account (eg. OCC AID# or a DVP FBO code) |
593 | clearingAgent | string(10) | deliverTo agent (eg. DVP Agent Bank ID) |
594 | clearingTaxID | string(10) | deliverTo taxID (eg. DVP TaxID) |
445 | billingSecType | enum : BillingSecType | SpiderRock billing security type |
448 | billingCategory | enum : BillingCategory | SpiderRock billing category |
451 | priAggGroup | string(16) | primary aggregation group |
454 | secAggGroup | string(16) | secondary aggregation group |
457 | trdDelta | float | trade delta |
460 | trdDDelta | float | trade $delta |
463 | trdGamma | float | trade gamma |
466 | trdDGamma | float | trade dollar gamma |
469 | trdVega | float | trade vega |
472 | trdWtVega | float | trade wtVega: (vega * vol / sqrt(max(0.1, years * 4)) |
478 | trdTheta | float | trade theta |
481 | trdBeta | float | trade beta |
484 | trdDBeta | float | trade $beta |
487 | trdNotionalValue | float | cn * pointValue * uPrc |
490 | trdMarketValue | float | cn * pointValue * fillPrice |
595 | marginUDnVDn | float | Aggregate RiskSlide: uPrc dn, vol dn |
596 | marginUDnVUp | float | Aggregate RiskSlide: uPrc dn, vol up |
597 | marginUUpVDn | float | Aggregate RiskSlide: uPrc up, vol dn |
598 | marginUUpVUp | float | Aggregate RiskSlide: uPrc up, vol up |
517 | trdFairEdge | float | SR trade edge (fill price to SR fair price) |
520 | trdFairEdgeUnit | float | SR trade edge normalized to $100 underlier |
523 | trdTheoEdge | float | theo edge (user supplied theo vol/prc to SpiderRock surface price) (if any) |
526 | trdTheoEdgeUnit | float | theo edge normalized to $100 underlier |
529 | clArrivePnL | float | arrival PnL (client arrival mark to fill mark) [from clArriveMark on parent order if any] |
532 | arrivePnL | float | arrival PnL (parent arrival mark to fill mark) |
535 | arriveDnPnL | float | arrival Dn PnL (arrivalPnL - uDriftArrivalPnL) |
538 | uDriftArrivePnL | float | underlier delta drift PnL (arrival uMark to fill uMark) |
541 | childLimitSlip | float | Fill Slippage (ChildLimitPrice to FillPrice) |
544 | halfWidthPnL | float | estimated half-width PnL |
547 | dayDnPnL | float | delta neutral PnL (to EOD) |
550 | dayM1PnL | float | delta neutral PnL (Fill + 1M) |
553 | dayM10PnL | float | delta neutral PnL (Fill + 10M) |
556 | uDriftDayPnL | float | underlier delta drift PnL (to EOD) |
559 | uDriftM1PnL | float | underlier delta drift PnL (Fill + 1M) |
562 | uDriftM10PnL | float | underlier delta drift PnL (Fill + 10M) |
565 | dayPnL | float | actual PnL to EOD (fillMark to liveMark) |
568 | m1Mark | double | T+1min |
571 | m1UPrc | double | T+1min |
574 | m10Mark | double | T+10min |
577 | m10UPrc | double | T+10min |
580 | liveMark | double | Live @ Record Query |
583 | liveUPrc | double | Live @ Record Query |
586 | trdMarkError | string(8) | trade mark error code |
589 | dayMarkError | string(8) | day mark error code |
592 | 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 = 'ToolCompositeExecution'
# 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=ToolCompositeExecution'
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 = 'ToolCompositeExecution'
# 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 = 'tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|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=ToolCompositeExecution' \
--data-urlencode 'view=tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|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 = 'ToolCompositeExecution'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|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 = 'tradeDate: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=ToolCompositeExecution' \
--data-urlencode 'view=tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=tradeDate: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 = 'ToolCompositeExecution'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'secType|side|spdrSource|expCode|skewCode|widthCode|priceFormat|uPriceFormat|underlierType|pointCurrency|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentSSaleFlag|parentPositionType|parentAutoHedge|childAlgoHandler|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExecStatus|execRole|clearingFlipType|billingSecType|billingCategory'
# 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=ToolCompositeExecution' \
--data-urlencode 'measure=tradeDate|accnt|clientFirm|secKey|secType|side|version|parentNumber|baseParentNumber|spdrSource|groupingCode|riskGroupId|altOrderId|srcRoutingCode|userName|server|ticker|sector|clientTags|indNum|subNum|grpNum|nbrNum|expCode|skewCode|widthCode|priceFormat|uPriceFormat|years|underlierType|minTickSize|pointValue|pointCurrency|underliersPerCn|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentOrderSize|parentDttm|parentUMark|parentBid|parentAsk|parentFairPrc|parentFairWidth|parentLimitPrc|parentLimitRefUPrc|parentSSaleFlag|parentPositionType|parentStrategy|parentAutoHedge|childDttm|childClOrdId|childRoutingCode|childSize|childPrice|childExch|childExDest|childUPrc|childBid|childAsk|childFairPrc|childFairWidth|childVol|childProb|childLimitPrc|childLimitRefUPrc|childAlgoHandler|childOrderHandling|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExch|fillPrice|fillDttm|fillSize|fillPointValue|fillVol|fillProb|fillLimitPrc|fillLimitRefUPrc|fillUPrc|fillBeta|fillTv|fillTp|fillBid|fillAsk|fillFairPrc|fillFairWidth|fillBrkrRate|fillRoutingRate|fillOrigExecID|fillLastExecID|fillExecStatus|fillRemoteText|fillTransactDttm|fillLiquidityTag|fillExchFee|fillDe|fillGa|fillVe|execRole|execBrkrCode|execBrkrAccnt|execBrkrClFirm|execBrkrUserName|clearingFlipType|clearingFlipFirm|clearingFlipAccnt|clearingAgent|clearingTaxID|billingSecType|billingCategory|priAggGroup|secAggGroup|trdDelta|trdDDelta|trdGamma|trdDGamma|trdVega|trdWtVega|trdTheta|trdBeta|trdDBeta|trdNotionalValue|trdMarketValue|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|trdFairEdge|trdFairEdgeUnit|trdTheoEdge|trdTheoEdgeUnit|clArrivePnL|arrivePnL|arriveDnPnL|uDriftArrivePnL|childLimitSlip|halfWidthPnL|dayDnPnL|dayM1PnL|dayM10PnL|uDriftDayPnL|uDriftM1PnL|uDriftM10PnL|dayPnL|m1Mark|m1UPrc|m10Mark|m10UPrc|liveMark|liveUPrc|trdMarkError|dayMarkError|timestamp' \
--data-urlencode 'group=secType|side|spdrSource|expCode|skewCode|widthCode|priceFormat|uPriceFormat|underlierType|pointCurrency|parentShape|parentLimitType|parentLimitClass|parentOrderHandling|parentBalanceHandling|parentSSaleFlag|parentPositionType|parentAutoHedge|childAlgoHandler|childCreateReason|childCancelReason|childMktStance|childCxlAttempted|childSSaleFlag|childPositionType|childFirmType|childCapacity|fillExecStatus|execRole|clearingFlipType|billingSecType|billingCategory' \
--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 = 'ToolCompositeExecution'
# 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=ToolCompositeExecution' \
--data-urlencode 'where=accnt:eq:ExampleString'