Trades (table)
Overview
This section describes the Trades table that contains open positions data such as floating profit/loss, charged commission, cumulative interest, and so on.
| Name | Type | Description |
|---|---|---|
| TradeID | String | The unique identification number of the open position. The number is unique within the same database that stores the account the position is opened on. For example, MINIDEMO or U100D1. The uniqueness of the open position itself is assured by the combination of the database ID and the value of this field. |
| AccountID | String | The unique identification number of the account the position is opened on. The number is unique within the database where the account is stored. For example, MINIDEMO or U100D1. The uniqueness of the account itself is assured by the combination of the database ID and the value of this field. |
| AccountName | String | The unique name of the account the position is opened on. The name is unique within the database where the account is stored. For example, MINIDEMO or U100D1. The uniqueness of the account itself is assured by the combination of the database ID and the value of this field. |
| AccountKind | String | The type of the account the position is opened on. The possible values are: 32Self-traded account, funds manager account (only LAMM), managed account (only LAMM). 36Funds manager account (only PAMM). 38Managed account (only PAMM). |
| OfferID | String | The unique identification number of the instrument traded. |
| Amount | Integer | The amount of the position. In the case of FX instruments, the amount is expressed in the base currency of the instrument. In the case of CFD instruments, the amount is expressed in contracts. |
| BuySell | String | The trade operation the position is opened by. The possible values are: BBuy. SSell. |
| OpenRate | Double | The price the position is opened at. In the case of FX instruments, it is expressed in the instrument counter currency per one unit of base currency. In the case of CFD instruments, it is expressed in the instrument native currency per one contract. |
| OpenTime | Date | The date and time when the position is opened. The time zone is defined by the system properties SERVER_TIME_UTC and BASE_TIME_ZONE. |
| OpenQuoteID | String | The unique identifier of the pair of prices (bid and ask) the position is opened at. |
| OpenOrderID | String | The unique identification number of the order the position is opened by. The number is unique within the same database that stores the account the order is placed on. For example, MINIDEMO or U100D1. The uniqueness of the order itself is assured by the combination of the database ID and the value of this field. |
| OpenOrderReqID | String | The identifier of the order request the position is opened by (see RequestID column in the Orders table). |
| OpenOrderRequestTXT | String | The custom identifier of the order the position is opened by (see RequestTXT column in the Orders table). |
| Commission | Double | The amount of funds subtracted from the account balance to pay for the broker's service in accordance with the terms and conditions of the account trading agreement. It is expressed in the account currency. If commision is not charged or has not been charged yet, the value of this field is 0.0. |
| RolloverInterest | Double | The cumulative amount of funds that is added the account balance for holding the position overnight. It is expressed in the account currency. The value of this field can be positive or negative. If the position has not been held overnight, the value of this field is 0.0. |
| TradeIDOrigin | String | The unique identification number of the position, the partial closing of which results in the opening of the current position. Otherwise, this field is empty. |
| UsedMargin | Double | The amount of funds currently committed to maintain the position. It is expressed in the account currency. |
| ValueDate | String | The simulated delivery date. The date when the position could be automatically closed. The date is provided in the yyyyMMdd format. It is applicable only for positions opened on accounts with the day netting trading mode (see MaintenanceType field in the Accounts table). Otherwise, the value of this field is blank. |
| Parties | String | The unique identifier of the environment that is used to open the position. The identifier is generated by ForexConnect. |
| Close | Double | The price at which the position can be closed at the moment. In the case of FX instruments, it is expressed in the instrument counter currency per one unit of base currency. In the case of CFD instruments, it is expressed in the instrument native currency per one contract. Note: It is a calculated field and is available only through the Table Manager. |
| GrossPL | Double | The current profit/loss of the position. It is expressed in the account currency. Note: This is a calculable field, which is calculated on the client side. |
| Limit | Double | The price of the associated limit order (profit limit level). In the case of FX instruments, it is expressed in the instrument counter currency per one unit of base currency. In the case of CFD instruments, it is expressed in the instrument native currency per one contract. If there is no associated limit order, the value of this field is 0.0. Note: This is a calculable field, which is calculated on the client side. applicable for the U.S. based accounts. In the case of the accounts subject to the FIFO rule, the value of this field is 0.0. |
| PL | Double | The current profit/loss per one lot of the position. It is expressed in the account currency. The size of one lot is obtained by getBaseUnitSize method of the TradingSettingsProvider object. Note: This is a calculable field, which is calculated on the client side. |
| Stop | Double | The price of the associated stop order (loss limit level). In the case of FX instruments, it is expressed in the instrument counter currency per one unit of base currency. In the case of CFD instruments, it is expressed in the instrument native currency per one contract. If there is no associated stop order, the value of this field is 0.0. Note: This is a calculable field, which is calculated on the client side. applicable for the U.S. based accounts. In the case of the accounts subject to the FIFO rule, the value of this field is 0.0. |
| Table of Contents | |
|---|---|