HoldingReservation

Used to reserve discrete quantities from the AvailableBalance for a Holding record. The key for this table is Holding/Type/RelatedRecord, allowing discrete quantities to be reserved for each Type for a given Holding record (each discrete quantity has a unique RelatedRecord).

For a Holding record, the total quantity reserved for the Holding is given by the ReservedQuantity field which is the sum of the Quantity fields for each of its HoldingReservation records.

The ReservedQuantityNoDeficit for a Holding is used to reduce the AvailableBalance when validating the quantity available to be withdrawn. which is the sum of the Quantity fields for each of its HoldingReservation records that do not allow deficit.

Metadata

  • Base Table Class: Entity
  • Default Size: 1000

Fields

NameTypeSize (bytes)Description
IdInteger (signed)8The unique identifier of this HoldingReservation.
StatusSet of Status4
HoldingForeign key to Holding8The Holding to which this HoldingReservation record applies.
TypeOne of HoldingReservationType1A type (category) for the reserved quantity from the list defined in the HoldingReservationType enum.
RelatedTableOne of Table1Optional field, the Table to which RelatedRecord applies.
RelatedRecordInteger (signed)8The Id of a record in a related table (or 0), that uniquely identifies this reservation record for the Holding and Type. This allows, for example, more than one simultaneous reservation for TradeSettlement for a given Holding, with each such reservation indentifiable.
MetaDataString100Free-format text that is application/customer specific.
QuantityInteger (signed)8The quantity reserved by this record.
DeficitInteger (signed)8The quantity by which the balance of the related Holding must be increased in order to settle this reservation.
DeficitTypeOne of ReservationDeficitType1This field is to allow pre-reservation of funds that have not yet been received into the account. See Enum for details.
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.
OwnerUserForeign key to User8The Id of the User that owns this HoldingReservation.
OwnerGroupForeign key to Group8The Id of the Group that owns this HoldingReservation.
OwnerFirmForeign key to Firm8The Id of the Firm that owns this HoldingReservation.
CreateUserForeign key to User8The Id of the User that created this HoldingReservation.
CreateTimestampInteger (unsigned)8The time at which this HoldingReservation was created.
UpdateUserForeign key to User8The Id of the User that last updated this HoldingReservation.
UpdateTimestampInteger (unsigned)8The time at which this HoldingReservation was last updated.