Skip to main content
Version: Upcoming

SRStrategyOrderLeggerX

V8 Message Definiton

METADATA

AttributeValue
Topic5355-strategy-legger
MLink TokenInternal
ProductSRTrade
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
strategyNumberBIGINTPRI0strategy order number
spdrSourceenum - SpdrSource'None'
accntVARCHAR(16)''SR trading account
clientFirmVARCHAR(16)''SR client firm
strategyStatusenum - StrategyStatus'None'
execBrkrCodeVARCHAR(16)''optional override the default execBrkrCode for this order
externExDestVARCHAR(16)''routing code for orders directed to an external order router default null should match FixRoutingTabledestination in SR accnt config
externParamsTINYTEXT''external algo namesparameters usually just an algo name
strategyVARCHAR(36)PRI''clientsupplied strategy string visible on SpiderRock GUI tools and other order reports
userNameVARCHAR(24)''name of the user entering the order
orderSizeINT0strategy size number of complete spreads
leggerLimitDOUBLE0strategy limit
leggerLimitTypeenum - LeggerLimitType'None'strategy limit type
leggerAlgoenum - LeggerAlgo'None'
balanceHandlingenum - ParentBalanceHandling'None'base parent order balance handling make style algo
legExposurePctFLOAT0percentage of legger order than can be exposed on a single leg without completing related legs
legCompletionSlippageDOUBLE0maximum leg price slippage to complete an open strategy order
marketSessionenum - MarketSession'None'
startDttmDATETIME(6)'1900-01-01 00:00:00.000000'optional parent order start time
orderDurationINT0optional number of seconds
goodTillDttmDATETIME(6)'1900-01-01 00:00:00.000000'optional default 20990101
autoHedgeenum - AutoHedge'None'
hedgeInstrumentenum - HedgeInst'None'
hedgeSecKey_atenum - AssetType'None'autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeSecKey_tsenum - TickerSrc'None'autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeSecKey_tkVARCHAR(12)''autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeSecKey_yrSMALLINT UNSIGNED0autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeSecKey_mnTINYINT UNSIGNED0autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeSecKey_dyTINYINT UNSIGNED0autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future
hedgeBetaRatioFLOAT0portion of executed money to autohedge can be 10 Beta for beta hedging 40 to 40
hedgeScopeenum - HedgeScope'None'hedge group scope RiskGroup or Accnt
hedgeSessionenum - MarketSession'None'
externHedgeExDestVARCHAR(16)''external broker exDest only used if orderHandlingExtern Should match FixRoutingTabledestination type
externHedgeParamsTINYTEXT''external algo namesparameters usually just an algo name
userData1TINYTEXT''client supplied data field passes through to parent and child executions and reports as well as FIX drops
userData2TINYTEXT''client supplied data field passes through to parent and child executions and reports as well as FIX drops
childDataTINYTEXT''client supplied data field passes through to down stream child orders
timestampDATETIME(6)'1900-01-01 00:00:00.000000'
LegsListJSON'JSON_ARRAY()'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
strategyNumber1

JSON Block (LegsList)

