Instrument
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_.
- 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 Instrument. |
| Status | Set of Status | 4 | |
| ShortName | String | 24 | The short text identifier of this Instrument. |
| Name | String | 48 | The long text identifier of this Instrument. |
| ExternalFK | Integer (unsigned) | 8 | FK for this record in external system that generated it |
| FeeBasis | One of FeeBasis | 1 | |
| FeeBuy | Integer (signed) | 8 | |
| FeeSell | Integer (signed) | 8 | |
| MinFeePerOrderBuy | Integer (signed) | 8 | |
| MinFeePerOrderSell | Integer (signed) | 8 | |
| 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. |
| ExternalCode | String | 24 | The short text identifier of this Instrument. |
| InstrumentType | One of InstrumentType | 1 | |
| 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. |
| 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. |
| 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 Instrument. |
| 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 Instrument. This Trading Rule is a reference to a PriceStepSet instance that defines the steps that apply at each price level for the Instrument. |
| QuantityStepSet | Foreign key to QuantityStepSet | 8 | Defines the valid quantity steps for the Instrument. This Trading Rule is a reference to a QuantityStepSet instance that defines the steps that apply at each price level for the Instrument. |
| PriceDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting prices for this Instrument. 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 Instrument. 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 Instrument. 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. |
| MinQuantity | Integer (signed) | 8 | The minimum quantity permitted for this Instrument. |
| MaxQuantity | Integer (signed) | 8 | The maximum quantity permitted for this Instrument. |
| MinValue | Integer (signed) | 8 | |
| MaxValue | Integer (signed) | 8 | |
| MinNegotiatedDealVolume | Integer (signed) | 8 | |
| MaxNegotiatedDealVolume | Integer (signed) | 8 | |
| MinNegotiatedDealValue | Integer (signed) | 8 | |
| MaxNegotiatedDealValue | Integer (signed) | 8 | |
| Scale | Integer (signed) | 8 | A scaling factor for distribution of the traded Value today for this Instrument through the API. Value will be scaled (divided by) this field, if it is non-zero. |
| ListDate | Integer (signed) | 4 | The date on which this Instrument was listed. |
| TradeStartDate | Integer (signed) | 4 | The date on which this Instrument did or will start trading. |
| TradeStopDate | Integer (signed) | 4 | The last date on which this Instrument will be available for trading. |
| DelistDate | Integer (signed) | 4 | The date on which this Instrument will be delisted |
| TaggedFlag | Set of TaggedFlag | 1 | |
| TrackHoldings | Integer (unsigned) | 1 | Whether holdings should be tracked for this Instrument |
| CanShortSell | Integer (unsigned) | 1 | Is it permissible to short sell this Instrument |
| CanResellToday | Integer (unsigned) | 1 | Is it permissible to sell a position that is the result of a trade executed today. |
| TrackCash | Integer (unsigned) | 1 | |
| CanUseTodaysCash | Integer (unsigned) | 1 | |
| RecalculationTimer | Integer (signed) | 4 | Represents time as an integer in HHMMSS format. |
| CloseTimerMin | Integer (signed) | 4 | Represents time as an integer in HHMMSS format. |
| CloseTimerMax | Integer (signed) | 4 | Represents time as an integer in HHMMSS format. |
| MinVintage | Integer (unsigned) | 4 | A year in YYYY format. |
| MaxVintage | Integer (unsigned) | 4 | A year in YYYY format. |
| HoldingMustExist | Integer (unsigned) | 1 | When this attribute is set, a holding record must already exist before an order can be created (either a Buy or Sell) |
| BaseInstrument | Integer (unsigned) | 1 | |
| MinPrice | Integer (signed) | 8 | |
| MaxPrice | Integer (signed) | 8 | |
| PriceZeroAllowed | Integer (unsigned) | 1 | |
| PriceNegativeAllowed | Integer (unsigned) | 1 | |
| BillingCode | String | 24 | The short text identifier of this Instrument. |
| 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). |
| 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 | |
| MetaData | String | 1024 | MetaData blob for pass-through to external systems. |
| AllowHoldingReservation | Integer (unsigned) | 1 | |
| 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 Instrument. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this Instrument. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this Instrument. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this Instrument. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this Instrument was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this Instrument. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this Instrument was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the Instrument table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; Enterprise-->|SettlementCurrency|Instrument click Enterprise "/marketgrid/developer/model/tables/Enterprise" Firm-->|SettlementCurrency|Instrument click Firm "/marketgrid/developer/model/tables/Firm" Auction-->|Instrument|Instrument click Auction "/marketgrid/developer/model/tables/Auction" SettlementClass-->|Instrument|Instrument click SettlementClass "/marketgrid/developer/model/tables/SettlementClass" AuctionAccount-->|Instrument|Instrument click AuctionAccount "/marketgrid/developer/model/tables/AuctionAccount" Account-->|SettlementCurrency|Instrument click Account "/marketgrid/developer/model/tables/Account" Holding-->|Instrument|Instrument click Holding "/marketgrid/developer/model/tables/Holding" HoldingTransaction-->|Instrument|Instrument click HoldingTransaction "/marketgrid/developer/model/tables/HoldingTransaction" BankTransaction-->|Instrument|Instrument click BankTransaction "/marketgrid/developer/model/tables/BankTransaction" ExchangeRate-->|Currency1|Instrument ExchangeRate-->|Currency2|Instrument click ExchangeRate "/marketgrid/developer/model/tables/ExchangeRate" Fee-->|Instrument|Instrument Fee-->|SettlementInstrument|Instrument click Fee "/marketgrid/developer/model/tables/Fee" InstrumentGroup-->|BaseInstrument|Instrument click InstrumentGroup "/marketgrid/developer/model/tables/InstrumentGroup" InstrumentMarket-->|Instrument|Instrument InstrumentMarket-->|Currency|Instrument InstrumentMarket-->|SettlementCurrency|Instrument click InstrumentMarket "/marketgrid/developer/model/tables/InstrumentMarket" Market-->|DefaultCurrency|Instrument Market-->|DefaultSettlementCurrency|Instrument click Market "/marketgrid/developer/model/tables/Market" SessionTime-->|Instrument|Instrument click SessionTime "/marketgrid/developer/model/tables/SessionTime" OrderBook-->|Currency|Instrument click OrderBook "/marketgrid/developer/model/tables/OrderBook" Order-->|Currency|Instrument Order-->|SettlementCurrency|Instrument Order-->|FeeCurrency|Instrument Order-->|LimitCurrency|Instrument click Order "/marketgrid/developer/model/tables/Order" OrderNotional-->|SettlementCurrency|Instrument click OrderNotional "/marketgrid/developer/model/tables/OrderNotional" Trade-->|Currency|Instrument click Trade "/marketgrid/developer/model/tables/Trade"