Firm
A Firm is the organisational unit into which users of the Trading System are grouped. Every Firm belongs to one Enterprise.
- Section: Actors
Metadata
- Base Table Class: Static
- Default Size: 50
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Integer (signed) | 8 | The unique identifier of this Firm. |
| Status | Set of Status | 4 | |
| ShortName | String | 24 | The short text identifier of this Firm. |
| Name | String | 48 | The long text identifier of this Firm. |
| ExternalFK | Integer (unsigned) | 8 | The FK of this record in the external system that generated it. |
| FirmType | One of FirmType | 1 | The type of the Firm. |
| PermissionGroup | Foreign key to PermissionGroup | 8 | (Optional) permission group that defines a base collection of permissions applied to this firm. |
| TemplateFirm | Foreign key to Firm | 8 | The Id of the template firm from which to inherit permissions, status & groups. |
| FeeSet | Foreign key to FeeSet | 8 | The default fee set used to calculate Exchange fees for the Firm. A value from the FeeSet table. |
| CheckAccounts | Integer (unsigned) | 1 | If set to 1, indicates that the System should validate the Account field for order entry against the Account Table. |
| TrackHoldings | Integer (unsigned) | 1 | If set to 1, indicates that Holdings balances should be maintained by the System for the Firm's accounts. If this is set, CheckAccounts must also be set. |
| CanShortSell | Integer (unsigned) | 1 | If set to 1, indicates that the Firm is allowed to short sell for Instruments that allow short selling This bit is only used if CheckAccounts and TrackHoldings are both set. |
| CanResellToday | Integer (unsigned) | 1 | If set and short selling is being checked, indicates that today's buys can be sold on the same day for the Firm. |
| TrackCash | Integer (unsigned) | 1 | If set to 1, indicates that Cash balances should be maintained by the System for the Firm's accounts. If this is set, CheckAccounts must also be set. |
| CanUseTodaysCash | Integer (unsigned) | 1 | If set and cash balances are not allowed to be negative, indicates that cash from today's sells can be used on the same day for the Firm. |
| CashCanBeNegative | Integer (unsigned) | 1 | If set to 1, indicates that the Firm is allowed to have a negative cash balance. This bit is only used if CheckAccounts and TrackCash are both set. |
| Enterprise | Foreign key to Enterprise | 8 | The Firm's Enterprise, from the Enterprise table. |
| CheckLimits | Integer (unsigned) | 1 | If set, trading limits will be checked by the System for the Firm. |
| WarnPercent | Integer (signed) | 8 | If non-zero, a level (as a percentage of limits set) at which a warning will be issued for the Firm for any of the trading limits. CheckLimits must be set if this is used. |
| LimitStatus | One of LimitStatus | 1 | If non-zero, one of the Firm's trading limits has breached the WarnPercent level. |
| Address | String | 500 | The street address of the Firm. |
| WorkingStatus | Set of Status | 4 | The Firm's current Status taking into account the Enterprise's Status. |
| BankName | String | 20 | The name of the banking institution at which the Firm's HouseAccount and CustomerAccounts are held. |
| HouseAccount | String | 35 | The account to use when processing payments for Proprietary or House trading for this Firm. |
| CustomerAccount | String | 35 | The account to use when processing payments for Agency or Client trading for this Firm. |
| PlannedBuyVal | Integer (signed) | 8 | Total outstanding balance (value) of buy orders for the Firm. Will be maintained if either CheckLimits or MaintainPositions is set. |
| PlannedSellVal | Integer (signed) | 8 | Total outstanding balance (value) of sell orders for the Firm. Will be maintained if either CheckLimits or MaintainPositions is set. |
| ActualBuyVal | Integer (signed) | 8 | Total value of buy trades for the Firm. Will be maintained if either CheckLimits or MaintainPositions is set. |
| ActualSellVal | Integer (signed) | 8 | Total value of sell trades for the Firm. Will be maintained if either CheckLimits or MaintainPositions is set. |
| BuyValLimit | Integer (signed) | 8 | Firm's value limit for outstanding buy orders and confirmed trades. |
| SellValLimit | Integer (signed) | 8 | Firm's value limit for outstanding sell orders and confirmed trades. |
| NetValLimit | Integer (signed) | 8 | Firm'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 | Firm'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 | Firm's value limit for a single buy order. |
| SellOrderVal | Integer (signed) | 8 | Firm's value limit for a single sell order. |
| MaintainPositions | Integer (unsigned) | 1 | If set to 1, the System will maintain trading positions for the Firm without checking trading limits (use CheckLimits to have both positions maintained and limits checked). |
| SummaryAccount | Foreign key to Account | 8 | This is the first Account for the Firm (i.e., the first Account for this Firm in the Account table). It is used for an Enterprise Control Firm, which should only have one Account that will be used to provide summary Holdings totals for the Firms in the Enterprise. |
| NewCounterparties | Integer (signed) | 8 | |
| BICId | String | 34 | Banking BIC code for the firm if relevant. Not currently in use. |
| City | String | 24 | The city name (as text) of the Firm. |
| State | String | 24 | The State (as text) of the Firm. |
| ZipCode | String | 20 | The zip or post code (as text) of the Firm. |
| Country | Foreign key to Country | 8 | This is a reference to the Country table. It is keyed by the Country column in this table to the Id column in the Country table. |
| FirmPriorityMatching | One of FirmPriorityMatching | 1 | If set to 1, indicates that this Price-Firm-Time priority matching will be used for the Firm's orders. |
| SettlementCurrency | Foreign key to Instrument | 8 | An 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. |
| DefaultExpiryType | Set of OrderType | 4 | The default Expiry for orders entered for the Firm. |
| 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 Firm. |
| OwnerGroup | Foreign key to Group | 8 | The Id of the Group that owns this Firm. |
| OwnerFirm | Foreign key to Firm | 8 | The Id of the Firm that owns this Firm. |
| CreateUser | Foreign key to User | 8 | The Id of the User that created this Firm. |
| CreateTimestamp | Integer (unsigned) | 8 | The time at which this Firm was created. |
| UpdateUser | Foreign key to User | 8 | The Id of the User that last updated this Firm. |
| UpdateTimestamp | Integer (unsigned) | 8 | The time at which this Firm was last updated. |
Foreign Keys
The following diagram shows the tables that have a foreign key link to the Firm table. All Table nodes can be clicked to take you to that table's definition page.
graph LR; Group-->|Firm|Firm click Group "/marketgrid/developer/model/tables/Group" User-->|Firm|Firm click User "/marketgrid/developer/model/tables/User" UserName-->|Firm|Firm click UserName "/marketgrid/developer/model/tables/UserName" Auction-->|Firm|Firm click Auction "/marketgrid/developer/model/tables/Auction" Permission-->|Firm|Firm click Permission "/marketgrid/developer/model/tables/Permission" Account-->|Firm|Firm click Account "/marketgrid/developer/model/tables/Account" ExternalAccount-->|Firm|Firm click ExternalAccount "/marketgrid/developer/model/tables/ExternalAccount" FirmAccountType-->|Firm|Firm click FirmAccountType "/marketgrid/developer/model/tables/FirmAccountType" Order-->|Firm|Firm Order-->|CounterPartyFirm|Firm click Order "/marketgrid/developer/model/tables/Order" Trade-->|Firm|Firm click Trade "/marketgrid/developer/model/tables/Trade" RFQ-->|Firm|Firm RFQ-->|CounterPartyFirm|Firm click RFQ "/marketgrid/developer/model/tables/RFQ" RFQCounterParty-->|CPFirm|Firm click RFQCounterParty "/marketgrid/developer/model/tables/RFQCounterParty" RFQRecipient-->|Firm|Firm click RFQRecipient "/marketgrid/developer/model/tables/RFQRecipient"