OrderBook
- Section: System Structures
Metadata
- Base Table Class: Entity
- Default Size: Order = 1000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this OrderBook. |
| Status | Set of Status | 4 | |
| InstrumentMarket | Foreign key to InstrumentMarket | 8 | InstrumentMarket is the entity that represents an Instrument_ in a specific Market_. It is the entity for which all trading activity is undertaken and at which level all the market data is collected for distribution. |
| Side | One of OrderSide | 1 | Whether this is a Buy (0) or a Sell (1). |
| Price | Integer (signed) | 8 | The current Price for this OrderBook instance. |
| TotalQuantity | Integer (signed) | 8 | |
| MatchableQuantity | Integer (signed) | 8 | |
| UnmatchableQuantity | Integer (signed) | 8 | |
| VisibleQuantity | Integer (signed) | 8 | The visible quantity of this Order. |
| HiddenQuantity | Integer (signed) | 8 | |
| NotionalQuantity | Integer (signed) | 8 | |
| CumulativeQuantity | Integer (signed) | 8 | |
| Orders | Integer (unsigned) | 8 | |
| AONQuantity | Integer (signed) | 8 | |
| Tag | String | 50 | For tagged Instruments, this is the identifier of the individual holding. |
| SettlementClass | Foreign key to SettlementClass | 8 | |
| OBInfo | String | 34 | |
| AuctionPrice | Integer (signed) | 8 | |
| AuctionBuyCumulativeQuantity | Integer (signed) | 8 | |
| AuctionSellCumulativeQuantity | Integer (signed) | 8 | |
| AuctionMaximumExecutableQuantity | Integer (signed) | 8 | |
| AuctionMinimumSurplus | Integer (signed) | 8 | |
| AuctionCumulativeValue | Integer (signed) | 8 | |
| AuctionCumulativeFee | Integer (signed) | 8 | |
| MatchableValue | Integer (signed) | 8 | |
| MMOrderCount | Integer (signed) | 8 | |
| MMOrderQuantity | Integer (signed) | 8 | |
| Currency | Foreign key to Instrument | 8 | An Instrument is the entity that represents something to be traded in MarketGrid. In order for an Instrument to trade it must be listed on a Market_ to produce an InstrumentMarket_. Each Instrument may be traded simultaneously on one or more Markets, each such instance being an InstrumentMarket_. |
| first_HiddenOrder | Foreign key to Order | 8 | |
| first_NonMidPeg | Foreign key to Order | 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. |
| OwnerUser | Foreign key to User | 8 | The Id of the User that owns this OrderBook. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this OrderBook. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this OrderBook. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this OrderBook. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this OrderBook was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this OrderBook. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this OrderBook was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the OrderBook table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; Firm-->|first_OrderBookBuy|OrderBook Firm-->|last_OrderBookBuy|OrderBook Firm-->|first_OrderBookSell|OrderBook Firm-->|last_OrderBookSell|OrderBook click Firm "/marketgrid/developer/model/tables/Firm" InstrumentMarket-->|first_OrderBookBuy|OrderBook InstrumentMarket-->|last_OrderBookBuy|OrderBook InstrumentMarket-->|first_OrderBookSell|OrderBook InstrumentMarket-->|last_OrderBookSell|OrderBook click InstrumentMarket "/marketgrid/developer/model/tables/InstrumentMarket" OrderNotionalQuantity-->|OrderBook|OrderBook click OrderNotionalQuantity "/marketgrid/developer/model/tables/OrderNotionalQuantity" Order-->|OrderBook|OrderBook click Order "/marketgrid/developer/model/tables/Order"