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.

Metadata

  • Base Table Class: Static
  • Default Size: Session * 10 = 1000

Fields

NameTypeSize (bytes)Description
IdInteger (signed)8The unique identifier of this SessionTime.
StatusSet of Status4
MarketForeign key to Market8A 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
InstrumentGroupForeign key to InstrumentGroup8An 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.
InstrumentForeign 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_.
ShortNameString24For an Auction, we will construct a ShortName just for display purposes.
SessionForeign key to Session8The Sessions that define the matching algorithms that may be used for Products are maintained in this table.
AuctionSessionForeign key to AuctionSession8If this record pertains to an Auction, this is the FK to the AuctionSession record for the SessionTIme (from while other FKs can be derived).
AuctionSessionExitInteger (unsigned)1If this record pertains to an Auction, this is 1 if this is the Exit Session Change.
StartTimeInteger (signed)4The time at which the Session should start
OnDateInteger (signed)4The date on which the Session should start
OnDaySet of DayOfWeekBit1The days of the week on which the Session should start
ExecutionOrderInteger (signed)4The order in which this SessionTime should fire in relation to all the other SessionTimes due to fire at the same moment.
ClearOnStartInteger (unsigned)1Whether or not to clear Orders from the order book at the start of this Session
WarningSecsInteger (unsigned)2
Set_SessionInteger (unsigned)1This determines if the Session attribute is set when this SessionTime is executed
OrderTypeSet of OrderType4
Set_OrderTypeInteger (unsigned)1
RecordStatusSet of Status4
Set_RecordStatusInteger (unsigned)1
MatchingPriorityTypeOne of MatchingPriorityType1If set to 1, indicates that for this InstrumentGroup, Market Maker orders will be placed at head of each order book (by price).
Set_MatchingPriorityTypeInteger (unsigned)1This determines if the MatchingPriorityType attribute is set when this SessionTime is executed
OrderPriceLimitUpLTPInteger (signed)8
OrderPriceLimitUpRefInteger (signed)8
OrderPriceLimitDownLTPInteger (signed)8
OrderPriceLimitDownRefInteger (signed)8
CircuitBreakerUpLTPInteger (signed)8
CircuitBreakerUpRefInteger (signed)8
CircuitBreakerDownLTPInteger (signed)8
CircuitBreakerDownRefInteger (signed)8
Set_OrderPriceLimitUpLTPInteger (unsigned)1
Set_OrderPriceLimitUpRefInteger (unsigned)1
Set_OrderPriceLimitDownLTPInteger (unsigned)1
Set_OrderPriceLimitDownRefInteger (unsigned)1
Set_CircuitBreakerUpLTPInteger (unsigned)1
Set_CircuitBreakerUpRefInteger (unsigned)1
Set_CircuitBreakerDownLTPInteger (unsigned)1
Set_CircuitBreakerDownRefInteger (unsigned)1
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 SessionTime.
OwnerGroupForeign key to Group8The Id of the Group that owns this SessionTime.
OwnerFirmForeign key to Firm8The Id of the Firm that owns this SessionTime.
CreateUserForeign key to User8The Id of the User that created this SessionTime.
CreateTimestampInteger (unsigned)8The time at which this SessionTime was created.
UpdateUserForeign key to User8The Id of the User that last updated this SessionTime.
UpdateTimestampInteger (unsigned)8The 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"