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)

Metadata

  • Base Table Class: Change
  • Default Size: Trade * 2 = 2000

Fields

NameTypeSize (bytes)Description
IdInteger (signed)8The unique identifier of this Trade.
StatusSet of Status4
TimestampInteger (unsigned)8The time at which this change record was generated. This is not the same as the business-level timestamp of this Trade_change.
ReferenceString20The published identifier for this Trade_change. It is a string of characters that uniquely identifies every Trade_change in the system.
OrderForeign key to Order8
InstrumentMarketForeign key to InstrumentMarket8
CurrencyForeign key to Instrument8
TradeStatusSet of TradeStatus1
PriceDecimalsInteger (unsigned)1The 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.
QuantityDecimalsInteger (unsigned)1The 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.
ValueDecimalsInteger (unsigned)1The 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.
PriceInteger (signed)8The current Price for this Trade_change instance.
SettlementCurrencyForeign key to Instrument8
ValueInteger (signed)8The value of this Trade in the currency in which it will settle.
OwnerFirmForeign key to Firm8
OwnerGroupForeign key to Group8
OwnerUserForeign key to User8
QuantityInteger (signed)8The quantity of securities transferred as a result of this trade.
AggressorOne of Aggressor1A 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.
SwingInteger (signed)8The direction of the last change in traded price.
IncrementInteger (signed)8The change in price resulting from the last trade.
AccountForeign key to Account8
AccountCodeString40The human readable identifier of the Account. It is a free text field, up to a maximum of 40 characters.
AccountNameString254
TagString50For tagged Instruments, this is the identifier of the individual holding.
SettlementClassForeign key to SettlementClass8
VisibleBalanceInteger (signed)8
HiddenBalanceInteger (signed)8
FeeCurrencyForeign key to Instrument8
FeeCurrencyDecimalsInteger (unsigned)1The 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.
FeeInteger (signed)8
SettlementValueDecimalsInteger (unsigned)1The 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.
ExternalCostsInteger (signed)8
SettlementValueInteger (signed)8
SettledValueInteger (signed)8
SettledQuantityInteger (signed)8
SettledFeeInteger (signed)8
SettledExternalCostsInteger (signed)8
CancelledValueInteger (signed)8
CancelledQuantityInteger (signed)8
CancelledFeeInteger (signed)8
CancelledExternalCostsInteger (signed)8
ExchangeRateInteger (signed)8
TypeOne of TradeType1
FeeExchangeRateInteger (signed)8
SettlementStatusSet of SettlementStatus1
ProjectIdString50The identifier of the specific project at the external register associated with this Trade_change record.
VintageInteger (unsigned)4A year in YYYY format.
SideOne of OrderSide1Whether this is a Buy (0) or a Sell (1).
CounterPartyFirmForeign key to Firm8
ClOrdIDString60In 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.
OrderReferenceString20The published identifier for this Trade_change. It is a string of characters that uniquely identifies every Trade_change in the system.
ExternalAccountForeign key to ExternalAccount8
CounterPartyOrderForeign key to Order8
CounterPartyAccountForeign key to Account8
CounterPartyAccountTypeForeign key to AccountType8
CounterPartyMpIdString24The short text identifier of this Trade_change.
OrderMatchedInteger (signed)8
OrderBalanceInteger (signed)8
FeeReturnedInteger (signed)8
AveragePriceInteger (signed)8
ExternalSettlementAccountForeign key to ExternalAccount8
OrderTypeSet of OrderType4
OrderPriceInteger (signed)8
OrderQuantityInteger (signed)8
OrderSettlementValueInteger (signed)8
OrderFeeInteger (signed)8
OrderFeeLeftInteger (signed)8
OrderSettlementValueLeftInteger (signed)8
ReasonOne of TradeReason1
BatchInteger (unsigned)2
RecordInteger (unsigned)4
AuctionAccountForeign key to AuctionAccount8
SettlementSortInteger (unsigned)4
NetProceedsPaidToIssuerInteger (signed)8
UpdateNumberInteger (unsigned)8A 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.
BCSequenceInteger (unsigned)8The sequence number of this Trade_change message in the overall broadcast sequence.
ReloadedInteger (unsigned)1Set to true for change records that are generated during a normal startup from engine cache files.
InstanceIdInteger (unsigned)4
RunIdInteger (unsigned)4
ChangedFieldOne of KVPKey4
CreateUserForeign key to User8The Id of the User that created this Trade.
CreateTimestampInteger (unsigned)8The time at which this Trade was created.
UpdateUserForeign key to User8The Id of the User that last updated this Trade.
UpdateTimestampInteger (unsigned)8The time at which this Trade was last updated.