ICommand Interface

GF API Documentation
Order command: one of create, modify and cancel command of an Order

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

public interface ICommand

The ICommand type exposes the following members.


Public propertyAppSoftware
Name of 3rd party application that placed this command
Public propertyExchangeOrderID
Exchange Order ID or null for cancel commands
Public propertyID
Command identifier
Public propertyOrder
Owning order
Public propertyResultComments
Comments of (unsuccessful) execution
Public propertyResultTimestamp
Timestamp of execution, UTC
Public propertyState
Current command state
Public propertySubmissionType
Was this order manually executed?
Public propertyTimestamp
Command creation timestamp, UTC
Public propertyType
Current command state
Public propertyTypeState
Gets the verbal interpretation of state depending of type for example "Created", "Modified", "Cancelling", "Cancel failed" etc
Public propertyVersion
Associated version (for create/modify command) or null - for cancel commands

During the lifetime of order, user can control it by sending commands.
Create command is associated with initial Version of order and created when client sends a new order.
Modify command also have new version of order, but cancel command does not.

When command is sent to server, it has Sent state. The state then could be changed to Failed, meaning that command was failed by the reason found in ResultComments property, or to Executed - meaning that command succeed. in both cases, ResultTimestamp property will updated with execution/failure timestamp.
When cancel command succeed, order becomes Cancelled or Completed - depending of number of active fills.
If the modify command succeeds, current order version is replaced, and variable order properties, such as quantity or price will be updated.
See Also