Skip to content

CancelPendingOrderAsync Method

CancelPendingOrderAsync

Summary

Cancel a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation CancelPendingOrderAsync(PendingOrder pendingOrder, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to cancel
callback Action Method that is called when pending order is cancelled

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

Last update: September 26, 2022

Comments