MetaTrader 5 build 6230 + Python API 5.0.6231 — -10005 IPC timeout

Hello,

I am reporting a reproducible Python API IPC problem after MetaTrader 5 updated to terminal build 6230.

CURRENT ENVIRONMENT

Windows 11 x64
MetaTrader 5 terminal build: 6230
Python: 3.12.14 x64
Official MetaTrader5 Python package: 5.0.6231

The terminal is already running and connected normally.

Minimal reproduction:

import MetaTrader5 as mt5

path = r"C:\Program Files\PU Prime MT5 Terminal\terminal64.exe"

result = mt5.initialize(path=path, timeout=120000)

print(result)
print(mt5.last_error())

Result:

False
(-10005, 'IPC timeout')

The failure occurs inside initialize(), before terminal_info(), account_info(), symbol_info() or symbol_info_tick() can be called.

TESTS ALREADY PERFORMED

- explicit terminal path
- default and 120-second timeout
- portable=False
- clean terminal restart
- Python and terminal are both x64
- same Windows user
- same Windows session
- same integrity level
- IPC pipe exists and its ACL permits the current user
- official MetaTrader5 Python package 5.0.6231
- minimal reproduction without our application code

The result remains -10005.

IMPORTANT REGRESSION EVIDENCE

The same PU Prime terminal installation previously worked with:

MetaTrader 5 terminal build 6182
MetaTrader5 Python package 5.0.6180
Python 3.12.14 x64

Three independent validation cycles succeeded.

mt5.initialize() completed in approximately 2.03–2.51 ms and terminal_info() / account_info() worked correctly.

After MetaTrader LiveUpdate updated the terminal to build 6230, the Python IPC connection began consistently returning -10005.

Am observat, de asemenea, același comportament de -10005 la o altă instalare MetaTrader 5 după ce s-a actualizat la aceeași versiune 6230.

DE AȘTEPTAT:

mt5.initialize() stabilește conexiunea IPC către terminalul în rulare.

ACTUAL:

mt5.initialize() expiră cu:

(-10005, 'Timeout IPC')

A reprodus cineva asta cu versiunea terminalului 6230?

Există o regresie IPC cunoscută în versiunea 6230 sau o modificare necesară a configurației atunci când se folosește pachetul oficial Python 5.0.6231?

Dacă este util, pot oferi scriptul minim de reproducere, jurnalele terminalului și rapoartele anterioare de validare cu succes build-6182/API-5.0.6180.

Nu sunt implicate operațiuni comerciale. API-ul Python este folosit doar în citire pentru datele de piață.

Mulțumesc.

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())
3.12.14 (main, Sep 29 2026, 15:00:58) [MSC v.1944 64 bit (AMD64)]
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:

  1. Which terminal-side diagnostics can identify the cause of this IPC timeout?

  2. Whether these terminal and Python-package combinations have known compatibility issues?

  3. Whether Python initialization is expected to succeed without a broker login?

  4. What supported configuration permits reliable, unattended startup after a Windows VPS reboot?

A detailed reproducibility report is available.

SA #:
<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.