SRPairLeggerState
METADATA
| Attribute | Value |
|---|---|
| Topic | 5355-strategy-legger |
| MLink Token | Internal |
| Product | SRTrade |
| accessType | SELECT |
| MLink Endpoint | MLink-Live |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| orderNumber | CHAR(19) | PRI | '0000-0000-0000-0000' | pair legger order number should be an SR Guid |
| spdrSource | enum - SpdrSource | 'None' | ||
| accnt | VARCHAR(16) | '' | SR trading account | |
| clientFirm | VARCHAR(16) | '' | SR client firm | |
| pairCtrlState | enum - PairCtrlState | 'None' | ||
| pairState | enum - PairState | 'None' | ||
| strategy | VARCHAR(36) | '' | clientsupplied strategy string visible on SpiderRock GUI tools and other order reports | |
| userName | VARCHAR(24) | '' | name of the user entering the order | |
| orderSize | INT | 0 | pair size number of complete spreads | |
| leggerLimit | DOUBLE | 0 | pair limit | |
| leggerLimitType | enum - LeggerLimitType | 'None' | pair limit type stock Price future Price optExpiry AtmVol only option Price or StrikeVol | |
| leggerAlgo | enum - LeggerAlgo | 'None' | ||
| legRatioType | enum - LegRatioType | 'None' | ||
| numAtmStrikes | SMALLINT UNSIGNED | 0 | number of OptExpiry atm strikes max 6 | |
| legExposurePct | FLOAT | 0 | percentage of legger order size than can be exposed on a single leg without completing related legs | |
| legCompletionSlippage | DOUBLE | 0 | maximum leg slippage to complete an open pair order in leggerLimitType units | |
| marketSession | enum - MarketSession | 'None' | ||
| orderDuration | INT | 0 | optional number of seconds | |
| goodTillDttm | DATETIME(6) | '1900-01-01 00:00:00.000000' | optional default 20990101 | |
| maxMktPctMove | DOUBLE | 0 | optional if any leg stock price future price or option underlier price moves move that maxMktPctMove from values at order activation then the entire order will be automatically put on hold | |
| autoHedge | enum - AutoHedge | 'None' | only for optExpiryoptExpiry and optionoption pairs | |
| hedgeSession | enum - MarketSession | 'None' | ||
| userData1 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
| userData2 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
| childData | TINYTEXT | '' | client supplied data field passes through to down stream child orders | |
| pairStatus | enum - PairStatus | 'None' | ||
| pairDetail | TINYTEXT | '' | ||
| cumSquareFillQty | INT | 0 | ||
| cumPartialFillQty | INT | 0 | ||
| avgSquareFillPrc | DOUBLE | 0 | ||
| pairBidPx | DOUBLE | 0 | synthetic pair bid from individual leg markets | |
| pairAskPx | DOUBLE | 0 | synthetic pair ask from individual leg markets | |
| pairBidSz | DOUBLE | 0 | ||
| pairAskSz | DOUBLE | 0 | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
| LegsList | JSON | 'JSON_ARRAY()' |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| orderNumber | 1 |
JSON Block (LegsList)
| Field | Type | Comment |
|---|---|---|
| secKey | enum - secKey | leg Security can be a stock future optExpiry or option must be the same for all legs cp can be call put or both if secType optExpiry |
| secType | enum - LeggerSecType | note stockstock stockfuture futurefuture optExpiryoptExpiry or optionoption are allowed |
| ratio | enum - ratio | leg ratio note can be in shares contracts vega wvega tvega or wtvega terms optExpiry must be in one of the xVega choices |
| legPriority | enum - LegPriority | Lead legs fill first |
| posType | enum - PositionType | note must be Auto for optExpiry not required for stock |
| ssaleFlag | enum - ShortSaleFlag | only for stock legs and autohedging |
| hedgeInstrument | enum - HedgeInst | |
| hedgeSecKey | enum - hedgeSecKey | autohedge instrument can be a TickerKey stock or ExpiryKey future required for Stock and Future |
| orderSize | enum - orderSize | working size from parentBrkrStateorderSize sum of all individual orders in cnshare terms |
| orderActiveSize | enum - orderActiveSize | order active size from parentBrkrStateorderActiveSize sum of all individual orders in cnshare terms |
| numActiveBrkrs | enum - numActiveBrkrs | number of parent order legs with legactiveSize legcumFillQty |
| numAvailLegBrkrs | enum - numAvailLegBrkrs | number of parent order legs created |
| cumFillQty | enum - cumFillQty | in LeggerLimitType terms |
| avgFillPrc | enum - avgFillPrc | |
| activeSprdSize | enum - activeSprdSize | active size sum of all individual orders in ratio type terms |
| legStatus | enum - legStatus | |
| targetState | enum - LeggerTargetState | |
| targetSprdSize | enum - targetSprdSize | |
| targetLimitPrice | enum - targetLimitPrice | |
| bestBidPrc | enum - bestBidPrc | leg best bid price in terms of limit type |
| bestAskPrc | enum - bestAskPrc | leg best ask price |
| bestBidSize | enum - bestBidSize | leg best bid size in terms of ratio type |
| bestAskSize | enum - bestAskSize | leg best ask size |
| numNewOrders | enum - numNewOrders | number of parent orders published |
| numLimitUpdates | enum - numLimitUpdates | number of parent limit messages published |
SELECT TABLE EXAMPLE QUERY
SELECT *
FROM `SRTrade`.`MsgSRPairLeggerState`
WHERE
/* Replace with a CHAR(19) */
`orderNumber` = 'Example_orderNumber';
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRPairLeggerState' ORDER BY ordinal_position ASC;