Skip to main content
Version: Upcoming

MarRiskControl

V8 Message Definiton

MarRiskControl records are used to establish 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

AttributeValue
Topic4535-risk-control
MLink TokenMARRisk
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE
MLink EndpointMLink-Live

Table Definition

FieldTypeKeyDefault ValueComment
riskFirmVARCHAR(16)PRI''If exists a client firm imposing risk controls should be an existing SR client ID
riskGroupVARCHAR(16)PRI''The ID of the risk group these rules will apply to
isTestAccntenum - YesNoPRI'None'If Yes this control applies only to risk for test accounts
stkEnabledenum - MarState'None'Enabled or not for equities Nonedisabled
futEnabledenum - MarState'None'Enabled or not for futures Nonedisabled
optEnabledenum - MarState'None'Enabled or not for options Nonedisabled
marginLimitAccFLOAT0Maximum net per symbol total portfolio startofday positions day trades margin can include external sources
marginLimitDayFLOAT0Maximum net per symbolday day portfolio day trades only margin can include external sources
openExposureLimitFLOAT0Maximum abs open child order Delta no netting open child orders only
maxAccFutCnAbsINT0Maximum absolute net account future contracts
maxDayFutCnBotINT0Day future contracts bot
maxDayFutCnSldINT0Day future contracts sld
maxDayFutCnAbsINT0Maximum absolute net day future contracts
orderMaxStkQtyINT0Number of equity shares that can be bought or sold by a single parent order Has a maximum value of 10M
orderMaxFutQtyINT0Number of futures contracts that can be bought or sold by a single parent order
orderMaxOptQtyINT0Number of option contracts that can be bought or sold by a single parent order
orderMaxStkDDeltaFLOAT0Maximum abs mny per stock parent order ddelta shares pointValue midPrc
orderMaxFutDDeltaFLOAT0Maximum abs mny per future parent order ddelta contracts pointValue midPrc
orderMaxOptDDeltaFLOAT0Maximum abs mny per option parent order ddelta contracts pointValue ABSde uMidPrc
stkCollarPctFLOAT0Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals
futCollarPctFLOAT0Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals
optCollarPctFLOAT0Maximum user limit vs bidask price control percentage as a number between 0 and 1 in decimals
allowStkOddLotsenum - YesNo'None'Allow parent stock orders with an order size below 100
allowLimitOnCloseenum - YesNo'None'Allow limit on close orders similar to MOC order with the addition of a price limit
allowMarketOnCloseenum - YesNo'None'Allow market on close orders special order type which is executed as close to the close of trading as possible
allowInterMarketSweepenum - YesNo'None'Allow intermarket sweep orders
blockShortSalesenum - YesNo'None'Block all short sales
modifiedByVARCHAR(24)''User that last modified this record
modifiedInenum - SysEnvironment'None'Environment this record was last updated in
timestampDATETIME(6)'1900-01-01 00:00:00.000000'Timestamp of this record

PRIMARY KEY DEFINITION (Unique)

FieldSequence
riskFirm1
riskGroup2
isTestAccnt3

SELECT TABLE EXAMPLE QUERY

SELECT *
FROM `SRControl`.`MsgMarRiskControl`
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgMarRiskControl` 
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 FLOAT */
`marginLimitAcc` = 1.23,
/* Replace with a FLOAT */
`marginLimitDay` = 1.23,
/* Replace with a FLOAT */
`openExposureLimit` = 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 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 ENUM('None','Yes','No') */
`allowStkOddLots` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`allowLimitOnClose` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`allowMarketOnClose` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`allowInterMarketSweep` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales` = 'None',
/* 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','Yes','No') */
`isTestAccnt` = 'None';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgMarRiskControl`(
/* Replace with a VARCHAR(16) */
`riskFirm`,
/* Replace with a VARCHAR(16) */
`riskGroup`,
/* 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 FLOAT */
`marginLimitAcc`,
/* Replace with a FLOAT */
`marginLimitDay`,
/* Replace with a FLOAT */
`openExposureLimit`,
/* Replace with a INT */
`maxAccFutCnAbs`,
/* Replace with a INT */
`maxDayFutCnBot`,
/* Replace with a INT */
`maxDayFutCnSld`,
/* Replace with a INT */
`maxDayFutCnAbs`,
/* 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 ENUM('None','Yes','No') */
`allowStkOddLots`,
/* Replace with a ENUM('None','Yes','No') */
`allowLimitOnClose`,
/* Replace with a ENUM('None','Yes','No') */
`allowMarketOnClose`,
/* Replace with a ENUM('None','Yes','No') */
`allowInterMarketSweep`,
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_riskFirm',
'Example_riskGroup',
'None',
'None',
'None',
'None',
1.23,
1.23,
1.23,
5,
5,
5,
5,
5,
5,
5,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'None',
'None',
'None',
'None',
'None',
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgMarRiskControl` 
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskControl' ORDER BY ordinal_position ASC;