FieldTypeComment
legIdenum - legIdleg ID
legPriorityenum - LegPriorityLead legs fill first note if there are no lead legs the first leg in the list will be treated as the lead leg
secKeyenum - secKeyleg Security
secTypeenum - SpdrKeyType
multenum - multleg ratio
sideenum - BuySell
posTypeenum - PositionType
ssaleFlagenum - ShortSaleFlag
exchMaskenum - exchMaskeligible exchanges 0 all
minUBidenum - minUBidoptional 0 is any leg limit is only valid if all uMkt prices are between minUBid maxUAsk
maxUAskenum - maxUAskoptional 0 is any
minMaxTypeenum - MinMaxTypeif Prc minUBidmaxUAsk are expressed as prices if Pct then they are expresses as pct change since parent order arrival
refUPrcenum - refUPrcreference underlier price PrcDe orders
refDeltaenum - refDeltareference delta for PrcDe order handling

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgSRStrategyOrderLeggerX` (
`strategyNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'strategy order number',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR trading account',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`strategyStatus` ENUM('None','Active','Hold','Closed') NOT NULL DEFAULT 'None',
`execBrkrCode` VARCHAR(16) NOT NULL DEFAULT '' COMMENT '(optional) override the default execBrkrCode for this order',
`externExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'routing code for orders directed to an external order router (default = null); should match FixRoutingTable.destination (in SR accnt config)',
`externParams` TINYTEXT NOT NULL DEFAULT '' COMMENT 'external algo names/parameters (usually just an algo name)',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client-supplied strategy string; visible on SpiderRock GUI tools and other order reports.',
`userName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'name of the user entering the order',
`orderSize` INT NOT NULL DEFAULT 0 COMMENT 'strategy size (number of complete spreads)',
`leggerLimit` DOUBLE NOT NULL DEFAULT 0 COMMENT 'strategy limit',
`leggerLimitType` ENUM('None','Prc','PrcDe','PrcDeX') NOT NULL DEFAULT 'None' COMMENT 'strategy limit type',
`leggerAlgo` ENUM('None','LegCrossOnly','LegOutLoud') NOT NULL DEFAULT 'None',
`balanceHandling` ENUM('None','PostWith','PostTurn','PostImprove','PostLimit','MaxIntern','PostWthF','PostImprvR','PostFlash','PostFlashW','PostPeg','PostFlashI') NOT NULL DEFAULT 'None' COMMENT 'base parent order balance handling [make style algo]',
`legExposurePct` FLOAT NOT NULL DEFAULT 0 COMMENT 'percentage of legger order than can be exposed on a single leg without completing related legs',
`legCompletionSlippage` DOUBLE NOT NULL DEFAULT 0 COMMENT 'maximum leg price slippage to complete an open strategy order',
`marketSession` ENUM('None','PreMkt','RegMkt','PostMkt','PreRegMkt','RegPostMkt','AllDay') NOT NULL DEFAULT 'None',
`startDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (parent order start time)',
`orderDuration` INT NOT NULL DEFAULT 0 COMMENT '[optional] (number of seconds)',
`goodTillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (default: 2099-01-01)',
`autoHedge` ENUM('None','Static','AutoMid','AutoCrx','AutoTrn','SpdrAuto','Spdr10S','Spdr30S','Spdr90S','Spdr5M','Spdr30M','SpdrDay','SmartFast','SmartNorm','FastCrx','FastDark','SlowDark','AlphaVwap1pct','AlphaVwap2pct','AlphaVwap5pct','AlphaVwap25pct','Custom','AwayAlgo') NOT NULL DEFAULT 'None',
`hedgeInstrument` ENUM('None','Default','FrontMonth','Stock','Future') NOT NULL DEFAULT 'None',
`hedgeSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeSecKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'autohedge instrument (can be a TickerKey (stock) or ExpiryKey (future)) [required for Stock and Future]',
`hedgeBetaRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'portion of executed $money to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0]',
`hedgeScope` ENUM('None','Accnt','RiskGroup') NOT NULL DEFAULT 'None' COMMENT 'hedge group scope [RiskGroup or Accnt]',
`hedgeSession` ENUM('None','PreMkt','RegMkt','PostMkt','PreRegMkt','RegPostMkt','AllDay') NOT NULL DEFAULT 'None',
`externHedgeExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type',
`externHedgeParams` TINYTEXT NOT NULL DEFAULT '' COMMENT 'external algo names/parameters (usually just an algo name)',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`childData` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to down stream child orders',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`LegsList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(LegsList)),
PRIMARY KEY USING HASH (`strategyNumber`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`strategyNumber`,
`spdrSource`,
`accnt`,
`clientFirm`,
`strategyStatus`,
`execBrkrCode`,
`externExDest`,
`externParams`,
`strategy`,
`userName`,
`orderSize`,
`leggerLimit`,
`leggerLimitType`,
`leggerAlgo`,
`balanceHandling`,
`legExposurePct`,
`legCompletionSlippage`,
`marketSession`,
`startDttm`,
`orderDuration`,
`goodTillDttm`,
`autoHedge`,
`hedgeInstrument`,
`hedgeSecKey_at`,
`hedgeSecKey_ts`,
`hedgeSecKey_tk`,
`hedgeSecKey_yr`,
`hedgeSecKey_mn`,
`hedgeSecKey_dy`,
`hedgeBetaRatio`,
`hedgeScope`,
`hedgeSession`,
`externHedgeExDest`,
`externHedgeParams`,
`userData1`,
`userData2`,
`childData`,
`timestamp`,
`LegsList`
FROM `SRTrade`.`MsgSRStrategyOrderLeggerX`
WHERE
/* Replace with a BIGINT */
`strategyNumber` = 1234567890;

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRStrategyOrderLeggerX' ORDER BY ordinal_position ASC;