SessionSet
Change trading session of product(s).
- Section: Transactions
- Related Message: SessionSetReply
Examples of trading session are Auction, Continuous and Closed.
The session can be changed directly on the InstrumentMarket, but also higher in the product hierarchy such as at the Market level.
Changing the session at Market level (for example) will apply to all InstrumentMarkets within the Market which have Market-level inheritance enabled.
This message is a specific use-case of the SessionParam message. i.e. where SessionParam.Parameter is hard-coded to Session.
Metadata
- Message Type: TransactionMessage
- Message Number: 1014
Inherited fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| MessageType | Integer (unsigned) | 2 | The unique identifier of this message. |
| ClientId | Integer (unsigned) | 4 | The unique identifier of a session with the server, returned in a successful LoginReply message. |
| RequestId | Integer (unsigned) | 4 | Within each session each message must be uniquely identified by this field. It must be monotonically increasing for the duration of the session. |
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Table | One of Table | 1 | Table number of the record to apply the session change. The permitted tables are Market, InstrumentGroup, Instrument and InstrumentMarket |
| Id | Foreign key to All | 8 | Id of the record to apply the session change |
| Session | Foreign key to Session | 8 | |
| ClearFlag | Integer (unsigned) | 1 | Set to withdraw all orders in the product(s) which will have their session changed. |
Permissions
Session Set
{
table: Table.InstrumentMarket,
id: InstrumentMarket.find(eq("ShortName", "test-im")).Id,
session: Session.find(eq("ShortName", "Auction")).Id,
}
Permission Checks
| PermissionAction | Table | Scope | Index |
|---|---|---|---|
| Amend | InstrumentMarket | Instance | 0 |
| View | Market | Instance | 0 |
Test file: SessionSet