Market
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
- 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 Market. |
| Status | Set of Status | 4 | |
| ShortName | String | 24 | The short text identifier of this Market. |
| Name | String | 48 | The long text identifier of this Market. |
| FeeBasis | One of FeeBasis | 1 | |
| FeeBuy | Integer (signed) | 8 | |
| FeeSell | Integer (signed) | 8 | |
| MinFeePerOrderBuy | Integer (signed) | 8 | |
| MinFeePerOrderSell | Integer (signed) | 8 | |
| Venue | Foreign key to Venue | 8 | A Venue is a collection of Markets. It is a way of grouping markets into a single entity to represent an exchange or other market operator that is responsible for more than a single Market_. Markets are grouped by Venue, each Market belonging to one Venue. |
| Scenario | Integer (unsigned) | 1 | Whether this Market is a Scenario (for example, simulated, calculated or display only) or an actual market. |
| 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 Market. |
| 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 Market. This Trading Rule is a reference to a PriceStepSet instance that defines the steps that apply at each price level for the Market. |
| QuantityStepSet | Foreign key to QuantityStepSet | 8 | Defines the valid quantity steps for the Market. This Trading Rule is a reference to a QuantityStepSet instance that defines the steps that apply at each price level for the Market. |
| PriceDecimals | Integer (unsigned) | 1 | The number of decimal places that should be used when interpreting prices for this Market. 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 Market. 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 Market. 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 Market. |
| MaxQuantity | Integer (signed) | 8 | The maximum quantity permitted for this Market. |
| 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. |
| SelfTradePreventType | One of StpType | 1 | |
| SelfTradePreventLevel | One of StpLevel | 1 | |
| Calendar | Foreign key to Calendar | 8 | This is a reference to the Calendar table. It is keyed by the Calendar column in this table to the Id column in the Calendar table. |
| MinPrice | Integer (signed) | 8 | |
| MaxPrice | Integer (signed) | 8 | |
| PriceZeroAllowed | Integer (unsigned) | 1 | On if 0 is a valid price |
| PriceNegativeAllowed | Integer (unsigned) | 1 | On if negative prices allowed |
| MaxDuration | Integer (unsigned) | 4 | |
| Date | Integer (signed) | 4 | Represents a date as an integer in YYYYMMDD format. |
| DayOfWeek | One of DayOfWeek | 1 | |
| TimeZone | Foreign key to TimeZone | 8 | This is a reference to the TimeZone table. It is keyed by the TimeZone column in this table to the Id column in the TimeZone table. |
| 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). |
| DefaultCurrency | 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_. |
| DefaultSettlementCurrency | 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_. |
| DefaultExternalSettlementAccountProvider | Foreign key to ExternalAccountProvider | 8 | This is a reference to the ExternalAccountProvider table. It is keyed by the DefaultExternalSettlementAccountProvider column in this table to the Id column in the ExternalAccountProvider table. |
| DefaultExpiryType | Set of OrderType | 4 | |
| OrderOverride | Set of OrderOverride | 4 | |
| 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 | |
| MarketOrderSweepDepth | Integer (unsigned) | 2 | The maximum number of price levels that a market order may sweep. If set to 0, there is not limit. |
| MarketType | One of MarketType | 1 | |
| GenerateLevelThree | Integer (unsigned) | 1 | If True, Level3 Order Book data will be generated for the Market. |
| HoldingSettlesExternally | Integer (unsigned) | 1 | If true, holdings move from planned to unsettled rather than actual. |
| CashSettlesExternally | Integer (unsigned) | 1 | If true, cash moves from planned to unsettled rather than actual. |
| PublishTradeCounterpartyInfo | Integer (unsigned) | 1 | Set true if counterparty information should be published in trade change record. |
| 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 Market. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this Market. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this Market. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this Market. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this Market was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this Market. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this Market was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the Market table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; Auction-->|Market|Market click Auction "/marketgrid/developer/model/tables/Auction" Fee-->|Market|Market click Fee "/marketgrid/developer/model/tables/Fee" InstrumentMarket-->|Market|Market click InstrumentMarket "/marketgrid/developer/model/tables/InstrumentMarket" SessionTime-->|Market|Market click SessionTime "/marketgrid/developer/model/tables/SessionTime"