Requests the current order modification.
Visual Basic |
---|
Public Sub Modify( _ ByVal cqg_order_modify As CQGOrderModify _ ) |
- cqg_order_modify
- A CQGOrderModify object containing the modification to be made.
Order modification procedure should be started by creating a CQGOrderModify object using the PrepareModify method.
In the returned CQGOrderModify object new property values should be set. For details see its CanBeSet property.
There are several order fields that can be modified while order is not filled. Those are: quantity, price, visible quantity, extended side and locate ID. The price here is a collective name, i.e. the exact property which can be modified depends on the order type. Generally if current order has a price, it can be modified: for example market orders don't have a price, but stops and limits do, etc.
An exception will be thrown if there is no attribute mentioned for modification.
An order can be modified only while it remains in modifiable status, i.e. its status is osInOrderBook.
The order availability for modification can be determined via its CanBeModified property.
The Modify method works in asynchronous mode, which means that it returns after the request is sent, but without waiting for its results.
This method triggers several order status changes. The final status of this transaction is osInOrderBook. Each status change will be reported via OrderChanged event. The modification failure will also be reported that way.
See the usage of Modify method in the PrepareModify method's example section.