Skip to main content
Version: 8.4.12.1

OptAwayTktGateway

V8 Message Definiton

OptAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools. Replaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.

METADATA

AttributeValue
Topic5120-srse-gateway
MLink TokenInternal
ProductSRTrade
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
clientFillIDBIGINTPRI0client execution ID these must be unique on a peraccount basis copied into SpdrParentExecutionaltFillId
clientFirmVARCHAR(16)PRI''
clientOrderIDVARCHAR(24)''client orderID copied into SpdrParentExecutionaltOrderId
riskGroupIdCHAR(19)'0000-0000-0000-0000'Default 0 none Required to be nonzero if incorporating risk into an existing riskGroupId
reqAuxRiskGroupCtrlenum - YesNo'None'
okey_atenum - AssetType'None'
okey_tsenum - TickerSrc'None'
okey_tkVARCHAR(12)''
okey_yrSMALLINT UNSIGNED0
okey_mnTINYINT UNSIGNED0
okey_dyTINYINT UNSIGNED0
okey_xxDOUBLE0
okey_cpenum - CallPut'Call'
fillSideenum - BuySell'None'
fillPriceDOUBLE0
fillQuantityINT0
fillRefUPrcDOUBLE0reference underlier price fill arrival time
priceTypeenum - PriceType'Explicit'
positionTypeenum - PositionType'None'
theoVolFLOAT0client supplied theoretical volatility used for markup only
deliverExecReportenum - YesNo'No'Drop a copy of the execution report
SRfillIDBIGINT0SR internal fill number any values submitted will be overwritten by the SR generated fill number copied in SpdrParentExecutionpkeyfillNumber
commentVARCHAR(64)''text comment if any
execBrkrVARCHAR(12)''used to reflect field from a downstream destination back up to and upstream fill report
userData1TINYTEXT''client supplied data field passes through to parent and child executions and reports as well as FIX drops
userData2TINYTEXT''client supplied data field passes through to parent and child executions and reports as well as FIX drops
strategyVARCHAR(36)''clientsupplied strategy string
fillDttmDATETIME(6)'1900-01-01'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'
checksumTINYINT UNSIGNED0Must be set to 13 This helps detect some columnvalue misalignments

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
clientFillID2
clientFirm3

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgOptAwayTktGateway` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'client execution ID, these must be unique on a per-account basis [copied into SpdrParentExecution.altFillId]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`clientOrderID` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'client orderID [copied into SpdrParentExecution.altOrderId]',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'Default: 0 (none). Required to be non-zero if incorporating risk into an existing riskGroupId',
`reqAuxRiskGroupCtrl` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`fillSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`fillPrice` DOUBLE NOT NULL DEFAULT 0,
`fillQuantity` INT NOT NULL DEFAULT 0,
`fillRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price @ fill arrival time',
`priceType` ENUM('None','Explicit','Offset','Zero') NOT NULL DEFAULT 'Explicit',
`positionType` ENUM('None','Opening','Closing') NOT NULL DEFAULT 'None',
`theoVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'client supplied theoretical volatility (used for markup only)',
`deliverExecReport` ENUM('Yes','No') NOT NULL DEFAULT 'No' COMMENT 'Drop a copy of the execution report',
`SRfillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'SR internal fill number, any values submitted will be overwritten by the SR generated fill number [copied in SpdrParentExecution.pkey.fillNumber]',
`comment` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'text comment (if any)',
`execBrkr` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'used to reflect field from a downstream destination back up to and upstream fill report',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client-supplied strategy string',
`fillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`checksum` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Must be set to 13. This helps detect some column,value misalignments.',
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`accnt`,`clientFillID`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='OptAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools.\nReplaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`clientFillID`,
`clientFirm`,
`clientOrderID`,
`riskGroupId`,
`reqAuxRiskGroupCtrl`,
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`fillSide`,
`fillPrice`,
`fillQuantity`,
`fillRefUPrc`,
`priceType`,
`positionType`,
`theoVol`,
`deliverExecReport`,
`SRfillID`,
`comment`,
`execBrkr`,
`userData1`,
`userData2`,
`strategy`,
`fillDttm`,
`timestamp`,
`checksum`
FROM `SRTrade`.`MsgOptAwayTktGateway`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRTrade`.`MsgOptAwayTktGateway` 
SET
/* Replace with a VARCHAR(24) */
`clientOrderID` = 'Example_clientOrderID',
/* Replace with a CHAR(19) */
`riskGroupId` = 'Example_riskGroupId',
/* Replace with a ENUM('None','Yes','No') */
`reqAuxRiskGroupCtrl` = 'None',
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None',
/* 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','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None',
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk',
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123,
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1,
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1,
/* Replace with a DOUBLE */
`okey_xx` = 4.56,
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call',
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide` = 'None',
/* Replace with a DOUBLE */
`fillPrice` = 4.56,
/* Replace with a INT */
`fillQuantity` = 5,
/* Replace with a DOUBLE */
`fillRefUPrc` = 4.56,
/* Replace with a ENUM('None','Explicit','Offset','Zero') */
`priceType` = 'Explicit',
/* Replace with a ENUM('None','Opening','Closing') */
`positionType` = 'None',
/* Replace with a FLOAT */
`theoVol` = 1.23,
/* Replace with a ENUM('Yes','No') */
`deliverExecReport` = 'No',
/* Replace with a BIGINT */
`SRfillID` = 1234567890,
/* Replace with a VARCHAR(64) */
`comment` = 'Example_comment',
/* Replace with a VARCHAR(12) */
`execBrkr` = 'Example_execBrkr',
/* Replace with a TINYTEXT */
`userData1` = 'dummy tiny text',
/* Replace with a TINYTEXT */
`userData2` = 'dummy tiny text',
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy',
/* Replace with a DATETIME(6) */
`fillDttm` = '2022-01-01 12:34:56.000000',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYINT UNSIGNED */
`checksum` = 1
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRTrade`.`MsgOptAwayTktGateway`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a BIGINT */
`clientFillID`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a VARCHAR(24) */
`clientOrderID`,
/* Replace with a CHAR(19) */
`riskGroupId`,
/* Replace with a ENUM('None','Yes','No') */
`reqAuxRiskGroupCtrl`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_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','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts`,
/* Replace with a VARCHAR(12) */
`okey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`okey_yr`,
/* Replace with a TINYINT UNSIGNED */
`okey_mn`,
/* Replace with a TINYINT UNSIGNED */
`okey_dy`,
/* Replace with a DOUBLE */
`okey_xx`,
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp`,
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide`,
/* Replace with a DOUBLE */
`fillPrice`,
/* Replace with a INT */
`fillQuantity`,
/* Replace with a DOUBLE */
`fillRefUPrc`,
/* Replace with a ENUM('None','Explicit','Offset','Zero') */
`priceType`,
/* Replace with a ENUM('None','Opening','Closing') */
`positionType`,
/* Replace with a FLOAT */
`theoVol`,
/* Replace with a ENUM('Yes','No') */
`deliverExecReport`,
/* Replace with a BIGINT */
`SRfillID`,
/* Replace with a VARCHAR(64) */
`comment`,
/* Replace with a VARCHAR(12) */
`execBrkr`,
/* Replace with a TINYTEXT */
`userData1`,
/* Replace with a TINYTEXT */
`userData2`,
/* Replace with a VARCHAR(36) */
`strategy`,
/* Replace with a DATETIME(6) */
`fillDttm`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYINT UNSIGNED */
`checksum`
)
VALUES(
'Example_accnt',
1234567890,
'Example_clientFirm',
'Example_clientOrderID',
'Example_riskGroupId',
'None',
'None',
'None',
'Example_okey_tk',
123,
1,
1,
4.56,
'Call',
'None',
4.56,
5,
4.56,
'Explicit',
'None',
1.23,
'No',
1234567890,
'Example_comment',
'Example_execBrkr',
'dummy tiny text',
'dummy tiny text',
'Example_strategy',
'2022-01-01 12:34:56.000000',
'2022-01-01 12:34:56.000000',
1
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRTrade`.`MsgOptAwayTktGateway` 
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='OptAwayTktGateway' ORDER BY ordinal_position ASC;