Schema: SpdrRiskExecution (ID: 2325)
SpdrRiskExecution records are published every time a SpdrParentExecution record is published
METADATA
Attribute | Value |
---|---|
Topic | 2270-execution-engine |
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 | sysRealm | enum : SysRealm | |
103 | sysEnvironment | enum : SysEnvironment | original (source) sys environment [Stable, Current, etc] |
106 | runStatus | enum : RunStatus | original (source) run status [Prod,Beta] |
109 | 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) |
112 | execStatus | enum : ExecStatus | SpiderRock execution status (Fill,Bust,Correct,Reject,SysRej) |
115 | execShape | enum : ExecShape | |
118 | packageId | long | SR package Id |
121 | parentNumber | long | SR parent number |
124 | parentVersion | short | SPDR order instance number (1 = original order; 2 = 1st cancel/replace, etc) |
127 | baseParentNumber | long | SPDR order number (initial number in cancel/replace sequence) (also, source parent for dynamically generated orders;eg auto-hedges) |
130 | clOrdId | long | SR child order clOrdID resulting in fill |
133 | riskGroupId | long | riskGroupId (parent order group ID) for this execution report |
142 | parentShape | enum : SpdrOrderShape | shape of originating parent order |
145 | secKey | OptionKey | execution security key |
148 | secType | enum : SpdrKeyType | execution security type [Stock, Future, Option] |
151 | ticker | TickerKey | base stock key (used for symbol risk aggregation) |
154 | accnt | string(16) | SpiderRock trading accnt [broker pkey] |
157 | clientFirm | string(16) | SR client firm |
160 | spdrSource | enum : SpdrSource | SpiderRock parent order source code [broker pkey] |
163 | groupingCode | long | SpiderRock parent broker number [broker pkey] |
353 | engineName | string(32) | SpiderRock execution engine that handled the parent order |
169 | execRole | enum : ExecRole | SpiderRock relationship to this execution record |
172 | childOrderHandling | string(24) | child order handling string from the algo that generated the child order responsible for this fill |
175 | childAlgoHandler | enum : ChildHandler | algo handler for this child order |
178 | childSSaleFlag | enum : ShortSaleFlag | short sale flag |
181 | userName | string(24) | user name associated with the parent order |
184 | orderSide | enum : BuySell | order side |
187 | spdrOrderStatus | enum : SpdrOrderStatus | |
190 | spdrCloseReason | enum : SpdrCloseReason | |
193 | cumFillQuantity | int | cumulative fills (this parent number only) |
196 | avgFillPrice | double | |
199 | cumLegFillQuantity | int | cumulative fills (spread only) |
202 | avgLegFillPrice | double | |
205 | leavesQty | int | |
208 | priceType | enum : PriceType | |
211 | firmType | enum : FirmType | child order firm type [Customer, ProCust, Firm, MM, etc] |
214 | priAggGroup | string(16) | primary aggregation group |
217 | secAggGroup | string(16) | secondary aggregation group |
220 | fillTransactDttm | DateTime | transaction date/time as reported by exchange or down stream broker |
223 | fillDttm | DateTime | Date/time of fill arrival (SRDateTime) |
226 | fillExch | string(12) | ExDest code from child order execution report |
229 | fillExecId | text1 | street side execution Id |
232 | fillExecRefId | text1 | street side execution ref Id (only used when busting an execution) |
235 | fillLegRefId | long | legRefId for multileg fills |
238 | fillLegRatio | int | legRatio (if spread order) |
241 | fillExchFee | float | SpiderRock estimate of the exchange fee based on liquidity tags (best effort) |
244 | fillMarket | string(8) | usually from execReport.lastMkt as reported by child order venue |
247 | fillPrice | double | fill price |
250 | fillQuantity | int | fill quantity |
253 | fillBid | double | market bid @ fill arrival |
256 | fillAsk | double | market ask @ fill arrival |
259 | fillMark | double | mid-market (or SR surface price if option) @ fill arrival |
262 | fillUBid | double | underlier market bid @ fill arrival |
265 | fillUAsk | double | underlier market bid @ fill arrival |
268 | fillVol | float | fill volatility @ fillLimitRefUPrc |
271 | fillVe | float | fill vega |
274 | fillGa | float | fill gamma |
277 | fillDe | float | fill delta |
280 | fillTh | float | fill theta |
286 | fillBeta | float | SpiderRock estimate of beta to SPX |
354 | riskVega | float | risk vega |
355 | riskWtVega | float | risk gamma |
356 | riskNValue | float | risk delta |
357 | riskDelta | float | risk delta |
358 | riskDDelta | float | risk ddelta |
359 | riskRm1 | float | user defined (from parent order) [used to manage order groups |
360 | riskRm2 | float | user defined (from parent order) [used to manage order groups] |
361 | riskRm3 | float | user defined (from parent order) [used to manage order groups] |
362 | riskRm4 | float | user defined (from parent order) [used to manage order groups] |
363 | riskRm5 | float | user defined (from parent order) [used to manage order groups] |
364 | riskRm6 | float | user defined (from parent order) [used to manage order groups] |
365 | riskRm7 | float | user defined (from parent order) [used to manage order groups] |
366 | marginUDnVDn | float | underlier down, vol down |
367 | marginUDnVUp | float | underlier down, vol up |
368 | marginUUpVDn | float | underlier up, vol down |
369 | marginUUpVUp | float | underlier up, vol up |
370 | riskU50Dn | float | underlier dn 50% shock slide |
371 | riskU50Up | float | underlier up 50% shock slide |
322 | years | float | years to expiration |
325 | underliersPerCn | int | option delivery underliers per contract |
328 | underlierType | enum : UnderlierType | type of underlier (affects $greek calculations) |
331 | tickValue | float | $NLV value of a single tick change in display premium (pointValue = tickValue / tickSize) |
334 | pointValue | float | $NLV value of a single point change in display premium (pointValue = tickValue / tickSize) |
337 | pointCurrency | enum : Currency | |
340 | uPrcRatio | float | UPrcRatio (SymbolRatio) from product definition |
343 | minTickSize | float | minimum market price variation (dnTickSize if on a boundary) |
346 | priceFormat | enum : PriceFormat | SpiderRock price display format code |
349 | uPriceFormat | enum : PriceFormat | SpiderRock underlier price display format code |
352 | timestamp | DateTime | timestamp of this record [not necessarily the timestamp of the fill itself] |
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 = 'SpdrRiskExecution'
# 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=SpdrRiskExecution'
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 = 'SpdrRiskExecution'
# 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 = 'sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|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=SpdrRiskExecution' \
--data-urlencode 'view=sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|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 = 'SpdrRiskExecution'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|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 = 'sysRealm: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=SpdrRiskExecution' \
--data-urlencode 'view=sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=sysRealm: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 = 'SpdrRiskExecution'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'sysRealm|sysEnvironment|runStatus|execStatus|execShape|parentShape|secType|spdrSource|execRole|childAlgoHandler|childSSaleFlag|orderSide|spdrOrderStatus|spdrCloseReason|priceType|firmType|underlierType|pointCurrency|priceFormat|uPriceFormat'
# 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=SpdrRiskExecution' \
--data-urlencode 'measure=sysRealm|sysEnvironment|runStatus|version|execStatus|execShape|packageId|parentNumber|parentVersion|baseParentNumber|clOrdId|riskGroupId|parentShape|secKey|secType|ticker|accnt|clientFirm|spdrSource|groupingCode|engineName|execRole|childOrderHandling|childAlgoHandler|childSSaleFlag|userName|orderSide|spdrOrderStatus|spdrCloseReason|cumFillQuantity|avgFillPrice|cumLegFillQuantity|avgLegFillPrice|leavesQty|priceType|firmType|priAggGroup|secAggGroup|fillTransactDttm|fillDttm|fillExch|fillExecId|fillExecRefId|fillLegRefId|fillLegRatio|fillExchFee|fillMarket|fillPrice|fillQuantity|fillBid|fillAsk|fillMark|fillUBid|fillUAsk|fillVol|fillVe|fillGa|fillDe|fillTh|fillBeta|riskVega|riskWtVega|riskNValue|riskDelta|riskDDelta|riskRm1|riskRm2|riskRm3|riskRm4|riskRm5|riskRm6|riskRm7|marginUDnVDn|marginUDnVUp|marginUUpVDn|marginUUpVUp|riskU50Dn|riskU50Up|years|underliersPerCn|underlierType|tickValue|pointValue|pointCurrency|uPrcRatio|minTickSize|priceFormat|uPriceFormat|timestamp' \
--data-urlencode 'group=sysRealm|sysEnvironment|runStatus|execStatus|execShape|parentShape|secType|spdrSource|execRole|childAlgoHandler|childSSaleFlag|orderSide|spdrOrderStatus|spdrCloseReason|priceType|firmType|underlierType|pointCurrency|priceFormat|uPriceFormat' \
--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 = 'SpdrRiskExecution'
# 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=SpdrRiskExecution' \
--data-urlencode 'where=accnt:eq:ExampleString'