Skip to main content
Version: Staging

SodCashRecordV5

V8 Message Definiton

SodCashRecords contain a start-of-day currency position that derived from dividend or corporate action being applied to a prior period position.\nThese records are computed and published by SR rotation servers.

METADATA

AttributeValue
Topic4740-risk-v5
MLink TokenSystemData
ProductSRRisk
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
currencyenum - CurrencyPRI'None'
tradeDateDATEPRI'1900-01-01'
srcTransactionenum - SrcTransactionPRI'None'
srcSecKey_atenum - AssetTypePRI'None'prior period sec key that this position record derived from if any
srcSecKey_tsenum - TickerSrcPRI'None'prior period sec key that this position record derived from if any
srcSecKey_tkVARCHAR(12)PRI''prior period sec key that this position record derived from if any
srcSecKey_yrSMALLINT UNSIGNEDPRI0prior period sec key that this position record derived from if any
srcSecKey_mnTINYINT UNSIGNEDPRI0prior period sec key that this position record derived from if any
srcSecKey_dyTINYINT UNSIGNEDPRI0prior period sec key that this position record derived from if any
srcSecKey_xxDOUBLEPRI0prior period sec key that this position record derived from if any
srcSecKey_cpenum - CallPutPRI'Call'prior period sec key that this position record derived from if any
srcSecTypeenum - SpdrKeyTypePRI'None'
srcTradeDateDATEPRI'1900-01-01'prior period trade date that this position record derived from
clientFirmVARCHAR(16)PRI''SR assigned client firm
srCashAmountDOUBLE0
clrCashAmountDOUBLE0
commentTINYTEXT''source description if any
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
currency2
tradeDate3
srcTransaction4
srcSecKey_tk5
srcSecKey_yr6
srcSecKey_mn7
srcSecKey_dy8
srcSecKey_xx9
srcSecKey_cp10
srcSecKey_at11
srcSecKey_ts12
srcSecType13
srcTradeDate14
clientFirm15

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRRisk`.`MsgSodCashRecordV5` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`currency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`srcTransaction` ENUM('None','ExAsTrans','Dividend','CashTakeout','SecLending') NOT NULL DEFAULT 'None',
`srcSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`srcTradeDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT 'prior period trade date that this position record derived from',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`srCashAmount` DOUBLE NOT NULL DEFAULT 0,
`clrCashAmount` DOUBLE NOT NULL DEFAULT 0,
`comment` TINYTEXT NOT NULL DEFAULT '' COMMENT 'source description (if any)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`accnt`,`currency`,`tradeDate`,`srcTransaction`,`srcSecKey_tk`,`srcSecKey_yr`,`srcSecKey_mn`,`srcSecKey_dy`,`srcSecKey_xx`,`srcSecKey_cp`,`srcSecKey_at`,`srcSecKey_ts`,`srcSecType`,`srcTradeDate`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SodCashRecords contain a start-of-day currency position that derived from dividend or corporate action being applied to a prior period position.\nThese records are computed and published by SR rotation servers.';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`currency`,
`tradeDate`,
`srcTransaction`,
`srcSecKey_at`,
`srcSecKey_ts`,
`srcSecKey_tk`,
`srcSecKey_yr`,
`srcSecKey_mn`,
`srcSecKey_dy`,
`srcSecKey_xx`,
`srcSecKey_cp`,
`srcSecType`,
`srcTradeDate`,
`clientFirm`,
`srCashAmount`,
`clrCashAmount`,
`comment`,
`timestamp`
FROM `SRRisk`.`MsgSodCashRecordV5`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') */
`currency` = 'None'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01'
AND
/* Replace with a ENUM('None','ExAsTrans','Dividend','CashTakeout','SecLending') */
`srcTransaction` = 'None'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`srcSecKey_at` = 'None'
AND
/* 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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`srcSecKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`srcSecKey_tk` = 'Example_srcSecKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`srcSecKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`srcSecKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`srcSecKey_dy` = 1
AND
/* Replace with a DOUBLE */
`srcSecKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`srcSecKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`srcSecType` = 'None'
AND
/* Replace with a DATE */
`srcTradeDate` = '2022-01-01'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='SodCashRecordV5' ORDER BY ordinal_position ASC;