StatusSet

Change the status of a record.

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

NameTypeSize (bytes)Description
MessageTypeInteger (unsigned)2The unique identifier of this message.
ClientIdInteger (unsigned)4The unique identifier of a session with the server, returned in a successful LoginReply message.
RequestIdInteger (unsigned)4Within each session each message must be uniquely identified by this field. It must be monotonically increasing for the duration of the session.

Fields

NameTypeSize (bytes)Description
TableOne of Table1
IdForeign key to All8
TypeOne of StatusType1The 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.
StatusSet of Status4
ClearFlagInteger (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

PermissionActionTableScopeIndex
DeleteUserInstance2
AmendUserInstance2

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

PermissionActionTableScopeIndex
SuspendUserInstance2
AmendUserInstance2

Test file: StatusSet_SuspendUser


System Suspend

{ table: Table.System, id: 1, status: 3 }

Permission Checks

PermissionActionTableScopeIndex
SuspendVenueInstance0

Test file: StatusSet_SystemSuspend