Holding_full_change

A Holding describes the position held by an Account_ for a given Instrument_. Such a position is a combination of the balance at the start of the day and the aggregate actual buys and sells completed since the opening balance.

In addition, the balances of planned transactions (effectively the unmatched Order_ records) are also recorded here for the purposes of monitoring and risk management.

This is an entity to record changes in the Holding 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
  • Not in MDB
  • Default Size: Order + Trade = 2000

Fields

NameTypeSize (bytes)Description
IdInteger (signed)8The unique identifier of this Holding_full.
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 Holding_full_change.
ExternalAccountForeign key to ExternalAccount8
FirmForeign key to Firm8
AccountForeign key to Account8
AccountNameString254
InstrumentForeign key to Instrument8
TagString50For tagged Instruments, this is the identifier of the individual holding.
ExternalIdString30A place for writing the identifier of this Holding_full_change at the external venue where it is managed.
ExternalTransactionIdString20A place for writing the identifier of the external transaction that is connected with this Holding_full_change record at the external venue to which it is related.
QuantityDecimalsInteger (unsigned)1The number of decimal places that should be used when interpreting quantities for this Holding_full_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.
OpenBalanceInteger (signed)8The balance of the Instrument to which this Holding relates, in this Account at the time of starting the Trading Engine. Copied from Balance & only updated during a cycle.
PlannedBuyInteger (signed)8The sum of the buy Orders currently placed but unmatched in the system for this Account / Instrument.
PlannedSellInteger (signed)8The sum of the buy Orders currently placed but unmatched in the system for this Account / Instrument.
OptimisedReservedCashRequiredInteger (signed)8For a single-price Auction, this is the PlannedSell that has been optimised.
OptimisedReservedCashInteger (signed)8Reserved cash required less unfunded bids.
AuctionResidualsInteger (signed)8Total of MaxResidual for all auctions that the account is active on. Only used for leaf accounts.
ActualBuyInteger (signed)8The sum of the matched buy Orders currently placed in the system for this Account
ActualSellInteger (signed)8The sum of the matched sell Orders currently placed in the system for this Account
UnsettledBuyInteger (signed)8For externally settled trades, buys/sells move from planned to unsettled and must be moved to actual via a HoldingTransaction.
UnsettledSellInteger (signed)8For externally settled trades, buys/sells move from planned to unsettled and must be moved to actual via a HoldingTransaction.
PendingBuyTradeCostsInteger (signed)8
PendingSellTradeCostsInteger (signed)8
UnsettledBuyTradeCostsInteger (signed)8
UnsettledSellTradeCostsInteger (signed)8
ActualBuyTradeCostsInteger (signed)8
ActualSellTradeCostsInteger (signed)8
PendingDepositInteger (signed)8
PendingWithdrawalInteger (signed)8
ApprovedDepositInteger (signed)8
ApprovedWithdrawalInteger (signed)8
PendingReturnInteger (signed)8
AvailableBalanceInteger (signed)8The total quantity of this Instrument available to sell for this Account. In the simplest terms, it is the difference between the sum of OpeningBalance and ActualBuy less the ActualSell if short selling checking is enabled for the Instrument or Firm to which the Account belongs.
AvailableBalance will not be allowed to go below zero if short selling is not allowed. Its value depends on CanResellToday.
- If CanResellToday is set (value 1), then: AvailableBalance = OpenBalance + ActualBuy - (ActualSell + PlannedSell)
- If CanResellToday is not set (value 0), then: AvailableBalance = OpenBalance - (ActualSell + PlannedSell)
AvailableToTransferInteger (signed)8Max(AvailableBalance - MinimumBalance, 0)
BalanceInteger (signed)8The balance of the Instrument to which this Holding relates, in this Account at the time of starting the Trading Engine. The balance updates when ActualBuy or ActualSell changes (i.e. there is a trade). Or with a deposit/withdrawal (HoldingTransaction).
MinimumBalanceInteger (signed)8
UnfundedBidsInteger (signed)8
NettingFundsReceivableInteger (signed)8
NettingFundsUsedInteger (signed)8
ProjectIdString50The identifier of the specific project at the external register associated with this Holding_full_change record.
VintageInteger (unsigned)4A year in YYYY format.
ProjectTypeForeign key to ProjectType8
RegionForeign key to Region8
CountryForeign key to Country8
HoldingTransactionForeign key to HoldingTransaction8When Holding is updated by a HoldingTransction, this is an FK to that HT. It is of use in the MDB where we have every HoldingData tick and can identify the source of each change.
ReservedQuantityInteger (signed)8
ReservedQuantityNoDeficitInteger (signed)8
AllowHoldingReservationInteger (unsigned)1
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 Holding_full_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 Holding_full.
CreateTimestampInteger (unsigned)8The time at which this Holding_full was created.
UpdateUserForeign key to User8The Id of the User that last updated this Holding_full.
UpdateTimestampInteger (unsigned)8The time at which this Holding_full was last updated.