MetaTrader 5 build 6230 + Python API 5.0.6231 — -10005 IPC timeout
- MetaTrader 5 Platform Update Build 5830: General Improvements
- Python Integration - initialize
- Python Integration : -10003, 'IPC initialize failed, MetaTrader 5 x64 not found'
Not reproducible.
import sys # Python version print(sys.version) import MetaTrader5 as mt5 print("MetaTrader5 package version: ",mt5.__version__) # display data on MetaTrader 5 version print("MetaTrader5 running Build: ",mt5.version()) # path = r"C:\Program Files\PU Prime MT5 Terminal\terminal64.exe" path = r"D:\Apps\MT5\Alpari\terminal64.exe" result = mt5.initialize(path=path, timeout=120000) print(result) print(mt5.last_error())
MetaTrader5 package version: 5.0.6231
MetaTrader5 running Build: (500, 6230, '25 Sep 2026')
True
(1, 'Success')
Subject: MetaTrader5 Python initialize() consistently fails with -10005 IPC timeout on Windows Server 2025
I am investigating a reproducible MetaTrader 5 Python IPC failure on a Windows Server 2025 x64 VPS.
Test configurations:
-
Production: XM MT5 build 6230, MetaTrader5 Python package 5.0.6180, SYSTEM Session 0.
-
Isolated test: XM MT5 build 6295, package 5.0.6180, Administrator Session 1.
-
Isolated comparison: Same terminal, package 5.0.6231, Administrator Session 1.
The isolated terminal runs in portable mode with a separate installation directory. Its main window is present and responsive.
Minimal reproduction:
import MetaTrader5 as mt5 result = mt5.initialize( path=r"<isolated MT5 executable path>", timeout=20000, portable=True ) print(result) print(mt5.last_error())
Every configuration returns:
False
(-10005, 'IPC timeout') A separate MCP socket-binding conflict on port 22346 was identified, with the production terminal owning that port. However, no causal relationship with the Python IPC timeout has been established.
No broker-account login or trading operations were performed in the isolated tests.
Could MetaQuotes advise:
-
Which terminal-side diagnostics can identify the cause of this IPC timeout?
-
Whether these terminal and Python-package combinations have known compatibility issues?
-
Whether Python initialization is expected to succeed without a broker login?
-
What supported configuration permits reliable, unattended startup after a Windows VPS reboot?
A detailed reproducibility report is available.
<isolated MT5 executable path>
What exact path were you using ?
Is your MT5 connected to a broker account ?
Forum on trading, automated trading systems and testing trading strategies
Persistent mt5.initialize() IPC Timeout (-10005) on MT5 Build 6231 with Python 3.13 (64-bit)
AFX Trading, 2026.10.10 19:33
Hi Alain,
Good news — I've successfully established the Python IPC connection.
After manually logging into a separate MT5 demo account, the same Python initialize() call succeeded in approximately 4 ms, rather than timing out with -10005.
The account and server identities matched, demo mode and broker connectivity were confirmed, and shutdown() completed normally.
The earlier tests failed before any account had been manually authenticated. This suggests that initial account or terminal-profile configuration may have played a role, although I haven't established the precise cause.
For automated deployments, is there a recommended way to bootstrap a completely fresh MT5 installation with account/server credentials so Python IPC can connect without requiring an initial manual GUI login?
Thank you for your help.