MarRiskControlTkOverride
MarRiskControlTkOverride records are used to establish ticker-specific risk controls within 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 | MARRisk |
| Product | SRControl |
| accessType | SELECT,UPDATE,INSERT,DELETE |
| MLink Endpoint | MLink-Live |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| riskFirm | VARCHAR(16) | PRI | '' | |
| riskGroup | VARCHAR(16) | PRI | '' | |
| ticker_at | enum - AssetType | PRI | 'None' | exact ticker EQT a futures product key ES MES the product grain REQUIRED for futures its own contracts and currency DFLT standing in when it has no row a futures family head ES the family grain OPTIONAL Primary contracts and the realm currency no default both apply when both exist DFLTsrcat default for every product of that tickerSrc assetType with no exact record wildcard tickers are refused |
| ticker_ts | enum - TickerSrc | PRI | 'None' | exact ticker EQT a futures product key ES MES the product grain REQUIRED for futures its own contracts and currency DFLT standing in when it has no row a futures family head ES the family grain OPTIONAL Primary contracts and the realm currency no default both apply when both exist DFLTsrcat default for every product of that tickerSrc assetType with no exact record wildcard tickers are refused |
| ticker_tk | VARCHAR(12) | PRI | '' | exact ticker EQT a futures product key ES MES the product grain REQUIRED for futures its own contracts and currency DFLT standing in when it has no row a futures family head ES the family grain OPTIONAL Primary contracts and the realm currency no default both apply when both exist DFLTsrcat default for every product of that tickerSrc assetType with no exact record wildcard tickers are refused |
| isTestAccnt | enum - YesNo | PRI | 'None' | if Yes this control applies only to risk from test accnts |
| riskLevel | enum - MarRiskLevel | PRI | 'None' | AccountConfig risk level this override binds to a None record binds to no level and is never enforced writes require a real level |
| stkEnabled | enum - MarState | 'None' | ||
| futEnabled | enum - MarState | 'None' | ||
| optEnabled | enum - MarState | 'None' | ||
| futOptEnabled | enum - MarState | 'None' | futures options enable required per declared risk level at product grain | |
| blockShortSales | enum - YesNo | 'None' | block all short sales | |
| orderMaxStkQty | INT | -1 | number of equity shares that can be bought or sold by a single parent order | |
| orderMaxFutQty | INT | -1 | futures contracts per parent order in the rows grain a product rows own contracts a head rows family Primary contracts an MES order of 100 is 10 ES at the head | |
| orderMaxOptQty | INT | -1 | number of option contracts that can be bought or sold by a single parent order Primary units for futures options | |
| orderMaxStkDDelta | FLOAT | -1 | maximum abs mny per stock parent order ddelta shares pointValue midPrc | |
| orderMaxFutDDelta | FLOAT | -1 | maximum abs mny per future parent order ddelta contracts pointValue midPrc | |
| orderMaxOptDDelta | FLOAT | -1 | maximum abs mny per option parent order ddelta contracts pointValue ABSde uMidPrc | |
| stkCollarPct | FLOAT | -1 | Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals | |
| futCollarPct | FLOAT | -1 | Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals | |
| optCollarPct | FLOAT | -1 | Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals | |
| maxAccFutCnAbs | INT | -1 | max absolute net accnt future contracts in the rows grain a product rows own a head rows family Primarys MES counts 01 ES at the head | |
| maxDayFutCnBot | INT | -1 | day future contracts bot in the rows grain own contracts on a product row Primary units on a head row | |
| maxDayFutCnSld | INT | -1 | day future contracts sld in the rows grain own contracts on a product row Primary units on a head row | |
| maxDayFutCnAbs | INT | -1 | max absolute net day future contracts in the rows grain own contracts on a product row Primary units on a head row | |
| modifiedBy | VARCHAR(24) | '' | ||
| modifiedIn | enum - SysEnvironment | 'None' | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
| currency | enum - Currency | 'None' | the currency the money limits are stated in the products on a product row the realms on a family row None reads as the rows grain default |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| riskFirm | 1 |
| riskGroup | 2 |
| ticker_tk | 3 |
| ticker_at | 4 |
| ticker_ts | 5 |
| isTestAccnt | 6 |
| riskLevel | 7 |
SELECT TABLE EXAMPLE QUERY
SELECT *
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','RATE','CRDT','GCR','SWAP','ENT','MBS','SET','LOAN') */
`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','ICEFEC','ICEFEF','CEQT','TSX','TMX','CRCY','CMDY','DTI','SOVN','SR_US','SR_EU','SR_AP','SR_UK','USD','EUR','GBP','CHF','JPY','CAD','AUD','HKD','KRW','INR','SGD','TWD','CNY','CNH','BRL','MXN','ZAR','SEK','NOK','DKK','PLN','ILS','TRY','NZD','THB','MYR','IDR','PHP','CZK','HUF','SAR','AED','CLP','COP') */
`ticker_ts` = 'NONE'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'NONE'
AND
/* Replace with a ENUM('None','ExsOnSpons','ExsOnCore','SponsOnCore','CoreOnCore','CoreOnSub','CoreOnAccnt','SubOnAccnt','CoreOnCustom','SubOnCustom','CFirmOnCore') */
`riskLevel` = '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','Enable','Disabled','CloseOnly') */
`futOptEnabled` = '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',
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX','DKK','GEL','HKD','INR','SGD','TWD','ILS','PLN','THB','IDR','PHP','SAR','AED','CLP','COP') */
`currency` = 'NONE'
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','RATE','CRDT','GCR','SWAP','ENT','MBS','SET','LOAN') */
`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','ICEFEC','ICEFEF','CEQT','TSX','TMX','CRCY','CMDY','DTI','SOVN','SR_US','SR_EU','SR_AP','SR_UK','USD','EUR','GBP','CHF','JPY','CAD','AUD','HKD','KRW','INR','SGD','TWD','CNY','CNH','BRL','MXN','ZAR','SEK','NOK','DKK','PLN','ILS','TRY','NZD','THB','MYR','IDR','PHP','CZK','HUF','SAR','AED','CLP','COP') */
`ticker_ts` = 'NONE'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'NONE'
AND
/* Replace with a ENUM('None','ExsOnSpons','ExsOnCore','SponsOnCore','CoreOnCore','CoreOnSub','CoreOnAccnt','SubOnAccnt','CoreOnCustom','SubOnCustom','CFirmOnCore') */
`riskLevel` = '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','RATE','CRDT','GCR','SWAP','ENT','MBS','SET','LOAN') */
`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','SCE','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFEC','ICEFEF','CEQT','TSX','TMX','CRCY','CMDY','DTI','SOVN','SR_US','SR_EU','SR_AP','SR_UK','USD','EUR','GBP','CHF','JPY','CAD','AUD','HKD','KRW','INR','SGD','TWD','CNY','CNH','BRL','MXN','ZAR','SEK','NOK','DKK','PLN','ILS','TRY','NZD','THB','MYR','IDR','PHP','CZK','HUF','SAR','AED','CLP','COP') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt`,
/* Replace with a ENUM('None','ExsOnSpons','ExsOnCore','SponsOnCore','CoreOnCore','CoreOnSub','CoreOnAccnt','SubOnAccnt','CoreOnCustom','SubOnCustom','CFirmOnCore') */
`riskLevel`,
/* 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','Enable','Disabled','CloseOnly') */
`futOptEnabled`,
/* 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`,
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX','DKK','GEL','HKD','INR','SGD','TWD','ILS','PLN','THB','IDR','PHP','SAR','AED','CLP','COP') */
`currency`
)
VALUES(
'Example_riskFirm',
'Example_riskGroup',
'NONE',
'NONE',
'Example_ticker_tk',
'NONE',
'NONE',
'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',
'NONE'
);
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','RATE','CRDT','GCR','SWAP','ENT','MBS','SET','LOAN') */
`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','ICEFEC','ICEFEF','CEQT','TSX','TMX','CRCY','CMDY','DTI','SOVN','SR_US','SR_EU','SR_AP','SR_UK','USD','EUR','GBP','CHF','JPY','CAD','AUD','HKD','KRW','INR','SGD','TWD','CNY','CNH','BRL','MXN','ZAR','SEK','NOK','DKK','PLN','ILS','TRY','NZD','THB','MYR','IDR','PHP','CZK','HUF','SAR','AED','CLP','COP') */
`ticker_ts` = 'NONE'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'NONE'
AND
/* Replace with a ENUM('None','ExsOnSpons','ExsOnCore','SponsOnCore','CoreOnCore','CoreOnSub','CoreOnAccnt','SubOnAccnt','CoreOnCustom','SubOnCustom','CFirmOnCore') */
`riskLevel` = 'NONE';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskControlTkOverride' ORDER BY ordinal_position ASC;