class IO2GAccountTableRow
Parents | |
IO2GAccountRow |
Brief
The class provides access to the account information and calculated fields.
Details
The class represents a single row of the Accounts table. In addition to the methods of its parent class,
the O2GAccountTableRow
class provides methods to access calculated fields, such as daily profit/loss, equity, gross profit/loss, and usable margin.
Prerequisites
The class is available only through the use of the IO2GTableManager
. An IO2GTableManager
object must have the O2GTableManagerStatus.TablesLoaded status.
For complete instructions on the table manager usage, see the
How to use table manager in ForexConnect API section.
After tables are loaded, you must obtain an instance of the IO2GAccountsTable
class. For example,
O2GAccountsTable accountsTable = (O2GAccountsTable)tableManager.getTable(O2GTable::Accounts);
Instantiating the class
If you need access to the current account information, get an instance of the class by calling any of the following methods of the
IO2GAccountsTable
class:
|
Syntax example |
|
|
|
|
|
|
|
|
|
|
|
If you want to track the Accounts table updates, your application must have a listener class that implements
the IO2GTableListener
interface.
An instance of the listener class must be subscribed to the table updates. Subscription to each update type is done individually. Before the logout, you must unsubscribe the listener
from each update type separately. The examples of subscription/unsubscription syntax are listed below.
|
Subscribe syntax |
Unsubscribe syntax |
|
|
|
|
|
To instantiate the O2GAccountTableRow
class, cast the rowData
parameter of the methods above to the
O2GAccountTableRow
type. For example,
O2GAccountTableRow row = (O2GAccountTableRow)(rowData);
Example
Get Account ID, Equity and Usable margin [show]
Public Methods | |
Gets the columns of the table. |
|
Gets the unique identification number of the account. |
|
Gets the type of the account. |
|
Gets the unique name of the account as it is displayed in the FX Trading Station. |
|
Gets the maximum amount of an order that is allowed on the account. |
|
Gets the amount of funds on the account. |
|
Gets the size of one lot. |
|
Gets value of a table cell. |
|
Gets the amount of the profits and losses (both floating and realized) of the current trading day. |
|
Gets the amount of funds on the account, including profits and losses of all open positions (the floating balance of the account). |
|
Gets the amount of profits and losses of all open positions on the account. |
|
Gets the date and time of the last occurrence of a Margin Call. |
|
Gets the unique identification number of an account leverage profile which defines the margin requirements. |
|
Gets the equity balance of the account at the beginning of a trading day. |
|
Gets a rollover maintenance flag. |
|
Gets the type of a position maintenance. |
|
Gets the unique identification number of the funds manager account. |
|
Gets the limitation state of the account. |
|
Gets the amount of accounting transactions that is applied to the account during the current trading day. |
|
Gets the type of the table. |
|
Gets the amount of funds available to open new positions or to absorb losses of the existing positions. |
|
Gets the amount of funds used to maintain all open positions on the account. |
|
Gets the amount of funds used to maintain all open positions on the account with the three-level margin policy. |
|
Gets a flag indicating whether the value of the cell is changed. |