SessionTime
Controls when Sessions and Trading Rules are applied to Products.
Each record in this table applies to one of a Market, an InstrumentGroup, an Instrument or an InstrumentMarket determined by which of the corresponding foreign key fields in the record is set.
The record is a set of values for the Session and Trading Rule parameters that will be applied to the selected Product at a specific time and (optionally) on a specific date or day of the week. Not all of the possible Session and Trading Rule parameters need to be changed.
The Set_<NAME> fields (where <NAME> is Session or one of the Trading Rule field names) are boolean fields that determine if the corresponding Session or Trading Rule parameter will be changed for the Product when the record is executed.
- Section: Products
Metadata
- Base Table Class: Static
- Default Size: Session * 10 = 1000
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this SessionTime. |
| Status | Set of Status | 4 | |
| 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 |
| 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. |
| 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_. |
| ShortName | String | 24 | For an Auction, we will construct a ShortName just for display 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. |
| AuctionSession | Foreign key to AuctionSession | 8 | If this record pertains to an Auction, this is the FK to the AuctionSession record for the SessionTIme (from while other FKs can be derived). |
| AuctionSessionExit | Integer (unsigned) | 1 | If this record pertains to an Auction, this is 1 if this is the Exit Session Change. |
| StartTime | Integer (signed) | 4 | The time at which the Session should start |
| OnDate | Integer (signed) | 4 | The date on which the Session should start |
| OnDay | Set of DayOfWeekBit | 1 | The days of the week on which the Session should start |
| ExecutionOrder | Integer (signed) | 4 | The order in which this SessionTime should fire in relation to all the other SessionTimes due to fire at the same moment. |
| ClearOnStart | Integer (unsigned) | 1 | Whether or not to clear Orders from the order book at the start of this Session |
| WarningSecs | Integer (unsigned) | 2 | |
| Set_Session | Integer (unsigned) | 1 | This determines if the Session attribute is set when this SessionTime is executed |
| OrderType | Set of OrderType | 4 | |
| Set_OrderType | Integer (unsigned) | 1 | |
| RecordStatus | Set of Status | 4 | |
| Set_RecordStatus | Integer (unsigned) | 1 | |
| MatchingPriorityType | One of MatchingPriorityType | 1 | If set to 1, indicates that for this InstrumentGroup, Market Maker orders will be placed at head of each order book (by price). |
| Set_MatchingPriorityType | Integer (unsigned) | 1 | This determines if the MatchingPriorityType attribute is set when this SessionTime is executed |
| 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 | |
| Set_OrderPriceLimitUpLTP | Integer (unsigned) | 1 | |
| Set_OrderPriceLimitUpRef | Integer (unsigned) | 1 | |
| Set_OrderPriceLimitDownLTP | Integer (unsigned) | 1 | |
| Set_OrderPriceLimitDownRef | Integer (unsigned) | 1 | |
| Set_CircuitBreakerUpLTP | Integer (unsigned) | 1 | |
| Set_CircuitBreakerUpRef | Integer (unsigned) | 1 | |
| Set_CircuitBreakerDownLTP | Integer (unsigned) | 1 | |
| Set_CircuitBreakerDownRef | 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 SessionTime. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this SessionTime. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this SessionTime. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this SessionTime. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this SessionTime was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this SessionTime. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this SessionTime was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the SessionTime table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; AuctionSession-->|EntrySessionTime|SessionTime AuctionSession-->|ExitSessionTime|SessionTime AuctionSession-->|ExtEntrySessionTime|SessionTime AuctionSession-->|ExtExitSessionTime|SessionTime click AuctionSession "/marketgrid/developer/model/tables/AuctionSession"