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.
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.commentandresult.request_idwith 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 codes
- MT5 error 10013: Invalid request (TRADE_RETCODE_INVALID)
- MT5 error 10011: Request processing error (TRADE_RETCODE_ERROR)
- MT4 error 9: Malfunctional trade operation (ERR_MALFUNCTIONAL_TRADE)
- MT4 error 5: Old version of the client terminal (ERR_OLD_VERSION)
Related MT5 Python functions
One API for MT4 and MT5
Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.