StockPrintSet
StockPrintSet records are created for each print and published to the SpiderRock elastic cluster 10 minutes later, when T+10M markup detail is available.
METADATA
| Attribute | Value |
|---|---|
| Topic | 2990-market-data-stock |
| MLink Token | EqtAnalytics |
| Product | SRAnalytics |
| accessType | SELECT |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| ticker_at | enum - AssetType | PRI | 'None' | |
| ticker_ts | enum - TickerSrc | PRI | 'None' | |
| ticker_tk | VARCHAR(12) | PRI | '' | |
| prtNumber | BIGINT | PRI | 0 | Unique print set identifier will increment but not guaranteed to be sequential |
| updateType | enum - PrtUpdateType | 'None' | ||
| prtExch | enum - StkExch | 'None' | print exch | |
| prtSize | INT | 0 | print size | |
| prtPrice | FLOAT | 0 | print price level | |
| prtClusterNum | INT | 0 | incremental print cluster counter one counter per ticker used to group prints into clusters | |
| prtClusterSize | INT | 0 | cumulative size of prints in this sequence prints same or more aggressive price with less than 25 ms elapsing since first print can span exchanges | |
| prtVolume | INT | 0 | cumulative print size today | |
| mrkPrice | FLOAT | 0 | last regular market print price | |
| prtType | enum - StkPrintType | 'None' | ||
| prtCond1 | TINYINT UNSIGNED | 0 | print condition from SIP feed | |
| prtCond2 | TINYINT UNSIGNED | 0 | ||
| prtCond3 | TINYINT UNSIGNED | 0 | ||
| prtCond4 | TINYINT UNSIGNED | 0 | ||
| prtSide | enum - PrtSide | 'None' | Print side None Mid Bid Ask | |
| prtTimestamp | BIGINT | 0 | exchange high precision timestamp if available | |
| netTimestamp | BIGINT | 0 | inbound print packet PTP timestamp from SR gateway switchusually syncronized with facility grandfather clock | |
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
| bidPrice | FLOAT | 0 | nbbo bid print arrival time | |
| askPrice | FLOAT | 0 | nbbo ask print arrival time | |
| bidSize | INT | 0 | ||
| askSize | INT | 0 | ||
| bidPrice2 | FLOAT | 0 | nbbo 2nd best bid print arrival time | |
| askPrice2 | FLOAT | 0 | nbbo 2nd best ask print arrival time | |
| bidSize2 | INT | 0 | nbbo 2nd best bid size | |
| askSize2 | INT | 0 | nbbo 2nd best ask size | |
| prtProbability | FLOAT | 0 | probability that buying prtSize shares prtPrice will have positive m10 pnl prtPriceM10 prtPrice recorded at time of print | |
| bidPriceM1 | FLOAT | 0 | Bid price 1 minute | |
| askPriceM1 | FLOAT | 0 | Ask price 1 minute | |
| prtPriceM1 | FLOAT | 0 | market price 1 minute midquote if not intervening printsmost recent print otherwise | |
| pnlM1 | FLOAT | 0 | pnl after 1 minute | |
| pnlM1Err | enum - YesNo | 'None' | ||
| bidPriceM10 | FLOAT | 0 | Bid price 10 minutes | |
| askPriceM10 | FLOAT | 0 | Ask price 10 minutes | |
| prtPriceM10 | FLOAT | 0 | market price 10 minutes most recent print if any otherwise midquote | |
| pnlM10 | FLOAT | 0 | pnl after 10 minutes | |
| pnlM10Err | enum - YesNo | 'None' |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| ticker_tk | 1 |
| ticker_at | 2 |
| ticker_ts | 3 |
| prtNumber | 4 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgStockPrintSet` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','SCE','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`prtNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'Unique print set identifier, will increment but not guaranteed to be sequential',
`updateType` ENUM('None','Print','Markup') NOT NULL DEFAULT 'None',
`prtExch` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP','X24') NOT NULL DEFAULT 'None' COMMENT 'print exch',
`prtSize` INT NOT NULL DEFAULT 0 COMMENT 'print size',
`prtPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'print price level',
`prtClusterNum` INT NOT NULL DEFAULT 0 COMMENT 'incremental print cluster counter (one counter per ticker; used to group prints into clusters)',
`prtClusterSize` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size of prints in this sequence (prints @ same or more aggressive price with less than 25 ms elapsing since first print; can span exchanges)',
`prtVolume` INT NOT NULL DEFAULT 0 COMMENT 'cumulative print size today',
`mrkPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'last regular market print price',
`prtType` ENUM('None','RegularSequence','OutOfSequence','VolumeOnly','ExtendedHours','OddLot','OddLotExtendedHours') NOT NULL DEFAULT 'None',
`prtCond1` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'print condition (from SIP feed)',
`prtCond2` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`prtCond3` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`prtCond4` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`prtSide` ENUM('None','Mid','Bid','Ask') NOT NULL DEFAULT 'None' COMMENT 'Print side: None; Mid; Bid; Ask',
`prtTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'exchange high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound print packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`bidPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo bid @ print arrival time',
`askPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo ask @ print arrival time',
`bidSize` INT NOT NULL DEFAULT 0,
`askSize` INT NOT NULL DEFAULT 0,
`bidPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo 2nd best bid @ print arrival time',
`askPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo 2nd best ask @ print arrival time',
`bidSize2` INT NOT NULL DEFAULT 0 COMMENT 'nbbo 2nd best bid size',
`askSize2` INT NOT NULL DEFAULT 0 COMMENT 'nbbo 2nd best ask size',
`prtProbability` FLOAT NOT NULL DEFAULT 0 COMMENT 'probability that buying prtSize shares @ prtPrice will have positive m10 pnl (prtPriceM10 >= prtPrice) [recorded at time of print]',
`bidPriceM1` FLOAT NOT NULL DEFAULT 0 COMMENT 'Bid price +1 minute',
`askPriceM1` FLOAT NOT NULL DEFAULT 0 COMMENT 'Ask price +1 minute',
`prtPriceM1` FLOAT NOT NULL DEFAULT 0 COMMENT 'market price +1 minute [mid-quote if not intervening prints;most recent print otherwise]',
`pnlM1` FLOAT NOT NULL DEFAULT 0 COMMENT 'pnl after 1 minute',
`pnlM1Err` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidPriceM10` FLOAT NOT NULL DEFAULT 0 COMMENT 'Bid price +10 minutes',
`askPriceM10` FLOAT NOT NULL DEFAULT 0 COMMENT 'Ask price +10 minutes',
`prtPriceM10` FLOAT NOT NULL DEFAULT 0 COMMENT 'market price +10 minutes [most recent print (if any) otherwise mid-quote]',
`pnlM10` FLOAT NOT NULL DEFAULT 0 COMMENT 'pnl after 10 minutes',
`pnlM10Err` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`prtNumber`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='StockPrintSet records are created for each print and published to the SpiderRock elastic cluster 10 minutes later, when T+10M markup detail is available.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`prtNumber`,
`updateType`,
`prtExch`,
`prtSize`,
`prtPrice`,
`prtClusterNum`,
`prtClusterSize`,
`prtVolume`,
`mrkPrice`,
`prtType`,
`prtCond1`,
`prtCond2`,
`prtCond3`,
`prtCond4`,
`prtSide`,
`prtTimestamp`,
`netTimestamp`,
`timestamp`,
`bidPrice`,
`askPrice`,
`bidSize`,
`askSize`,
`bidPrice2`,
`askPrice2`,
`bidSize2`,
`askSize2`,
`prtProbability`,
`bidPriceM1`,
`askPriceM1`,
`prtPriceM1`,
`pnlM1`,
`pnlM1Err`,
`bidPriceM10`,
`askPriceM10`,
`prtPriceM10`,
`pnlM10`,
`pnlM10Err`
FROM `SRAnalytics`.`MsgStockPrintSet`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','SCE','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a BIGINT */
`prtNumber` = 1234567890;
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='StockPrintSet' ORDER BY ordinal_position ASC;