ClientAccountConfig
METADATA
Attribute | Value |
---|---|
Topic | 1800-client-config |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | |
clientFirm | VARCHAR(16) | PRI | '' | SR assigned client firm acronym |
clientTags | TEXT | '' | optional user defined account tags eg tagtagtagtag max of 10000 total chars including seps | |
proxyFirm1 | VARCHAR(16) | '' | proxy firm 1 | |
proxyFirm2 | VARCHAR(16) | '' | proxy firm 2 | |
proxyFirm3 | VARCHAR(16) | '' | proxy firm 3 | |
theoModel | VARCHAR(16) | '' | theo model empty use default from SR account config | |
theoModel2 | VARCHAR(16) | '' | theo model2 empty use default from SR account config | |
hedgeDeltaRule | enum - HedgeDeltaRule | 'None' | HedgeDelta Source IVol use SR implied surface sticky strike IvS use SR surface dynamic TVol use user supplied theo surface sticky strike TvS use user supplied theo surface dynamic AccountConfighedgeDelta | |
binaryDays | FLOAT | -1 | used to force delta calcs binary prior to expiration 1 use SR account config value can be overridden by SymbolControlbinaryDays | |
accntColor | VARCHAR(16) | '' | color used to display this account | |
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 |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
clientFirm | 2 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgClientAccountConfig` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm acronym',
`clientTags` TEXT NOT NULL DEFAULT '' COMMENT '(optional) user defined account tag(s) (eg. tag,tag,tag,tag) [max of 10,000 total chars (including seps)]' CHECK(LENGTH(clientTags) <= 10000),
`proxyFirm1` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'proxy firm #1',
`proxyFirm2` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'proxy firm #2',
`proxyFirm3` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'proxy firm #3',
`theoModel` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'theo model (empty = use default from SR account config)',
`theoModel2` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'theo model2 (empty = use default from SR account config)',
`hedgeDeltaRule` ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') NOT NULL DEFAULT 'None' COMMENT 'HedgeDelta Source (IVol = use SR implied surface (sticky strike), IvS = use SR surface (dynamic), TVol = use user supplied theo surface (sticky strike), TvS = use user supplied theo surface (dynamic)) [AccountConfig.hedgeDelta]',
`binaryDays` FLOAT NOT NULL DEFAULT -1 COMMENT 'used to force delta calcs binary prior to expiration (-1 = use SR account config value) (can be overridden by SymbolControl.binaryDays)',
`accntColor` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'color used to display this account',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`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' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`clientFirm`,
`clientTags`,
`proxyFirm1`,
`proxyFirm2`,
`proxyFirm3`,
`theoModel`,
`theoModel2`,
`hedgeDeltaRule`,
`binaryDays`,
`accntColor`,
`timestamp`
FROM `SRControl`.`MsgClientAccountConfig`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgClientAccountConfig`
SET
/* Replace with a TEXT */
`clientTags` = 'dummy text',
/* Replace with a VARCHAR(16) */
`proxyFirm1` = 'Example_proxyFirm1',
/* Replace with a VARCHAR(16) */
`proxyFirm2` = 'Example_proxyFirm2',
/* Replace with a VARCHAR(16) */
`proxyFirm3` = 'Example_proxyFirm3',
/* Replace with a VARCHAR(16) */
`theoModel` = 'Example_theoModel',
/* Replace with a VARCHAR(16) */
`theoModel2` = 'Example_theoModel2',
/* Replace with a ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') */
`hedgeDeltaRule` = 'None',
/* Replace with a FLOAT */
`binaryDays` = 1.23,
/* Replace with a VARCHAR(16) */
`accntColor` = 'Example_accntColor',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgClientAccountConfig`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a TEXT */
`clientTags`,
/* Replace with a VARCHAR(16) */
`proxyFirm1`,
/* Replace with a VARCHAR(16) */
`proxyFirm2`,
/* Replace with a VARCHAR(16) */
`proxyFirm3`,
/* Replace with a VARCHAR(16) */
`theoModel`,
/* Replace with a VARCHAR(16) */
`theoModel2`,
/* Replace with a ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') */
`hedgeDeltaRule`,
/* Replace with a FLOAT */
`binaryDays`,
/* Replace with a VARCHAR(16) */
`accntColor`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
'Example_clientFirm',
'dummy text',
'Example_proxyFirm1',
'Example_proxyFirm2',
'Example_proxyFirm3',
'Example_theoModel',
'Example_theoModel2',
'None',
1.23,
'Example_accntColor',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgClientAccountConfig`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='ClientAccountConfig' ORDER BY ordinal_position ASC;