IOrder Interface

GF API Documentation
A client order.

Namespace:  GF.Api.Orders
Assembly:  GF.Api (in GF.Api.dll) Version: dd7171be68430789135ec75c4e9f4bbfeca31201
Syntax

public interface IOrder : IComparable

The IOrder type exposes the following members.

Properties

  NameDescription
Public propertyABChildren
Children orders for allocation block order
Public propertyABParent
Parent order for allocation block child order
Public propertyAccount
Order account
Public propertyAllocationBlock
Order allocation block
Public propertyCommands
Order commands
Public propertyComments
Order comments
Public propertyContract
Order contract
Public propertyCurrentState
Current state of order
Public propertyCustomCompound
Custom Compound: detailed declaration of the legs
Public propertyFills
Order fills, active and cancelled.
Public propertyFlags
Order execution flags of last active version
Public propertyID
Server identifier
Public propertyIsBuySide
Helper property that evaluates Side property
Public propertyIsFilled
Checks whether order is fully filled (filled quantity = total quantity)
Public propertyIsFinalState
Checks whether order is Completed, Cancelled or Rejected so no state changes are expected
Public propertyIsIceberg
Public propertyIsMarketOrder
Checks whether the order is market
Public propertyIsReadOnly
Order cannot be cancelled or modified
Public propertyIsTrailingStop
Public propertyLinked
Link to leg of main OSO order
Public propertyOCO
Link to paired OCO order
Public propertyParent
Link to main OSO order
Public propertyParentOrder
Link to parent reference order
Public propertyPrice
Current order limit/stop price
Public propertyPrice2
Current order limit price for STPLMT orders
Public propertyQuantity
Total order quantity
Public propertySide
Order Side (Buy/Sell)
Public propertyStates
Order states history
Public propertySubOrders
Link to children suborders
Public propertyTicketNumber
ID of last active version of order
Public propertyTimestamp
Order creation timestamp
Public propertyTrader
Trader, to whose account order belongs (for admins) or null (for traders)
Public propertyType
Current order type
Public propertyTypePriceString
Gets type and (optionally) price as "MKT", "LMT 1234.0", "STP 123 07.25 LMT 120 31.75"
Public propertyVersions
Order version history
Top
Remarks

When order is created, its placed to IOrdersApi collection with a local ID (always negative). As server receives the order, it confirms it and assigns a global unique order ID, then client is notified by [!:IOrdersApi.OnOrderConfirmed] event. At this point, order current state is Sent, it has one IOrderState in its States collection, a create ICommand with initial order Version in Commands and Versions respectively.

Some orders, especially pit or MOO/ MOC ones, could then change their state to Held - this means that they are not active yet and waiting of activation. MOO/MOC orders

Prior to activation, order can be rejected at different stages by risk system, live broker or electronic execution system. In this case it becomes Rejected

When order is accepted by system, broker and/or electronic execution system, it becomes Working - this means that order is active and could be filled. Market orders usually get filled and completed in a few milliseconds, if trading session is now active for order Contract. Other orders will wait until order condition is satisfied.

Client can request order cancellation - see CancelOrder(OrderID, SubmissionType, Location, Tag50), or modification - in this case he needs to create a ModifyOrderDraft, change values he wants to modify and call ModifyOrder(ModifyOrderDraft) method. Both of these actions creates a ICommand, and modification also creates a new order version.

Finally, order becomes Completed or Cancelled - note, that cancellation of a partially filled order makes the order completed, so client should look at filled quantity instead of order quantity to see whether order was fully completed or not.
See Also

Reference