SRRiskGroupAllocation
METADATA
| Attribute | Value |
|---|---|
| Topic | 3695-order-allocation |
| MLink Token | ClientTrading |
| Product | SRTrade |
| accessType | SELECT,INSERT |
| MLink Endpoint | MLink-Order |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| riskGroupId | CHAR(19) | PRI | '0000-0000-0000-0000' | all orders sharing this riskGroupId share a common set of risk counters |
| omniAccnt | VARCHAR(16) | PRI | '' | omnibus accnt SR accnt |
| omniCFirm | VARCHAR(16) | PRI | '' | SR client firm |
| tradeDate | DATE | '1900-01-01' | trading date this instruction applies to | |
| allocationRule | enum - AllocationRule | 'None' | fragment sizing Hamilton largest remainder the default | |
| modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
| modifiedIn | enum - SysEnvironment | 'None' | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification | |
| FragmentsList | JSON | 'JSON_ARRAY()' |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| riskGroupId | 1 |
| omniAccnt | 2 |
| omniCFirm | 3 |
JSON Block (FragmentsList)
| Field | Type | Comment |
|---|---|---|
| fragAccnt | enum - fragAccnt | target SR alloc accnt |
| fragCFirm | enum - fragCFirm | SR client firm |
| allocFraction | enum - allocFraction | target share of fills fractions sum to 10 |
SELECT TABLE EXAMPLE QUERY
SELECT *
FROM `SRTrade`.`MsgSRRiskGroupAllocation`
WHERE
/* Replace with a CHAR(19) */
`riskGroupId` = 'Example_riskGroupId'
AND
/* Replace with a VARCHAR(16) */
`omniAccnt` = 'Example_omniAccnt'
AND
/* Replace with a VARCHAR(16) */
`omniCFirm` = 'Example_omniCFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRTrade`.`MsgSRRiskGroupAllocation`(
/* Replace with a CHAR(19) */
`riskGroupId`,
/* Replace with a VARCHAR(16) */
`omniAccnt`,
/* Replace with a VARCHAR(16) */
`omniCFirm`,
/* Replace with a DATE */
`tradeDate`,
/* Replace with a ENUM('None','Hamilton','LargestWins') */
`allocationRule`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a JSON */
`FragmentsList`
)
VALUES(
'Example_riskGroupId',
'Example_omniAccnt',
'Example_omniCFirm',
'2022-01-01',
'None',
'2022-01-01 12:34:56.000000',
'{"key": "value"}'
);
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRRiskGroupAllocation' ORDER BY ordinal_position ASC;