Skip to main content

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-Key header) 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

shawon_mt5_automation-2.2.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

shawon_mt5_automation-2.2.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for shawon_mt5_automation-2.2.3.tar.gz
Algorithm Hash digest
SHA256 9fa183912ac3d4812f9d7ea9a494c50507c3f2ad795bbd1a288ef2c3304f0536
MD5 2f60a2ea73ba26a9a97b31066f9b2e82
BLAKE2b-256 f3e5a3c623bae9d2a0d10f012ebb929a3d2d740825713730fbcf11b8fff84196

See more details on using hashes here.

File details

Details for the file shawon_mt5_automation-2.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for shawon_mt5_automation-2.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15d5e2eb2552cd9d550883ba79540d24dd82abb4b52c73cde0ad0cd42d53d8ca
MD5 025d3f625a38182a53c75b080328a955
BLAKE2b-256 8eba7a698ca45f0f9fb9a59538bbda9c87eb25572237b05dc8addd75e3bb047b

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