Skip to main content

MetaTrader5 for linux users

Project description

MetaTrader 5 for Linux

A package that uses Wine, RPyC, and a Python Windows version 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 Python for Windows on Linux using Wine.

  3. Find the path to python.exe (e.g., /home/user/.wine/drive_c/users/user/Local Settings/Application Data/Programs/Python/Python39).

  4. Install the MetaTrader5 library on your Windows Python:

    pip install MetaTrader5
    
  5. Install this package on both Windows and Linux Python:

    pip install mt5linux
    

Docker

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

Usage

  1. Open MetaTrader5.

  2. Start the server:

    • Windows (native):

      python -m mt5linux
      
    • Linux (with Wine):

      wine python -m mt5linux
      

    The server accepts various options. View them with:

    python -m mt5linux --help
    
  3. On the Linux side, use the library as usual:

    from mt5linux import MetaTrader5
    
    mt5 = MetaTrader5()
    mt5.initialize()
    mt5.terminal_info()
    mt5.shutdown()
    

    For full API documentation, see the official MetaTrader5 Python integration.

Thanks

Project details


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.3.tar.gz (32.5 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.3-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mt5linux-1.0.3.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mt5linux-1.0.3.tar.gz
Algorithm Hash digest
SHA256 825ceeb532e9d227bd46fadf2cc2d410be7e5585db11fe5eed9c4315b80e6246
MD5 2fefc0c52742adc9a67e3b436ece1b2d
BLAKE2b-256 7c5cd27d887677d20213069ce6c5e50262efc908f04d0fb59351f74ea235fc4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mt5linux-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mt5linux-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 345715427dfd31f0c0867053c28782054f3d8ee90616d1719d7c3ddb6fc54c9e
MD5 89d0f0b40c55f894d7aeeaaa9eedca19
BLAKE2b-256 880dba9a9defca90d6c59b30c32e2a29b12568221d3377461735d43070de7d79

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 Pingdom Monitoring Sentry Error logging StatusPage Status page