User
The User Table contains a list of the UserIds that are used by individuals to log into the Trading System. Every User belongs to a single Firm.
- Section: Actors
Metadata
- Base Table Class: Static
- Default Size: 100
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this User. |
| Status | Set of Status | 4 | |
| UserId | String | 200 | The Id that the User uses when logging into the Trading System via an API or the UI. |
| UserType | One of UserType | 1 | The type of this User. |
| TemplateUser | Foreign key to User | 8 | The Id of the template user from which to inherit permissions, Status and Groups (only copies Groups if in the same Firm). |
| LoggedIn | Integer (unsigned) | 1 | Whether this particular User is currently logged in and how many sessions are currently active. If zero, the User is not logged in. |
| MaxLogins | Integer (unsigned) | 1 | The maximum number of simultaneous logins allowed for the User. Zero means no limit up to the system maximum defined by the constant MaxLoginSessions. |
| FailedLogins | Integer (unsigned) | 1 | The number of times since the Trading System was started that the User has had a failed login (such as for an incorrect password). |
| MaxFailedLogins | Integer (unsigned) | 1 | The maximum number of failed logins that the User may have before they are locked out of the Trading System. |
| LockedOut | Integer (unsigned) | 1 | Set to true if the User has been locked out of the Trading System. They will be unable to login again until this field is reset to false by an administrator. |
| PasswordMustChange | Integer (unsigned) | 1 | Whether the User must change their password before being allowed to proceed with actions in the system. |
| Firm | Foreign key to Firm | 8 | The Firm to which the User belongs. |
| Groups | Integer (unsigned) | 8 | A bitfield that can be used to set to which Groups in the User's Firm the user belongs. |
| Password | String | 128 | The password for this account. Passwords are stored in the trading system as a one way encrypted hash and so the plain text password (required to login) cannot be inferred/retrieved from the system. - Password must be at least 16 characters - New password cannot be the same as the old password when resetting, but no historical passwords are kept - Password cannot be based on a dictionary word, or a reversed dictionary word - Password can't be too simplistic or systematic e.g. obvious repetition or sequence of characters |
| WorkingStatus | Set of Status | 4 | |
| PasswordValidUntil | Integer (unsigned) | 4 | The date and time at which the User's password expires at which point they will be unable to log into the Trading System until assigned a new password by an administrator. This date/time is reset whenever the User changes their password. |
| ShortName | String | 24 | The short text identifier of this User. |
| Name | String | 48 | The long text identifier of this User. |
| CheckLimits | Integer (unsigned) | 1 | If true, trading limits will be checked for the User. |
| WarnPercent | Integer (signed) | 8 | A percentage of each limit beyond which the User's LimitStatus will be set to a warning. |
| LimitStatus | One of LimitStatus | 1 | |
| PlannedBuyVal | Integer (signed) | 8 | |
| ActualBuyVal | Integer (signed) | 8 | |
| PlannedSellVal | Integer (signed) | 8 | |
| ActualSellVal | Integer (signed) | 8 | |
| BuyValLimit | Integer (signed) | 8 | |
| SellValLimit | Integer (signed) | 8 | |
| NetValLimit | Integer (signed) | 8 | User's value limit for their net trading activity. That is the difference between ActualBuyVal and ActualSellVal plus the value of all Planned Buy orders. |
| GrossValLimit | Integer (signed) | 8 | User's value limit for all outstanding orders and confirmed trades (Buy + Sell). That is the sum of ActualBuyVal, ActualSellVal, PlannedBuyVal and PlannedSellVal. |
| BuyOrderVal | Integer (signed) | 8 | |
| SellOrderVal | Integer (signed) | 8 | |
| MaintainPositions | Integer (unsigned) | 1 | |
| LoginMethod | Set of LoginMethod | 4 | |
| UseFullChangeTables | 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 User. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this User. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this User. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this User. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this User was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this User. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this User was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the User table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; ContactDetail-->|User|User click ContactDetail "/marketgrid/developer/model/tables/ContactDetail" GroupUser-->|User|User click GroupUser "/marketgrid/developer/model/tables/GroupUser" Auction-->|TerminateRequestedUser|User click Auction "/marketgrid/developer/model/tables/Auction" Permission-->|User|User click Permission "/marketgrid/developer/model/tables/Permission" UserLogin-->|User|User click UserLogin "/marketgrid/developer/model/tables/UserLogin" Reply-->|user|User click Reply "/marketgrid/developer/model/tables/Reply" Order-->|User|User Order-->|AmendUser|User Order-->|OriginatingUser|User Order-->|CounterParty|User click Order "/marketgrid/developer/model/tables/Order" Blotter-->|User|User click Blotter "/marketgrid/developer/model/tables/Blotter" Trade-->|User|User click Trade "/marketgrid/developer/model/tables/Trade" RFQ-->|User|User RFQ-->|CounterPartyUser|User click RFQ "/marketgrid/developer/model/tables/RFQ" RFQCounterParty-->|User|User RFQCounterParty-->|CPUser|User click RFQCounterParty "/marketgrid/developer/model/tables/RFQCounterParty" RFQRecipient-->|User|User click RFQRecipient "/marketgrid/developer/model/tables/RFQRecipient"