public property O2GLastOrderUpdateResponseReader.UpdateType

Brief

Gets the last operation that has been performed with an order.

Declaration
C#
O2GTableUpdateType  UpdateType get;

Details

The possible return values are:

Insert

An order is created and inserted in the Orders table.

Update

An order is updated. For example, the user changes any order property (amount, rate, etc) or an order status changes. For the possible statuses of different order types, refer to the Orders State Machines section.

Delete

An order is deleted from the Orders table. For example, an order is executed or cancelled by the user or the trading server.

Example

Getting the last order operation [hide]

    // Implementation of IO2GResponseListener interface public method onRequestCompleted
    public void onRequestCompleted(String requestID, O2GResponse response)
    {
        O2GResponseReaderFactory readerFactory = mSession.getResponseReaderFactory();
        if (readerFactory != null)
        {
            if (response.Type == O2GResponseType.GetLastOrderUpdate)
            {
                O2GLastOrderUpdateResponseReader lastOrderUpdateResponseReader = readerFactory.createLastOrderUpdateResponseReader(response);
                O2GOrderRow orderRow = lastOrderUpdateResponseReader.Order;
                Console.WriteLine("UpdateType: " + lastOrderUpdateResponseReader.UpdateType.ToString() +
                                  " OrderID: " + orderRow.OrderID);
            }
        }
   }

Declared in O2GLastOrderUpdateResponseReader

back