Cancel Message Syntax

Basic Rules

  • Use Key=Value to set up instructions. Multiple keys can be separated by commas (,).
  • Spacing around keys, values, or between multiple keys is not important.
  • Keys are case-insensitive - upper or lower case does not matter.
  • The order of Key=Value pairs is not important. You can arrange them in any order.
  • Each action requires mandatory keys to be considered valid.
  • Optional keys can be included to provide additional settings or data.
  • Keys that are not supported by the action will be ignored.
  • Maximum message length is 512 characters.

You don't need to learn the syntax manually because we provide the Trade Action Generator, which allows you to generate messages correctly with just a few clicks.


Supported Keys

KeyValuesExampleDescription
action*Cancelaction=CancelCancel action
typeBuy, Selltype=Buy; type=SellFilter orders by type
symboltextsymbol=GBPUSDFilter orders by symbol
strategytextstrategy=stra001Filter orders by strategy id

Keys that marked with * are mandatory keys. Missing any of mandatory keys will make the message invalid


Explanation


action

Use this key to define the trade action you want to perform. This is mandatory key.
For canceling pending orders, use action=Cancel


type

Use this key to filter orders by type.

Valid type values are as below:

  • Buy - All Buy orders
  • Sell - All Sell orders
Message:
action=Cancel, type=Buy

Result:
All pending buy orders will be canceled.

symbol

Use this key to filter orders by symbol.

Our symbol-mapping feature helps you here in some cases. For more details, please read in Buy/Sell syntax

Message:
action=Cancel, symbol=EURUSD

Result:
All pending orders for the EURUSD symbol will be canceled.

strategy

Use this key to filter orders by Strategy Id which you set on Buy/Sell orders or the Order Ticket from your broker.

Message:
action=Cancel, strategy=stra0001

Result:
The pending orders with strategy id = stra0001 will be canceled.
Message:
action=Cancel, strategy=4974331881

Result:
The pending orders with ticket id = 4974331881 will be canceled. Assume that you have an order with this ticket id.