StatusSet
Change the status of a record.
- Section: Transactions
- Related Message: StatusSetReply
This includes deleting (for example) InstrumenMarkets or HoldingTransactions by turning off the Status.Active bit.
This includes suspending (for example) Accounts/Firms/Users by turning off the Status.Normal bit.
There is logic to enforce actor/product hierarchy - for example, suspending an Enterprise will suspend all Firms within the Enterprise, and therefore all Users within each of the suspended Firms.
If the ClearFlag is set, all Orders from the actor or product (and sub-hierarchies) will be withdrawn.
Metadata
- Message Type: TransactionMessage
- Message Number: 1013
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 | |
| Id | Foreign key to All | 8 | |
| Type | One of StatusType | 1 | The way in which the Status value provided in this transaction, should be combined with the existing value of the Status field in the instance selected in this transaction. The values have the following effect; - 0 - Replace the existing value with the value in this transaction - 1 - Add the bits of this value to the values already set in the existing value (a bitwise OR) - 2 - Keep only the bits that are set in this transaction and already set in the existing value (a bitwise AND) - 3 - Keep only the bits that are not set in this transaction and set in the existing value. This can be useful for easily turning off one or two bits in isolation. |
| Status | Set of Status | 4 | |
| ClearFlag | Integer (unsigned) | 1 |
Permissions
Delete a User
{
table: Table.User,
id: User.find(eq("UserId", "test-user")).Id,
type: StatusType.AndNot,
status: Status.Active,
clearflag: false,
}
Permission Checks
| PermissionAction | Table | Scope | Index |
|---|---|---|---|
| Delete | User | Instance | 2 |
| Amend | User | Instance | 2 |
Test file: StatusSet_DeleteUser
Suspend a User
{
table: Table.User,
id: User.find(eq("UserId", "test-user")).Id,
type: StatusType.AndNot,
status: Status.Normal,
clearflag: false,
}
Permission Checks
| PermissionAction | Table | Scope | Index |
|---|---|---|---|
| Suspend | User | Instance | 2 |
| Amend | User | Instance | 2 |
Test file: StatusSet_SuspendUser
System Suspend
{ table: Table.System, id: 1, status: 3 }
Permission Checks
| PermissionAction | Table | Scope | Index |
|---|---|---|---|
| Suspend | Venue | Instance | 0 |
Test file: StatusSet_SystemSuspend