class O2GOrdersTable
Parents | |
|
Brief
The class keeps in memory the up-to-date information about orders.
Details
The class is an in-memory representation of the Orders table.
To keep this representation
in sync with the trading server, you must instantiate the class and listen to the updates coming from the trading server.
The class provides methods to find individual orders represented by the O2GOrderTableRow
.
Prerequisites
The class is available only through the use of the O2GTableManager
. An O2GTableManager
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.
Instantiating the class
To get orders information for the first time, you must obtain an instance of the class by calling the
O2GTableManager
.getTable
method with the
O2GTableType.Orders
argument. For example,
O2GOrdersTable ordersTable = (O2GOrdersTable)tableManager.getTable(O2GTableType.Orders);
Receiving notifications about the Orders table updates
To keep the O2GOrdersTable
data current, your application must listen to the Orders table updates coming from the trading server.
These updates represent inserts into the table, changes of the order information, and deletions from the table.
An instance of the class implementing the IO2GTableListener
interface
must be subscribed to the table updates. Subscription to each update type is done individually. Before the logout, you must unsubscribe the listener from every update type separately.
The table below shows the subscription/unsubsription syntax for the O2GOrdersTable
:
Update type |
Subscribe syntax |
Unsubscribe syntax |
Insert |
|
|
Update |
|
|
Delete |
|
|
The type defined in the fxcore2.dll
assembly.
The namespace is fxcore2
.
Public Properties | |
Gets an instance of the class that provides access to the list of table columns. |
|
Gets the number of rows in the reader. |
|
Gets the type of a trading table. |
Public Methods | |
Finds a row in the |
|
Iterates through the rows of the table and raises event |
|
Iterates through the rows of the table and call RowDelegate on each row. |
|
Gets the value of a cell. |
|
Gets a generic row by its index. |
|
Gets the next row from |
|
Gets the next row from |
|
Gets the next row from |
|
Gets the next row from |
|
Gets the next row from the |
|
Gets the next row from |
|
Gets the next row from |
|
Gets the next row from |
|
Gets a row from the |
|
Gets the status of the table. |
|
Checks whether the cell is changed. |
|
Checks whether the cell value can be used or not. |
|
Subscribes table listener to changes of table status. |
|
Subscribes table listener to table updates. |
|
Unsubscribes table listener from changes of table status. |
|
Unsubscribes table listener from table updates. |
Events | |
The event is fired when a new row appears in the table. |
|
The event is fired when a row is changed. |
|
The event is fired when a row is deleted. |
|
The event is fired when the table's status changes. |