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.
- Section: Position Keeping
Metadata
- Base Table Class: Entity
- Default Size: 1000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this HoldingReservation. |
| Status | Set of Status | 4 | |
| Holding | Foreign key to Holding | 8 | The Holding to which this HoldingReservation record applies. |
| Type | One of HoldingReservationType | 1 | A type (category) for the reserved quantity from the list defined in the HoldingReservationType enum. |
| RelatedTable | One of Table | 1 | Optional field, the Table to which RelatedRecord applies. |
| RelatedRecord | Integer (signed) | 8 | The 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. |
| MetaData | String | 100 | Free-format text that is application/customer specific. |
| Quantity | Integer (signed) | 8 | The quantity reserved by this record. |
| Deficit | Integer (signed) | 8 | The quantity by which the balance of the related Holding must be increased in order to settle this reservation. |
| DeficitType | One of ReservationDeficitType | 1 | This field is to allow pre-reservation of funds that have not yet been received into the account. See Enum for details. |
| 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. |
| OwnerUser | Foreign key to User | 8 | The Id of the User that owns this HoldingReservation. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this HoldingReservation. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this HoldingReservation. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this HoldingReservation. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this HoldingReservation was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this HoldingReservation. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this HoldingReservation was last updated. |