Please find information about the release here:
http://fxcodebase.com/wiki/index.php/Ma ... 280.2.0%29
Moderator: Moderator
O2G2Ptr<IO2GRequestFactory> factory = mSession->getRequestFactory(); //create the request factory
O2G2Ptr<IO2GRequest> refreshOrders = factory->createRefreshTableRequestByAccount(Orders, mAccount); //create the Orders request by Account ID
mSession->sendRequest(refreshOrders); //send the request asynchronously
if (response->getType() == GetOrders)
{
O2G2Ptr<IO2GResponseReaderFactory> pFactory = mSession->getResponseReaderFactory();
O2G2Ptr<IO2GOrdersTableResponseReader> pOrdersReader = pFactory->createOrdersTableReader(response);
for(int i=0; i< pOrdersReader->size(); i++)
{
O2G2Ptr<IO2GOrderRow> order = pOrdersReader->getRow(i);
//test the order type for "L", "S", "ST", "LT" (stop/limit/stop trailing/limit trailing)
//order->getTradeID(); //retrieve the TradeID and compare it with your trade row ID
frAnton wrote:And I got an idea. It can have more than one record changed for one table and all of them will be packed into response and available through the getUpdateTable(i) one by one.
frAnton wrote:Have another question though, are you guys going to publish Server Time? I would like to be able to synchronize the client with the server. Or may be you might suggest something.
thanks,
Anton.
private void OnTableUpdateReceive(O2GResponse response)
{
O2GResponseReaderFactory factory = mSession.getResponseReaderFactory();
if (factory == null)
return;
O2GTablesUpdatesReader updatesReader = factory.createTablesUpdatesReader(response);
if (updatesReader == null)
return;
Console.WriteLine("Server Time - {0}", updatesReader.ServerTime);
}
Users browsing this forum: No registered users and 9 guests