Cancel all syntax to cancel all open orders

I need to sometimes cancel all my orders under a Redi Plus user ID. I can currently cancel via excel VBA and cancel by account symbol. However, if I feed each individual symbol and request a cancel that way, it is too slow. Is there a cancel all and if so, what is the VBA syntax?

Tagged:

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @kris_mcc

    In the RediLib.Application class, there is the CancelAllOrders method used to cancel all open orders filtered by side and supervisory scope.

    image

    The code looks like:

    Dim App As New RediLib.Application
    Dim verr, rtnVal
    rtnVal = App.CancelAllOrders(“Buy”, 1, verr)

    You can refer to the REDI API SPECIFICATION for more information.