Order
An Order is the fundamental record of trading activity in the system.
- Section: Trading
Metadata
- Base Table Class: Entity
- Default Size: 1000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this Order. |
| Status | Set of Status | 4 | |
| Reference | String | 20 | The published identifier for this Order. It is a string of characters that uniquely identifies every Order in the system. |
| OriginalOrder | Foreign key to Order | 8 | If an Order is amended, the OriginalOrder field reflects the Id of the original Order placed. This remains the same even with multiple amendments. |
| AmendedOrder | Foreign key to Order | 8 | If an Order is amended, the AmendedOrder field reflects the Id of the Order that was amended to create this Order. |
| PairedOrder | Foreign key to Order | 8 | This field is used internally to track the paired Order on the other side of a Two Sided Reported Trade. |
| ParentOrder | Foreign key to Order | 8 | The Id of the parent Order. |
| RoutingState | Foreign key to RoutingState | 8 | |
| User | Foreign key to User | 8 | The User Table contains a list of the UserIds that are used by individuals to log into the Trading System. |
| Firm | Foreign key to Firm | 8 | A Firm is the organisational unit into which users of the Trading System are grouped. Every Firm belongs to one Enterprise. |
| AmendUser | Foreign key to User | 8 | The User Table contains a list of the UserIds that are used by individuals to log into the Trading System. |
| 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. |
| OriginatingUser | Foreign key to User | 8 | The User that originally made the Order. This is maintained if the Order is amended. |
| CounterParty | Foreign key to User | 8 | Used for One Sided Trade Reports. The Id of the counterparty User with whom the one-sided trade report was done. |
| Account | Foreign key to Account | 8 | An Account is the element in the model that links trading activity to the users undertaking that activity. All Accounts are "owned" by a Firm_ and it against one of these Accounts that Holding_ records are managed in the system. |
| AccountCode | String | 40 | The human readable identifier of the Account. It is a free text field, up to a maximum of 40 characters. |
| Tag | String | 50 | For tagged Instruments, this is the identifier of the individual holding. |
| SettlementClass | Foreign key to SettlementClass | 8 | |
| ExternalTransactionId | String | 20 | A place for writing the identifier of the external transaction that is connected with this Order record at the external venue to which it is related. |
| SecurityLotLabel | String | 20 | |
| SecurityLotId | Integer (unsigned) | 8 | |
| Priority | Integer (unsigned) | 2 | For a multi-class settlement order, this is the settlement priority for this order. |
| MetaData | String | 20 | |
| OrderStatus | Set of OrderStatus | 4 | |
| Reason | One of OrderReason | 1 | |
| SoftBlockOverride | Integer (unsigned) | 1 | Set to true when moving this order out of Pending status to ignore soft block status for Account and AuctionAccount. If order is then held and released, SoftBlockOverride will be reset to false. |
| Error | One of Result | 2 | |
| Side | One of OrderSide | 1 | Whether this is a Buy (0) or a Sell (1). |
| Type | Set of OrderType | 4 | |
| SelfReport | Set of SelfReport | 1 | |
| ExchangeRate | Integer (signed) | 8 | |
| PriceDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting prices for this Order. 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. |
| QuantityDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting quantities for this Order. 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. |
| SettlementValueDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Order. 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. |
| FeeDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Order. 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. |
| ValueDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this Order. 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. |
| Price | Integer (signed) | 8 | The current Price for this Order instance. |
| TotalQuantity | Integer (signed) | 8 | The total quantity of this Order. |
| VisibleQuantity | Integer (signed) | 8 | The visible quantity of this Order. |
| HiddenQuantity | Integer (signed) | 8 | The is the total quantity of the Order that is hidden from the market. |
| TotalBalance | Integer (signed) | 8 | The total remaining quantity of the order. |
| VisibleBalance | Integer (signed) | 8 | The remaining visible balance of the order. |
| HiddenBalance | Integer (signed) | 8 | This is the remaining quantity of the Order that is hidden from the market. |
| VisibleBalanceMax | Integer (signed) | 8 | |
| Matched | Integer (signed) | 8 | The amount of the Order that has been matched. |
| IndicativeMatched | Integer (signed) | 8 | The amount of the Order that would be matched in an Auction if the Auction was concluded now. |
| SessionIndicativeMatched | Integer (signed) | 8 | The amount of the Order that would be matched as at the end of the last session. |
| OrdinalPhase | Integer (signed) | 1 | For a multi-phase Auction, this is the phase in which this Order was entered. |
| AuctionAccount | Foreign key to AuctionAccount | 8 | The AuctionAccount, if any, associated with this order. |
| OrderBookSkip | One of OrderBookSkip | 1 | This governs whether an order should be skipped while iterating over an order book. |
| BaseQuantity | Integer (signed) | 8 | |
| Value | Integer (signed) | 8 | The value of this order in the currency in which it will trade. |
| ValueLeft | Integer (signed) | 8 | |
| SettlementValue | Integer (signed) | 8 | |
| SettlementValueLeft | Integer (signed) | 8 | |
| Fee | Integer (signed) | 8 | |
| FeeLeft | Integer (signed) | 8 | |
| UsedMinFee | Integer (unsigned) | 1 | |
| ExcessFeePaid | Integer (signed) | 8 | |
| FeeExchangeRate | Integer (signed) | 8 | |
| LimitValue | Integer (signed) | 8 | |
| LimitValueLeft | Integer (signed) | 8 | |
| LimitExchangeRate | Integer (signed) | 8 | |
| LotSize | Integer (unsigned) | 4 | An InstrumentMarket may trade in lots, where a lot is a fixed number of units of the InstrumentMarket. LotSize defines the number of units per lot for an InstrumentMarket. If an InstrumentMarket trades in single units, the LotSize is 1. Prices are always on a per-lot basis. This value determines the LotSize for the instances of this Order. |
| ProjectId | String | 50 | The identifier of the specific project at the external register associated with this Order record. |
| VintageFrom | Integer (unsigned) | 4 | A year in YYYY format. |
| VintageTo | Integer (unsigned) | 4 | A year in YYYY format. |
| ProjectType | Foreign key to ProjectType | 8 | This is a reference to the ProjectType table. It is keyed by the ProjectType column in this table to the Id column in the ProjectType table. |
| Region | Foreign key to Region | 8 | This is a reference to the Region table. It is keyed by the Region column in this table to the Id column in the Region table. |
| Country | Foreign key to Country | 8 | This is a reference to the Country table. It is keyed by the Country column in this table to the Id column in the Country table. |
| OrderInfo | String | 140 | Represents some supplementary free text information associated with this Order record. |
| ExpiryDate | Integer (signed) | 4 | The date on which the Order will expire. |
| ExpiryTime | Integer (signed) | 4 | The time at which the Order will expire. |
| OrderDate | Integer (signed) | 4 | The date from the InstrumentMarket business date on which the Order was entered. This is used for GoodForDay Orders to determine when such Orders should be withdrawn. |
| SessionCode | One of Session | 2 | The code of the session in which this Order was entered. |
| prev_ExpiryTime | Foreign key to Order | 8 | |
| next_ExpiryTime | Foreign key to Order | 8 | |
| BCSequence | Integer (unsigned) | 8 | |
| Blotter | Foreign key to Blotter | 8 | This is a reference to the Blotter table. It is keyed by the Blotter column in this table to the Id column in the Blotter table. |
| MinimumFill | Integer (signed) | 8 | The minimum quantity that must match any time this Order trades. Once the TotalBalance falls below the MinimumFill, then the TotalBalance becomes the MinimumFill |
| NumTrades | Integer (signed) | 8 | |
| ActiveTrades | Integer (signed) | 8 | |
| ClOrdID | String | 60 | In 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. |
| ValueCumm | Integer (signed) | 8 | |
| SettlementValueCumm | Integer (signed) | 8 | |
| FeeCumm | Integer (signed) | 8 | |
| Source | One of Source | 1 | |
| 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_. |
| SettlementCurrency | 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_. |
| FeeCurrency | 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_. |
| LimitCurrency | 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_. |
| ExternalAccountProvider | Foreign key to ExternalAccountProvider | 8 | This is a reference to the ExternalAccountProvider table. It is keyed by the ExternalAccountProvider column in this table to the Id column in the ExternalAccountProvider table. |
| ExternalSettlementAccountProvider | Foreign key to ExternalAccountProvider | 8 | This is a reference to the ExternalAccountProvider table. It is keyed by the ExternalSettlementAccountProvider column in this table to the Id column in the ExternalAccountProvider table. |
| PegRef | One of PegRef | 1 | |
| PegOffset | Integer (signed) | 8 | |
| PegLimit | Integer (signed) | 8 | |
| LiveFor | Integer (unsigned) | 4 | |
| OrigClOrdID | String | 60 | In 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. |
| ReservedFunds | Integer (signed) | 8 | For auctions with reserved funds optimisation this is the value of reserved funds for the Order's Account after this Order is entered. |
| OrderHasTraded | Integer (unsigned) | 1 | |
| LastTradeQuantity | Integer (signed) | 8 | The quantity of the order which was last executed. |
| LastTradePrice | Integer (signed) | 8 | The price at which this order was last executed. |
| LastRecordedPrice | Integer (signed) | 8 | |
| ActiveAtPhaseStart | Integer (unsigned) | 1 | For a multi-phase Auction with unfunded bids allowed, this field is set true for all active orders at the beginning of each phase in order that we can revert for accounts that become unfunded due to amendments during the phase if those accounts are still unfunded at the end of the phase. It is false by default for all new orders but at the start of a new ascending session, all orders active at that time will have the flag set true. At the end of the session if we need to roll back amended orders for a given account, we traverse backwards through the amended orders (a given order could be amended more than once) until we hit the first instance where this flag is true. |
| ModifiedPriority | One of OrderModifiedPriority | 1 | For a reverse tender, allows an order to gain or lose priority. |
| OrderPriority | One of OrderPriority | 1 | For a reverse tender, the order's current time priority. |
| 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 Order. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this Order. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this Order. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this Order. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this Order was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this Order. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this Order was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the Order table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; HoldingTransaction-->|TradeReport|Order click HoldingTransaction "/marketgrid/developer/model/tables/HoldingTransaction" InstrumentMarket-->|first_MarketSell|Order InstrumentMarket-->|first_MarketBuy|Order click InstrumentMarket "/marketgrid/developer/model/tables/InstrumentMarket" OrderBook-->|first_HiddenOrder|Order OrderBook-->|first_NonMidPeg|Order click OrderBook "/marketgrid/developer/model/tables/OrderBook" Trade-->|Order|Order Trade-->|CounterPartyOrder|Order click Trade "/marketgrid/developer/model/tables/Trade" Trade_children-->|Order|Order click Trade_children "/marketgrid/developer/model/tables/Trade_children" RFQ-->|OriginalOrder|Order RFQ-->|Order|Order click RFQ "/marketgrid/developer/model/tables/RFQ"