A Flask webhook server to automate MetaTrader 5 trading based on TradingView signals with configurable settings and API key authentication.
Project description
MT5 Webhook Trader
A Python Flask application designed to automate MetaTrader 5 (MT5) trading based on incoming webhook signals, typically from platforms like TradingView. This package allows users to configure their MT5 account details, trade parameters (lot size, optional Stop Loss/Take Profit in USD), and secure the webhook endpoints with an API key.
Features
- Configurable MT5 Details: Easily set your MT5 account, password, server, and trading symbol.
- Flexible Trade Parameters: Define lot size, and optional Stop Loss (SL) and Take Profit (TP) values in USD. If SL/TP values are 0 or not provided, they won't be set on the trade.
- API Key Authentication: Secure your webhook endpoints with an API key (
X-API-Keyheader) to prevent unauthorized access. - Signal Gap Control: Prevent over-trading by setting a minimum time gap between consecutive BUY or SELL signals.
- Automatic Position Management: Closes all existing positions for the specified symbol before placing a new trade signal.
- Status Endpoints: Check current open positions or manually close all positions via dedicated API endpoints.
- Persistent Signal Times: Stores the last signal time to disk to maintain state across restarts.
Installation
pip install shawon_mt5_automation
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
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 shawon_mt5_automation-2.2.3.tar.gz.
File metadata
- Download URL: shawon_mt5_automation-2.2.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa183912ac3d4812f9d7ea9a494c50507c3f2ad795bbd1a288ef2c3304f0536
|
|
| MD5 |
2f60a2ea73ba26a9a97b31066f9b2e82
|
|
| BLAKE2b-256 |
f3e5a3c623bae9d2a0d10f012ebb929a3d2d740825713730fbcf11b8fff84196
|
File details
Details for the file shawon_mt5_automation-2.2.3-py3-none-any.whl.
File metadata
- Download URL: shawon_mt5_automation-2.2.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15d5e2eb2552cd9d550883ba79540d24dd82abb4b52c73cde0ad0cd42d53d8ca
|
|
| MD5 |
025d3f625a38182a53c75b080328a955
|
|
| BLAKE2b-256 |
8eba7a698ca45f0f9fb9a59538bbda9c87eb25572237b05dc8addd75e3bb047b
|