MT5 error 10006: Request rejected (TRADE_RETCODE_REJECT)

The trade server refused the request without a more specific reason. Nothing was executed; read the comment before sending again.

10006TRADE_RETCODE_REJECT
After a fixSafe to retry?
NoCould it have executed?

What it means

You see this code in the retcode of a trade result, from OrderSend() in MQL5 or order_send() in Python.

10006 is the broker's general no. The server looked at the request and turned it down, but it didn't use one of the more specific codes such as invalid stops or no money.

The comment field of the result often carries the broker's own reason text, so it is worth logging.

Common causes

  • A broker risk rule, such as a maximum exposure per client or a block on a symbol for your account group.
  • A dealer rejecting the request on a symbol with request execution.
  • Trading outside the hours the broker accepts for your account, even if quotes still flow.
  • Account restrictions the server applies but doesn't spell out.

How to fix it

  • Log result.comment and result.request_id with the code.
  • Run order_check() on the same request. It catches many problems before a real send.
  • If it keeps happening on a request that looks valid, ask the broker what rule applies to your account.

Example in Python:

import MetaTrader5 as mt5

check = mt5.order_check(request)
print("check:", check.retcode, check.comment)   # 0 means the request looks fine

r = mt5.order_send(request)
if r is not None and r.retcode == mt5.TRADE_RETCODE_REJECT:
    print("rejected by the server:", r.comment, "request id", r.request_id)

Is it safe to retry?

Only after you know why. The same request usually gets the same answer, and a tight retry loop can annoy the broker's risk systems.

Could the order have executed?

No. The server refused it, so no order, deal or position was created.

How Tickwire handles it

Tickwire reports it as rejected. Nothing happened, so it is safe to change the request and send again.

MT4 errors 5 and 9, and MT4 codes Tickwire doesn't know, come back as 10006 with the MT4 code in the message.

Related MT5 Python functions

All MetaTrader error codes

One API for MT4 and MT5

Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.