MarRiskControlTkOverride
MarRiskControlTkOverride records are used to establish ticker-specific risk controls SpiderRock execution engines. These records are only viewable and editable by users belonging to the same riskFirm as the control records.
METADATA
Attribute | Value |
---|---|
Topic | 4535-risk-control |
MLink Token | SystemData |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
riskFirm | VARCHAR(16) | PRI | '' | |
riskGroup | VARCHAR(16) | PRI | '' | |
ticker_at | enum - AssetType | PRI | 'None' | |
ticker_ts | enum - TickerSrc | PRI | 'None' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
isTestAccnt | enum - YesNo | PRI | 'None' | if Yes this control applies only to risk from test accnts |
stkEnabled | enum - MarState | 'None' | ||
futEnabled | enum - MarState | 'None' | ||
optEnabled | enum - MarState | 'None' | ||
blockShortSales | enum - YesNo | 'None' | block all short sales | |
orderMaxStkQty | INT | 0 | number of equity shares that can be bought or sold by a single parent order | |
orderMaxFutQty | INT | 0 | number of futures contracts that can be bought or sold by a single parent order | |
orderMaxOptQty | INT | 0 | number of option contracts that can be bought or sold by a single parent order | |
orderMaxStkDDelta | FLOAT | 0 | maximum abs mny per stock parent order ddelta 001 shares pointValue midPrc | |
orderMaxFutDDelta | FLOAT | 0 | maximum abs mny per future parent order ddelta 001 contracts pointValue midPrc | |
orderMaxOptDDelta | FLOAT | 0 | maximum abs mny per option parent order ddelta 001 contracts pointValue ABSde uMidPrc | |
stkCollarPct | FLOAT | 0 | maximum user limit vs bidask price control | |
futCollarPct | FLOAT | 0 | maximum user limit vs bidask price control | |
optCollarPct | FLOAT | 0 | maximum user limit vs bidask price control | |
maxAccFutCnAbs | INT | 0 | max absolute net accnt future contracts | |
maxDayFutCnBot | INT | 0 | day future contracts bot | |
maxDayFutCnSld | INT | 0 | day future contracts sld | |
maxDayFutCnAbs | INT | 0 | max absolute net day future contracts | |
modifiedBy | VARCHAR(24) | '' | ||
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
riskFirm | 1 |
riskGroup | 2 |
ticker_tk | 3 |
ticker_at | 4 |
ticker_ts | 5 |
isTestAccnt | 6 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgMarRiskControlTkOverride` (
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '',
`riskGroup` VARCHAR(16) NOT NULL DEFAULT '',
`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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'if Yes, this control applies only to risk from test accnts',
`stkEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`futEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`optEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`blockShortSales` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'block all short sales',
`orderMaxStkQty` INT NOT NULL DEFAULT 0 COMMENT 'number of equity shares that can be bought or sold by a single parent order',
`orderMaxFutQty` INT NOT NULL DEFAULT 0 COMMENT 'number of futures contracts that can be bought or sold by a single parent order',
`orderMaxOptQty` INT NOT NULL DEFAULT 0 COMMENT 'number of option contracts that can be bought or sold by a single parent order',
`orderMaxStkDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per stock parent order; ddelta = 0.01 * shares * pointValue * midPrc',
`orderMaxFutDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per future parent order; ddelta = 0.01 * contracts * pointValue * midPrc',
`orderMaxOptDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per option parent order; ddelta = 0.01 * contracts * pointValue * ABS(de) * uMidPrc',
`stkCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`futCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`optCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`maxAccFutCnAbs` INT NOT NULL DEFAULT 0 COMMENT 'max absolute (net) accnt future contracts',
`maxDayFutCnBot` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts bot',
`maxDayFutCnSld` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts sld',
`maxDayFutCnAbs` INT NOT NULL DEFAULT 0 COMMENT 'max absolute (net) day future contracts',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`riskFirm`,`riskGroup`,`ticker_tk`,`ticker_at`,`ticker_ts`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='MarRiskControlTkOverride records are used to establish ticker-specific risk controls SpiderRock execution engines. These records are only viewable and editable by users belonging to the same riskFirm as the control records.';
SELECT TABLE EXAMPLE QUERY
SELECT
`riskFirm`,
`riskGroup`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`isTestAccnt`,
`stkEnabled`,
`futEnabled`,
`optEnabled`,
`blockShortSales`,
`orderMaxStkQty`,
`orderMaxFutQty`,
`orderMaxOptQty`,
`orderMaxStkDDelta`,
`orderMaxFutDDelta`,
`orderMaxOptDDelta`,
`stkCollarPct`,
`futCollarPct`,
`optCollarPct`,
`maxAccFutCnAbs`,
`maxDayFutCnBot`,
`maxDayFutCnSld`,
`maxDayFutCnAbs`,
`timestamp`
FROM `SRControl`.`MsgMarRiskControlTkOverride`
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* 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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgMarRiskControlTkOverride`
SET
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales` = 'None',
/* Replace with a INT */
`orderMaxStkQty` = 5,
/* Replace with a INT */
`orderMaxFutQty` = 5,
/* Replace with a INT */
`orderMaxOptQty` = 5,
/* Replace with a FLOAT */
`orderMaxStkDDelta` = 1.23,
/* Replace with a FLOAT */
`orderMaxFutDDelta` = 1.23,
/* Replace with a FLOAT */
`orderMaxOptDDelta` = 1.23,
/* Replace with a FLOAT */
`stkCollarPct` = 1.23,
/* Replace with a FLOAT */
`futCollarPct` = 1.23,
/* Replace with a FLOAT */
`optCollarPct` = 1.23,
/* Replace with a INT */
`maxAccFutCnAbs` = 5,
/* Replace with a INT */
`maxDayFutCnBot` = 5,
/* Replace with a INT */
`maxDayFutCnSld` = 5,
/* Replace with a INT */
`maxDayFutCnAbs` = 5,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* 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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgMarRiskControlTkOverride`(
/* Replace with a VARCHAR(16) */
`riskFirm`,
/* Replace with a VARCHAR(16) */
`riskGroup`,
/* 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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled`,
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales`,
/* Replace with a INT */
`orderMaxStkQty`,
/* Replace with a INT */
`orderMaxFutQty`,
/* Replace with a INT */
`orderMaxOptQty`,
/* Replace with a FLOAT */
`orderMaxStkDDelta`,
/* Replace with a FLOAT */
`orderMaxFutDDelta`,
/* Replace with a FLOAT */
`orderMaxOptDDelta`,
/* Replace with a FLOAT */
`stkCollarPct`,
/* Replace with a FLOAT */
`futCollarPct`,
/* Replace with a FLOAT */
`optCollarPct`,
/* Replace with a INT */
`maxAccFutCnAbs`,
/* Replace with a INT */
`maxDayFutCnBot`,
/* Replace with a INT */
`maxDayFutCnSld`,
/* Replace with a INT */
`maxDayFutCnAbs`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_riskFirm',
'Example_riskGroup',
'None',
'None',
'Example_ticker_tk',
'None',
'None',
'None',
'None',
'None',
5,
5,
5,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
5,
5,
5,
5,
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgMarRiskControlTkOverride`
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* 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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskControlTkOverride' ORDER BY ordinal_position ASC;