MetaTrader 5 for Linux
A package that uses Wine, RPyC, and mt5server.exe (a standalone binary with all dependencies) to run MetaTrader5 on Linux.
For an explanation of who should use mt5linux and why, see Motivation and Use Cases.
Installation
-
Install Wine.
-
Install this package on Linux Python:
pip install mt5linux
-
Download the latest mt5server.exe release binary.
Docker
Alternatively, you can run this library using Docker, see the docs.
Usage
-
Open MetaTrader5.
-
Start the server:
- Linux (with Wine):
wine mt5server.exe [-p/--port <port>]
The default port is
18812. The server accepts various options. View them with:wine mt5server.exe --help
- Linux (with Wine):
-
On the Linux side, use the library as usual:
from mt5linux import MetaTrader5 mt5 = MetaTrader5() mt5.initialize(server=<server_ip>, login=<login_id>, password=<password>) # Or simply: mt5.initialize() to auto-search for the server mt5.terminal_info() mt5.shutdown()
For full API documentation, see the official MetaTrader5 Python integration.
Thanks
- hpdeandrade for many improvements and insights about docker.
- ananta-dev for project motivation.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mt5linux-1.0.6.tar.gz.
File metadata
- Download URL: mt5linux-1.0.6.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8acdd11bc076b0c8790cef793d7837705e8b7aa2c6c0f6b8275717a0e61c6432
|
|
| MD5 |
88d65749acfced57fd8d40b738914f28
|
|
| BLAKE2b-256 |
467f6dd15ecc136704f2e938172299906b300957807f813e7b6af895cfa50a23
|
File details
Details for the file mt5linux-1.0.6-py3-none-any.whl.
File metadata
- Download URL: mt5linux-1.0.6-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b10ce45f73dab72886f61cbfab3503a8205a7dba60a206b858cd8eb12947e9fd
|
|
| MD5 |
cb22a375dcd234e9d11099621f4a0c23
|
|
| BLAKE2b-256 |
de18d9283db204556d6561c83470bb75468cc3f804c2fc381828776bc98086d8
|