ChangeOrderPrice

ChangeOrderPrice

The ChangeOrderPrice method changes the price of an order on the exchange without withdrawing it, which is much faster than first withdrawing the order and then placing a new one.

public void ChangeOrderPrice(Order order, decimal newPrice)

order – the order object for which the price will be changed.

newPrice – the new price to which the order's price needs to be changed.

An example of use can be seen in the robot's code: https://github.com/AlexWan

In the TryReplaceOrder method of the robot at the link, you will see the use of ChangeOrderPrice:

Important Note 1

At the time of writing this article, this function is only implemented in the ALOR connector. Attempting to change the price of an order on a server that is not designed for this will result in an error.

Important Note 2

The Tester and Optimizer do not work with this method. And they will not. This is for real connections, for robots chasing speed.

If you have any difficulties or questions, please write to the support chat. Link