Skip to main content

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

  1. Install Wine.

  2. Install this package on Linux Python:

    pip install mt5linux
    
  3. Download the latest mt5server.exe release binary.

Docker

Alternatively, you can run this library using Docker, see the docs.

Usage

  1. Open MetaTrader5.

  2. 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
    
  3. 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mt5linux-1.0.11.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mt5linux-1.0.11-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file mt5linux-1.0.11.tar.gz.

File metadata

  • Download URL: mt5linux-1.0.11.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

Hashes for mt5linux-1.0.11.tar.gz
Algorithm Hash digest
SHA256 3e58d8fe1832f923ce4fb5e58c525a31fea0685b6f2afde3fd1391de87422775
MD5 1335d0b5f7b1156d4e01b7a9ae0761d2
BLAKE2b-256 cac7c32cd26dd19f0d234531191e3613c88697f4855b89836b215a2ddddd3f7d

See more details on using hashes here.

File details

Details for the file mt5linux-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: mt5linux-1.0.11-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

Hashes for mt5linux-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 249eca34faafbd6fae2cf23464cdf4d104f4c79ba789281ba2d4e701fc7b4479
MD5 1b2fe4ac1d6e9eea142f9dd6e3deecb9
BLAKE2b-256 9a8559b869f357c5028b216b26e26d24ffa429f233ea5748accc1eca634905e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page