AwayStockLocateGateway
Records inserted into this table represent locates that clients have received away from SpiderRock. After validation, any away locate inserted into this table is turned into a StockLocateResponse record and appears in the StockLocateResponse table.
METADATA
Attribute | Value |
---|---|
Topic | 5120-srse-gateway |
MLink Token | Internal |
Product | SRControl |
accessType | SELECT,UPDATE(locateQuan),INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'EQT' | |
ticker_ts | enum - TickerSrc | PRI | 'NMS' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
coreClientFirm | VARCHAR(16) | PRI | '' | |
locateFirm | VARCHAR(6) | PRI | '' | |
locatePool | VARCHAR(16) | PRI | '' | locate pool firm granting the locate |
locateQuan | INT | 0 | ||
isLocateExempt | enum - YesNo | 'None' | Yes ticker is locate exempt only allowed for market makers | |
altSecurityId | VARCHAR(12) | '' | An alternative securityID can be cusip or other | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | will be set by SRSE server on upload |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
coreClientFirm | 4 |
locateFirm | 5 |
locatePool | 6 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgAwayStockLocateGateway` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'EQT',
`ticker_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 'NMS',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`coreClientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`locateFirm` VARCHAR(6) NOT NULL DEFAULT '',
`locatePool` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'locate pool @ firm granting the locate',
`locateQuan` INT NOT NULL DEFAULT 0,
`isLocateExempt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'Yes = ticker is locate exempt (only allowed for market makers)',
`altSecurityId` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'An alternative securityID (can be cusip or other)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'will be set by SRSE server on upload',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`coreClientFirm`,`locateFirm`,`locatePool`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records inserted into this table represent locates that clients have received away from SpiderRock. After validation, any away locate inserted into this table is turned into a StockLocateResponse record and appears in the StockLocateResponse table.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`coreClientFirm`,
`locateFirm`,
`locatePool`,
`locateQuan`,
`isLocateExempt`,
`altSecurityId`,
`timestamp`
FROM `SRControl`.`MsgAwayStockLocateGateway`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'EQT'
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','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'NMS'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`coreClientFirm` = 'Example_coreClientFirm'
AND
/* Replace with a VARCHAR(6) */
`locateFirm` = 'Example_locateFirm'
AND
/* Replace with a VARCHAR(16) */
`locatePool` = 'Example_locatePool';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgAwayStockLocateGateway`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* 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','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a VARCHAR(16) */
`coreClientFirm`,
/* Replace with a VARCHAR(6) */
`locateFirm`,
/* Replace with a VARCHAR(16) */
`locatePool`,
/* Replace with a INT */
`locateQuan`,
/* Replace with a ENUM('None','Yes','No') */
`isLocateExempt`,
/* Replace with a VARCHAR(12) */
`altSecurityId`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'EQT',
'NMS',
'Example_ticker_tk',
'Example_coreClientFirm',
'Example_locateFirm',
'Example_locatePool',
5,
'None',
'Example_altSecurityId',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgAwayStockLocateGateway`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'EQT'
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','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'NMS'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`coreClientFirm` = 'Example_coreClientFirm'
AND
/* Replace with a VARCHAR(6) */
`locateFirm` = 'Example_locateFirm'
AND
/* Replace with a VARCHAR(16) */
`locatePool` = 'Example_locatePool';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='AwayStockLocateGateway' ORDER BY ordinal_position ASC;