OptAwayTktGateway
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
| Attribute | Value |
|---|---|
| Topic | 5120-srse-gateway |
| MLink Token | Internal |
| Product | SRTrade |
| accessType | SELECT,UPDATE,INSERT,DELETE |
| MLink Endpoint | MLink-Live |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| accnt | VARCHAR(16) | PRI | '' | |
| clientFillID | BIGINT | PRI | 0 | client execution ID these must be unique on a peraccount basis copied into SpdrParentExecutionaltFillId |
| clientFirm | VARCHAR(16) | PRI | '' | |
| clientOrderID | VARCHAR(24) | '' | client orderID copied into SpdrParentExecutionaltOrderId | |
| riskGroupId | CHAR(19) | '0000-0000-0000-0000' | Default 0 none Required to be nonzero if incorporating risk into an existing riskGroupId | |
| reqAuxRiskGroupCtrl | enum - YesNo | 'None' | ||
| okey_at | enum - AssetType | 'None' | ||
| okey_ts | enum - TickerSrc | 'None' | ||
| okey_tk | VARCHAR(12) | '' | ||
| okey_yr | SMALLINT UNSIGNED | 0 | ||
| okey_mn | TINYINT UNSIGNED | 0 | ||
| okey_dy | TINYINT UNSIGNED | 0 | ||
| okey_xx | DOUBLE | 0 | ||
| okey_cp | enum - CallPut | 'Call' | ||
| fillSide | enum - BuySell | 'None' | ||
| fillPrice | DOUBLE | 0 | ||
| fillQuantity | INT | 0 | ||
| fillRefUPrc | DOUBLE | 0 | reference underlier price fill arrival time | |
| priceType | enum - PriceType | 'Explicit' | ||
| positionType | enum - PositionType | 'None' | ||
| theoVol | FLOAT | 0 | client supplied theoretical volatility used for markup only | |
| deliverExecReport | enum - YesNo | 'No' | Drop a copy of the execution report | |
| SRfillID | BIGINT | 0 | SR internal fill number any values submitted will be overwritten by the SR generated fill number copied in SpdrParentExecutionpkeyfillNumber | |
| comment | VARCHAR(64) | '' | text comment if any | |
| execBrkr | VARCHAR(16) | '' | used to reflect field from a downstream destination back up to and upstream fill report | |
| userData1 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
| userData2 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
| strategy | VARCHAR(36) | '' | clientsupplied strategy string | |
| fillDttm | DATETIME(6) | '1900-01-01' | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
| checksum | TINYINT UNSIGNED | 0 | Must be set to 13 This helps detect some columnvalue misalignments |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| accnt | 1 |
| clientFillID | 2 |
| clientFirm | 3 |
SELECT TABLE EXAMPLE QUERY
SELECT *
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','RATE') */
`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','SCE','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFEC','ICEFEF','CEQT','TSX','TMX') */
`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','DeltaAdjClose','PctOnClose') */
`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(16) */
`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','RATE') */
`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','SCE','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFEC','ICEFEF','CEQT','TSX','TMX') */
`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','DeltaAdjClose','PctOnClose') */
`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(16) */
`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;