Trade_change
The Trade Entity stores all the information about a bargain that is recorded in MarketGrid. It consists of a reference to both the buy and the sell Orders that produced the Trade as well as details about the Trade itself, such as price and quantity. This is an entity to record changes in the Trade structure. It holds records that are already prepared for sending out via the market data streams (for example resolving internal shared memory indexes into external foreign key Ids)
- Section: Change Tables
Metadata
- Base Table Class: Change
- Default Size: Trade * 2 = 2000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this Trade. |
| Status | Set of Status | 4 | |
| Timestamp | Integer (unsigned) | 8 | The time at which this change record was generated. This is not the same as the business-level timestamp of this Trade_change. |
| Reference | String | 20 | The published identifier for this Trade_change. It is a string of characters that uniquely identifies every Trade_change in the system. |
| Order | Foreign key to Order | 8 | |
| InstrumentMarket | Foreign key to InstrumentMarket | 8 | |
| Currency | Foreign key to Instrument | 8 | |
| TradeStatus | Set of TradeStatus | 1 | |
| PriceDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting prices for this Trade_change. Prices within MarketGrid are stored and communicated as integers with fixed numbers of decimals. This field specifies how many digits are to the right of the decimal point. For example, a price of 10350 with PriceDecimals set to 2 means 103.50. |
| QuantityDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting quantities for this Trade_change. Quantities within MarketGrid are stored and communicated as integers with fixed numbers of decimals. This field specifies how many digits are to the right of the decimal point. For example, a quantity of 12345 with QuantityDecimals set to 3 means 12.345. |
| ValueDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Trade_change. Values within MarketGrid are stored and communicated as integers with fixed numbers of decimals. This field specifies how many digits are to the right of the decimal point. For example, a value of 1150000 with ValueDecimals of 2 means 11,500.00. |
| Price | Integer (signed) | 8 | The current Price for this Trade_change instance. |
| SettlementCurrency | Foreign key to Instrument | 8 | |
| Value | Integer (signed) | 8 | The value of this Trade in the currency in which it will settle. |
| OwnerFirm | Foreign key to Firm | 8 | |
| OwnerGroup | Foreign key to Group | 8 | |
| OwnerUser | Foreign key to User | 8 | |
| Quantity | Integer (signed) | 8 | The quantity of securities transferred as a result of this trade. |
| Aggressor | One of Aggressor | 1 | A measure of the aggressor in the last traded price. The value may be -1, 0 or 1 depending on whether the aggressor was the buyer or the seller for the trade. |
| Swing | Integer (signed) | 8 | The direction of the last change in traded price. |
| Increment | Integer (signed) | 8 | The change in price resulting from the last trade. |
| Account | Foreign key to Account | 8 | |
| AccountCode | String | 40 | The human readable identifier of the Account. It is a free text field, up to a maximum of 40 characters. |
| AccountName | String | 254 | |
| Tag | String | 50 | For tagged Instruments, this is the identifier of the individual holding. |
| SettlementClass | Foreign key to SettlementClass | 8 | |
| VisibleBalance | Integer (signed) | 8 | |
| HiddenBalance | Integer (signed) | 8 | |
| FeeCurrency | Foreign key to Instrument | 8 | |
| FeeCurrencyDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Trade_change. Values within MarketGrid are stored and communicated as integers with fixed numbers of decimals. This field specifies how many digits are to the right of the decimal point. For example, a value of 1150000 with FeeCurrencyDecimals of 2 means 11,500.00. |
| Fee | Integer (signed) | 8 | |
| SettlementValueDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Trade_change. Values within MarketGrid are stored and communicated as integers with fixed numbers of decimals. This field specifies how many digits are to the right of the decimal point. For example, a value of 1150000 with SettlementValueDecimals of 2 means 11,500.00. |
| ExternalCosts | Integer (signed) | 8 | |
| SettlementValue | Integer (signed) | 8 | |
| SettledValue | Integer (signed) | 8 | |
| SettledQuantity | Integer (signed) | 8 | |
| SettledFee | Integer (signed) | 8 | |
| SettledExternalCosts | Integer (signed) | 8 | |
| CancelledValue | Integer (signed) | 8 | |
| CancelledQuantity | Integer (signed) | 8 | |
| CancelledFee | Integer (signed) | 8 | |
| CancelledExternalCosts | Integer (signed) | 8 | |
| ExchangeRate | Integer (signed) | 8 | |
| Type | One of TradeType | 1 | |
| FeeExchangeRate | Integer (signed) | 8 | |
| SettlementStatus | Set of SettlementStatus | 1 | |
| ProjectId | String | 50 | The identifier of the specific project at the external register associated with this Trade_change record. |
| Vintage | Integer (unsigned) | 4 | A year in YYYY format. |
| Side | One of OrderSide | 1 | Whether this is a Buy (0) or a Sell (1). |
| CounterPartyFirm | Foreign key to Firm | 8 | |
| ClOrdID | String | 60 | In the FIX protocol the ClOrdID field is the user supplied identifier for an inbound Order that the user will provide to identify the Order when acting on the Order. When referring to an exising Order the user will use the OrigClOrdID field to identify the ClOrdID of the Order in question. |
| OrderReference | String | 20 | The published identifier for this Trade_change. It is a string of characters that uniquely identifies every Trade_change in the system. |
| ExternalAccount | Foreign key to ExternalAccount | 8 | |
| CounterPartyOrder | Foreign key to Order | 8 | |
| CounterPartyAccount | Foreign key to Account | 8 | |
| CounterPartyAccountType | Foreign key to AccountType | 8 | |
| CounterPartyMpId | String | 24 | The short text identifier of this Trade_change. |
| OrderMatched | Integer (signed) | 8 | |
| OrderBalance | Integer (signed) | 8 | |
| FeeReturned | Integer (signed) | 8 | |
| AveragePrice | Integer (signed) | 8 | |
| ExternalSettlementAccount | Foreign key to ExternalAccount | 8 | |
| OrderType | Set of OrderType | 4 | |
| OrderPrice | Integer (signed) | 8 | |
| OrderQuantity | Integer (signed) | 8 | |
| OrderSettlementValue | Integer (signed) | 8 | |
| OrderFee | Integer (signed) | 8 | |
| OrderFeeLeft | Integer (signed) | 8 | |
| OrderSettlementValueLeft | Integer (signed) | 8 | |
| Reason | One of TradeReason | 1 | |
| Batch | Integer (unsigned) | 2 | |
| Record | Integer (unsigned) | 4 | |
| AuctionAccount | Foreign key to AuctionAccount | 8 | |
| SettlementSort | Integer (unsigned) | 4 | |
| NetProceedsPaidToIssuer | Integer (signed) | 8 | |
| UpdateNumber | Integer (unsigned) | 8 | A number that records every change that happens to a record. It is primarily used to avoid write after read problems when an intermediate write has changed the originally read record. |
| BCSequence | Integer (unsigned) | 8 | The sequence number of this Trade_change message in the overall broadcast sequence. |
| Reloaded | Integer (unsigned) | 1 | Set to true for change records that are generated during a normal startup from engine cache files. |
| InstanceId | Integer (unsigned) | 4 | |
| RunId | Integer (unsigned) | 4 | |
| ChangedField | One of KVPKey | 4 | |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this Trade. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this Trade was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this Trade. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this Trade was last updated. |