InstrumentMarket
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.
- Section: Products
Metadata
- Base Table Class: Static
- Default Size: 1000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this InstrumentMarket. |
| Status | Set of Status | 4 | |
| ShortName | String | 24 | The short text identifier of this InstrumentMarket. |
| Market | Foreign key to Market | 8 | A Market is the entity used to provide the mechanism by which a set of Instruments can be traded using a common set of parameters and rules. Each Instrument_ may belong to one or more Market_ enabling the Instrument_ to be traded simultaneously using different rules and matching algorithms |
| Instrument | 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_. |
| InstrumentGroup | Foreign key to InstrumentGroup | 8 | An InstrumentGroup is used to group Instrument_ instances into logical sets, such as Equities or Currencies, to facilitate the setting of common parameters and rules across each InstrumentGroup. |
| InstrumentType | One of InstrumentType | 1 | |
| ExternalAccountProvider | Foreign key to ExternalAccountProvider | 8 | |
| Sector | Foreign key to Sector | 8 | Sectors are the primary mechanism for the economic classification of the Instruments that are modelled in the system. A Sector is a collection of Instruments that usually share a common underlying economic characteristic that makes grouping them convenient for a number of purposes. |
| ExternalFK | Integer (unsigned) | 8 | FK for this record in external system that generated it |
| StatusReason | One of StatusReason | 1 | |
| Session | Foreign key to Session | 8 | The Sessions that define the matching algorithms that may be used for Products are maintained in this table. |
| OrderType | Set of OrderType | 4 | |
| 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 InstrumentMarket. |
| HiddenMaxRatio | Integer (signed) | 8 | For hidden quantity orders, the maximum ratio of the total quantity of an order to the hidden quantity. For example, if HiddenMaxRatio is 10 then an order with a total quantity of 10,000 lots may not have a hidden quantity less than 1,000 lots. |
| PriceStepSet | Foreign key to PriceStepSet | 8 | Defines the valid price steps for the InstrumentMarket. This Trading Rule is a reference to a PriceStepSet instance that defines the steps that apply at each price level for the InstrumentMarket. |
| QuantityStepSet | Foreign key to QuantityStepSet | 8 | Defines the valid quantity steps for the InstrumentMarket. This Trading Rule is a reference to a QuantityStepSet instance that defines the steps that apply at each price level for the InstrumentMarket. |
| PriceDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting prices for this InstrumentMarket. 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 InstrumentMarket. 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. |
| ValueDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting the value of this InstrumentMarket. 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. |
| ValueRounding | One of RoundingMethod | 1 | |
| FeeRounding | One of RoundingMethod | 1 | |
| MinQuantity | Integer (signed) | 8 | The minimum quantity permitted for this InstrumentMarket. |
| MaxQuantity | Integer (signed) | 8 | The maximum quantity permitted for this InstrumentMarket. |
| MinValue | Integer (signed) | 8 | |
| MaxValue | Integer (signed) | 8 | |
| Scale | Integer (signed) | 8 | A scaling factor for distribution of the traded Value today for this Market through the API. Value will be scaled (divided by) this field, if it is non-zero. |
| RefPrice | Integer (signed) | 8 | This is the reference price for this InstrumentMarket. It is used to anchor the trading range for the InstrumentMarket. |
| LastPrice | Integer (signed) | 8 | The last price at which this InstrumentMarket traded. |
| LastPriceDate | Integer (signed) | 4 | The data on which the InstrumentMarket traded (or 0 if it has not traded). |
| ClosePrice | Integer (signed) | 8 | |
| ClosePriceDate | Integer (signed) | 4 | Represents a date as an integer in YYYYMMDD format. |
| HistHigh | Integer (signed) | 8 | The highest traded price ever recorded for this InstrumentMarket. This is only updated when the engine is shut down (or cycled). |
| HistHighDate | Integer (signed) | 4 | The date on which the highest price was traded (or 0 if it has not traded). |
| HistLow | Integer (signed) | 8 | The lowest traded price ever recorded for this InstrumentMarket. This is only updated when the engine is shut down (or cycled). |
| HistLowDate | Integer (signed) | 4 | The date on which the lowest price was traded (or 0 if it has not traded). |
| Name | String | 48 | The long text identifier of this InstrumentMarket. |
| Date | Integer (signed) | 4 | The effective trading date for the InstrumentMarket. |
| DayOfWeek | One of DayOfWeek | 1 | |
| WorkingStatus | Set of Status | 4 | |
| Inheritance | Set of InstrumentMarketInheritance | 1 | Controls the inheritance behaviour for this InstrumentMarket. |
| Calendar | Foreign key to Calendar | 8 | |
| FeeBasis | One of FeeBasis | 1 | |
| FeeBuy | Integer (signed) | 8 | |
| FeeSell | Integer (signed) | 8 | |
| MinFeePerOrderBuy | Integer (signed) | 8 | |
| MinFeePerOrderSell | Integer (signed) | 8 | |
| Duration | Integer (unsigned) | 4 | |
| MinPrice | Integer (signed) | 8 | |
| MaxPrice | Integer (signed) | 8 | |
| PriceZeroAllowed | Integer (unsigned) | 1 | |
| PriceNegativeAllowed | Integer (unsigned) | 1 | |
| FeeType | One of FeeType | 1 | |
| FeeMaker | Integer (signed) | 8 | |
| FeeTaker | Integer (signed) | 8 | |
| MinFeePerOrderMaker | Integer (signed) | 8 | |
| MinFeePerOrderTaker | Integer (signed) | 8 | |
| MaxFeePerTradeBuy | Integer (signed) | 8 | |
| MaxFeePerTradeSell | Integer (signed) | 8 | |
| MaxFeePerTradeMaker | Integer (signed) | 8 | |
| MaxFeePerTradeTaker | Integer (signed) | 8 | |
| MatchingPriorityType | One of MatchingPriorityType | 1 | If set to 1, indicates that for this InstrumentMarket, Market Maker orders will be placed at head of each order book (by price). |
| HiddenMinValue | 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_. |
| 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_. |
| 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. |
| OrderOverride | Set of OrderOverride | 4 | Controls which fields (such as Currency etc.) may be over-ridden in an Order for this InstrumentMarket. |
| OrderPriceLimitUpLTP | Integer (signed) | 8 | |
| OrderPriceLimitUpRef | Integer (signed) | 8 | |
| OrderPriceLimitDownLTP | Integer (signed) | 8 | |
| OrderPriceLimitDownRef | Integer (signed) | 8 | |
| CircuitBreakerUpLTP | Integer (signed) | 8 | |
| CircuitBreakerUpRef | Integer (signed) | 8 | |
| CircuitBreakerDownLTP | Integer (signed) | 8 | |
| CircuitBreakerDownRef | Integer (signed) | 8 | |
| MinOrderPrice | Integer (signed) | 8 | |
| MaxOrderPrice | Integer (signed) | 8 | |
| MinOrderPriceLTP | Integer (signed) | 8 | |
| MinOrderPriceRef | Integer (signed) | 8 | |
| MaxOrderPriceLTP | Integer (signed) | 8 | |
| MaxOrderPriceRef | Integer (signed) | 8 | |
| Level1Last | Integer (signed) | 8 | Saved last price for when Matching Engine is shut down |
| Level1Change | Integer (signed) | 8 | Saved price change for when Matching Engine is shut down |
| Level1PercentChange | Integer (signed) | 8 | Saved percent price change for when Matching Engine is shut down |
| Level1High | Integer (signed) | 8 | Saved all-time high price for when Matching Engine is shut down |
| Level1Low | Integer (signed) | 8 | Saved all-time low price for when Matching Engine is shut down |
| Level1Volume | Integer (signed) | 8 | Saved volume for when Matching Engine is shut down |
| Level1Value | Integer (signed) | 8 | Saved value for when Matching Engine is shut down |
| SortIndex | Integer (unsigned) | 2 | The position in which this InstrumentMarket should appear in the UI. |
| Values | Value array (Level1_Values) | 408 (51@8) | |
| ProjectType | Foreign key to ProjectType | 8 | Used to create a Virtual InstrumentMarket for XCHG Level3 display on Voluntary Market. |
| Country | Foreign key to Country | 8 | Used to create a Virtual InstrumentMarket for XCHG Level3 display on Voluntary Market. |
| AuctionType | Set of AuctionType | 1 | An enum set that can be used to determine the type of CCMX Auction that this InstrumentMarket is for (if any). |
| Integer (signed) | 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 InstrumentMarket. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this InstrumentMarket. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this InstrumentMarket. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this InstrumentMarket. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this InstrumentMarket was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this InstrumentMarket. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this InstrumentMarket was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the InstrumentMarket table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; Auction-->|InstrumentMarket|InstrumentMarket click Auction "/marketgrid/developer/model/tables/Auction" Fee-->|InstrumentMarket|InstrumentMarket click Fee "/marketgrid/developer/model/tables/Fee" OrderBook-->|InstrumentMarket|InstrumentMarket click OrderBook "/marketgrid/developer/model/tables/OrderBook" Order-->|InstrumentMarket|InstrumentMarket click Order "/marketgrid/developer/model/tables/Order" OrderNotional-->|InstrumentMarket|InstrumentMarket click OrderNotional "/marketgrid/developer/model/tables/OrderNotional" Trade-->|InstrumentMarket|InstrumentMarket click Trade "/marketgrid/developer/model/tables/Trade"