Python MT5: comment='Unsupported filling mode' error

 

I'm totally at a loss for what the problem could be; I have the following request being sent to multiple accounts (held on various brokers and MT5 terminals):

        request = {
        "action": mt5_interface.TRADE_ACTION_DEAL,
        "symbol": pair,
        "volume": lot_size,
        "type": order_type,
        "price": price,
        "sl": stop_loss,
        "type_time": mt5_interface.ORDER_TIME_GTC,
        "type_filling": mt5_interface.ORDER_FILLING_FOK,
        }

This request successfully opens the order on all accounts except for one, which suffers from the 'Unsupport filling mode' error.

I've tried all filling modes, ORDER_FILLING_FOK,  ORDER_FILLING_RETURNORDER_FILLING_IOC, but they all suffer this problem. The account it doesn't work on has EA enabled and everything.

What's stranger, is I am able to successfully modify orders on the account that opening orders doesn't work on. See:

request = {
                "action": mt5_interface.TRADE_ACTION_SLTP,
                "symbol": pair,
                "sl": position.price_open,
                "position": position.ticket,
                "type_filling": mt5_interface.ORDER_FILLING_FOK,
            }

which successfully will move the stoploss to the open price level. I'm not sure why this works but not order opening (the exact same of which works on all the other accounts).

Any thoughts?

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Requests to execute trade operations are formalized as orders. Each order has a variety of properties for reading. Information on them can be...