Metadata-Version: 2.1
Name: PythonMetaTrader5
Version: 1.0.2
Summary: Connect MT5 with Python
Home-page: https://github.com/Akinzou/MetaTrader5-Python
Author: Wiktor Jelen
Author-email: wiktorjn@gmail.com
Project-URL: Bug Tracker, https://github.com/Akinzou/MetaTrader5-Python/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# Python Library for MetaTrader 5 Connection

![MetaTrader 5]
This Python library enables you to connect with the MetaTrader 5 trading platform and interact with its features using Python. It allows executing trading operations, fetching market data, receiving notifications, and more.

## Requirements

To use this library, you need:

- MetaTrader 5 installed on your device.
- A trading account on the MetaTrader 5 platform (Demo or Live) that you can log in to.
- Python version 3.x installed on your device.

## Installation

To install the library, use `pip`:

```bash
pip install library_name
```
#Getting Started

Import the library in your Python script:

``import library_name
``

Connect to the MetaTrader 5 platform:

``mt5 = library_name.MetaTrader5()
mt5.connect()
``

Log in to your trading account:

``mt5.login(login='your_login', password='your_password')
``

Execute trading operations, fetch market data, etc. Examples:

```# Execute a buy order
mt5.buy(symbol='EURUSD', volume=0.1, sl=1.2000, tp=1.2500)

# Get the current price for a symbol
price = mt5.get_symbol_price('EURUSD')
print("Current price for EURUSD:", price)

# Fetch historical data for a symbol
history_data = mt5.get_symbol_history('EURUSD', timeframe='H1', from_date='2023-01-01', to_date='2023-07-31')
```

After using the library, you can disconnect:

```
mt5.disconnect()
```
