Order

An Order is the fundamental record of trading activity in the system.

Metadata

  • Base Table Class: Entity
  • Default Size: 1000

Fields

NameTypeSize (bytes)Description
IdInteger (signed)8The unique identifier of this Order.
StatusSet of Status4
ReferenceString20The published identifier for this Order. It is a string of characters that uniquely identifies every Order in the system.
OriginalOrderForeign key to Order8If an Order is amended, the OriginalOrder field reflects the Id of the original Order placed. This remains the same even with multiple amendments.
AmendedOrderForeign key to Order8If an Order is amended, the AmendedOrder field reflects the Id of the Order that was amended to create this Order.
PairedOrderForeign key to Order8This field is used internally to track the paired Order on the other side of a Two Sided Reported Trade.
ParentOrderForeign key to Order8The Id of the parent Order.
RoutingStateForeign key to RoutingState8
UserForeign key to User8The User Table contains a list of the UserIds that are used by individuals to log into the Trading System.
FirmForeign key to Firm8A Firm is the organisational unit into which users of the Trading System are grouped. Every Firm belongs to one Enterprise.
AmendUserForeign key to User8The User Table contains a list of the UserIds that are used by individuals to log into the Trading System.
InstrumentMarketForeign key to InstrumentMarket8InstrumentMarket 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.
OriginatingUserForeign key to User8The User that originally made the Order. This is maintained if the Order is amended.
CounterPartyForeign key to User8Used for One Sided Trade Reports. The Id of the counterparty User with whom the one-sided trade report was done.
AccountForeign key to Account8An 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.
AccountCodeString40The human readable identifier of the Account. It is a free text field, up to a maximum of 40 characters.
TagString50For tagged Instruments, this is the identifier of the individual holding.
SettlementClassForeign key to SettlementClass8
ExternalTransactionIdString20A 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.
SecurityLotLabelString20
SecurityLotIdInteger (unsigned)8
PriorityInteger (unsigned)2For a multi-class settlement order, this is the settlement priority for this order.
MetaDataString20
OrderStatusSet of OrderStatus4
ReasonOne of OrderReason1
SoftBlockOverrideInteger (unsigned)1Set 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.
ErrorOne of Result2
SideOne of OrderSide1Whether this is a Buy (0) or a Sell (1).
TypeSet of OrderType4
SelfReportSet of SelfReport1
ExchangeRateInteger (signed)8
PriceDecimalsInteger (unsigned)1The 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.
QuantityDecimalsInteger (unsigned)1The 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.
SettlementValueDecimalsInteger (unsigned)1The 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.
FeeDecimalsInteger (unsigned)1The 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.
ValueDecimalsInteger (unsigned)1The 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.
PriceInteger (signed)8The current Price for this Order instance.
TotalQuantityInteger (signed)8The total quantity of this Order.
VisibleQuantityInteger (signed)8The visible quantity of this Order.
HiddenQuantityInteger (signed)8The is the total quantity of the Order that is hidden from the market.
TotalBalanceInteger (signed)8The total remaining quantity of the order.
VisibleBalanceInteger (signed)8The remaining visible balance of the order.
HiddenBalanceInteger (signed)8This is the remaining quantity of the Order that is hidden from the market.
VisibleBalanceMaxInteger (signed)8
MatchedInteger (signed)8The amount of the Order that has been matched.
IndicativeMatchedInteger (signed)8The amount of the Order that would be matched in an Auction if the Auction was concluded now.
SessionIndicativeMatchedInteger (signed)8The amount of the Order that would be matched as at the end of the last session.
OrdinalPhaseInteger (signed)1For a multi-phase Auction, this is the phase in which this Order was entered.
AuctionAccountForeign key to AuctionAccount8The AuctionAccount, if any, associated with this order.
OrderBookSkipOne of OrderBookSkip1This governs whether an order should be skipped while iterating over an order book.
BaseQuantityInteger (signed)8
ValueInteger (signed)8The value of this order in the currency in which it will trade.
ValueLeftInteger (signed)8
SettlementValueInteger (signed)8
SettlementValueLeftInteger (signed)8
FeeInteger (signed)8
FeeLeftInteger (signed)8
UsedMinFeeInteger (unsigned)1
ExcessFeePaidInteger (signed)8
FeeExchangeRateInteger (signed)8
LimitValueInteger (signed)8
LimitValueLeftInteger (signed)8
LimitExchangeRateInteger (signed)8
LotSizeInteger (unsigned)4An 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.
ProjectIdString50The identifier of the specific project at the external register associated with this Order record.
VintageFromInteger (unsigned)4A year in YYYY format.
VintageToInteger (unsigned)4A year in YYYY format.
ProjectTypeForeign key to ProjectType8This 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.
RegionForeign key to Region8This 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.
CountryForeign key to Country8This 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.
OrderInfoString140Represents some supplementary free text information associated with this Order record.
ExpiryDateInteger (signed)4The date on which the Order will expire.
ExpiryTimeInteger (signed)4The time at which the Order will expire.
OrderDateInteger (signed)4The 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.
SessionCodeOne of Session2The code of the session in which this Order was entered.
prev_ExpiryTimeForeign key to Order8
next_ExpiryTimeForeign key to Order8
BCSequenceInteger (unsigned)8
BlotterForeign key to Blotter8This 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.
MinimumFillInteger (signed)8The minimum quantity that must match any time this Order trades. Once the TotalBalance falls below the MinimumFill, then the TotalBalance becomes the MinimumFill
NumTradesInteger (signed)8
ActiveTradesInteger (signed)8
ClOrdIDString60In 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.
ValueCummInteger (signed)8
SettlementValueCummInteger (signed)8
FeeCummInteger (signed)8
SourceOne of Source1
CurrencyForeign key to Instrument8An 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_.
SettlementCurrencyForeign key to Instrument8An 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_.
FeeCurrencyForeign key to Instrument8An 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_.
LimitCurrencyForeign key to Instrument8An 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_.
ExternalAccountProviderForeign key to ExternalAccountProvider8This 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.
ExternalSettlementAccountProviderForeign key to ExternalAccountProvider8This 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.
PegRefOne of PegRef1
PegOffsetInteger (signed)8
PegLimitInteger (signed)8
LiveForInteger (unsigned)4
OrigClOrdIDString60In 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.
ReservedFundsInteger (signed)8For auctions with reserved funds optimisation this is the value of reserved funds for the Order's Account after this Order is entered.
OrderHasTradedInteger (unsigned)1
LastTradeQuantityInteger (signed)8The quantity of the order which was last executed.
LastTradePriceInteger (signed)8The price at which this order was last executed.
LastRecordedPriceInteger (signed)8
ActiveAtPhaseStartInteger (unsigned)1For 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.
ModifiedPriorityOne of OrderModifiedPriority1For a reverse tender, allows an order to gain or lose priority.
OrderPriorityOne of OrderPriority1For a reverse tender, the order's current time priority.
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 Order.
OwnerGroupForeign key to Group8The Id of the Group that owns this Order.
OwnerFirmForeign key to Firm8The Id of the Firm that owns this Order.
CreateUserForeign key to User8The Id of the User that created this Order.
CreateTimestampInteger (unsigned)8The time at which this Order was created.
UpdateUserForeign key to User8The Id of the User that last updated this Order.
UpdateTimestampInteger (unsigned)8The 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"