Click or drag to resize

Orders states

The order during it’s life goes through the following states:

Order States

To find out the order trading state (what volume is matched, whether the order fully matched, and so on) the IsCanceled(Order), IsMatchedEmpty(Order), IsMatchedPartially(Order), IsMatched(Order) and GetMatchedVolume(Order, IConnector, Boolean) methods should be used:

C#
// any order
Order order = ....

// is the order was cancelled
Console.WriteLine(order.IsCanceled());

// or fully matched
Console.WriteLine(order.IsMatched());

// or just partially
Console.WriteLine(order.IsMatchedPartially());

// or non of any contracts was matched 
Console.WriteLine(order.IsMatchedEmpty());

// so we are getting the realized (=matched) order size.
Console.WriteLine(order.GetRealizedVolume());