Skip to main content
Version: Upcoming

Schema: SpdrRiskExecution (ID: 2325)

SpdrRiskExecution records are published every time a SpdrParentExecution record is published

METADATA

AttributeValue
Topic2270-execution-engine
MLink TokenClientTrading
SRSE ProductSRTrade

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeComment
10=fillNumberlongSpiderRock execution number (globally unique over trailing 10 days)
100sysRealmenum : SysRealm
103sysEnvironmentenum : SysEnvironmentoriginal (source) sys environment [Stable, Current, etc]
106runStatusenum : RunStatusoriginal (source) run status [Prod,Beta]
109versionbyterecord version number;starts at zero and goes up every time an execution record is re-published (eg, bust, +1m marks, +10m marks, etc)
112execStatusenum : ExecStatusSpiderRock execution status (Fill,Bust,Correct,Reject,SysRej)
115execShapeenum : ExecShape
118packageIdlongSR package Id
121parentNumberlongSR parent number
124parentVersionshortSPDR order instance number (1 = original order; 2 = 1st cancel/replace, etc)
127baseParentNumberlongSPDR order number (initial number in cancel/replace sequence) (also, source parent for dynamically generated orders;eg auto-hedges)
130clOrdIdlongSR child order clOrdID resulting in fill
133riskGroupIdlongriskGroupId (parent order group ID) for this execution report
142parentShapeenum : SpdrOrderShapeshape of originating parent order
145secKeyOptionKeyexecution security key
148secTypeenum : SpdrKeyTypeexecution security type [Stock, Future, Option]
151tickerTickerKeybase stock key (used for symbol risk aggregation)
154accntstring(16)SpiderRock trading accnt [broker pkey]
157clientFirmstring(16)SR client firm
160spdrSourceenum : SpdrSourceSpiderRock parent order source code [broker pkey]
163groupingCodelongSpiderRock parent broker number [broker pkey]
353engineNamestring(32)SpiderRock execution engine that handled the parent order
169execRoleenum : ExecRoleSpiderRock relationship to this execution record
172childOrderHandlingstring(24)child order handling string from the algo that generated the child order responsible for this fill
175childAlgoHandlerenum : ChildHandleralgo handler for this child order
178childSSaleFlagenum : ShortSaleFlagshort sale flag
181userNamestring(24)user name associated with the parent order
184orderSideenum : BuySellorder side
187spdrOrderStatusenum : SpdrOrderStatus
190spdrCloseReasonenum : SpdrCloseReason
193cumFillQuantityintcumulative fills (this parent number only)
196avgFillPricedouble
199cumLegFillQuantityintcumulative fills (spread only)
202avgLegFillPricedouble
205leavesQtyint
208priceTypeenum : PriceType
211firmTypeenum : FirmTypechild order firm type [Customer, ProCust, Firm, MM, etc]
214priAggGroupstring(16)primary aggregation group
217secAggGroupstring(16)secondary aggregation group
220fillTransactDttmDateTimetransaction date/time as reported by exchange or down stream broker
223fillDttmDateTimeDate/time of fill arrival (SRDateTime)
226fillExchstring(12)ExDest code from child order execution report
229fillExecIdtext1street side execution Id
232fillExecRefIdtext1street side execution ref Id (only used when busting an execution)
235fillLegRefIdlonglegRefId for multileg fills
238fillLegRatiointlegRatio (if spread order)
241fillExchFeefloatSpiderRock estimate of the exchange fee based on liquidity tags (best effort)
244fillMarketstring(8)usually from execReport.lastMkt as reported by child order venue
247fillPricedoublefill price
250fillQuantityintfill quantity
253fillBiddoublemarket bid @ fill arrival
256fillAskdoublemarket ask @ fill arrival
259fillMarkdoublemid-market (or SR surface price if option) @ fill arrival
262fillUBiddoubleunderlier market bid @ fill arrival
265fillUAskdoubleunderlier market bid @ fill arrival
268fillVolfloatfill volatility @ fillLimitRefUPrc
271fillVefloatfill vega
274fillGafloatfill gamma
277fillDefloatfill delta
280fillThfloatfill theta
286fillBetafloatSpiderRock estimate of beta to SPX
354riskVegafloatrisk vega
355riskWtVegafloatrisk gamma
356riskNValuefloatrisk delta
357riskDeltafloatrisk delta
358riskDDeltafloatrisk ddelta
359riskRm1floatuser defined (from parent order) [used to manage order groups
360riskRm2floatuser defined (from parent order) [used to manage order groups]
361riskRm3floatuser defined (from parent order) [used to manage order groups]
362riskRm4floatuser defined (from parent order) [used to manage order groups]
363riskRm5floatuser defined (from parent order) [used to manage order groups]
364riskRm6floatuser defined (from parent order) [used to manage order groups]
365riskRm7floatuser defined (from parent order) [used to manage order groups]
366marginUDnVDnfloatunderlier down, vol down
367marginUDnVUpfloatunderlier down, vol up
368marginUUpVDnfloatunderlier up, vol down
369marginUUpVUpfloatunderlier up, vol up
370riskU50Dnfloatunderlier dn 50% shock slide
371riskU50Upfloatunderlier up 50% shock slide
322yearsfloatyears to expiration
325underliersPerCnintoption delivery underliers per contract
328underlierTypeenum : UnderlierTypetype of underlier (affects $greek calculations)
331tickValuefloat$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)
334pointValuefloat$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)
337pointCurrencyenum : Currency
340uPrcRatiofloatUPrcRatio (SymbolRatio) from product definition
343minTickSizefloatminimum market price variation (dnTickSize if on a boundary)
346priceFormatenum : PriceFormatSpiderRock price display format code
349uPriceFormatenum : PriceFormatSpiderRock underlier price display format code
352timestampDateTimetimestamp of this record [not necessarily the timestamp of the fill itself]

Get Schema API Call

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)

Get Msg API Call

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)

Get Msgs API Call

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)

Get Aggregate API Call

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)

Get Count API Call

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)