MT5 HTTP Trader for Openclaw

A secure bridge for AI agents to execute MetaTrader 5 trades via a local HTTP API with mandatory human-in-the-loop confirmation.

xuanyushen19
v1.0.0
Feb 16, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mt5trade

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mt5trade using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is MT5 HTTP Trader?

The mt5-http-trader skill enables AI agents to interface directly with MetaTrader 5 through a localized HTTP server. Designed specifically for Windows environments, it leverages PowerShell to communicate with endpoints that handle market analysis, signal generation, and trade execution. This integration brings the power of algorithmic trading to your agentic workflows while maintaining a focus on reliability and developer control within the Openclaw Skills ecosystem.

The skill is built as an execution-focused assistant that prioritizes safety. It prevents automated runaway trading by enforcing strict confirmation protocols, making it an ideal choice for developers who want to combine the reasoning capabilities of LLMs with the robust execution of MT5.

MT5 HTTP Trader Use Cases

  • Automating pair trading signals for specific symbols like AEP and LNT across various timeframes.
  • Integrating custom AI market analysis with professional MetaTrader 5 order execution.
  • Monitoring local trading infrastructure health via automated agent-led status checks.
  • Creating a secure, human-verified trade execution pipeline to reduce fat-finger errors in manual trading.

How MT5 HTTP Trader Works

  1. The agent initiates a health check via the /health endpoint using PowerShell to ensure the local trading server is operational.
  2. It requests market signals for specific asset pairs by sending symbol and timeframe data to the /pair_signal endpoint.
  3. If the signal indicates a trade, the agent calls the /order_draft endpoint to prepare the transaction details.
  4. The agent presents the full draft JSON to the user and pauses for a specific manual trigger.
  5. Only after receiving the exact string CONFIRM ORDER from the user does the agent call the /order_confirm endpoint to finalize the trade.

MT5 HTTP Trader Setup

This skill requires a Windows (win32) environment and a local MT5 trading HTTP API running at http://127.0.0.1:8000.

# Ensure your local API server is running on port 8000
# The agent uses PowerShell's Invoke-RestMethod (irm) to interact with the API.

Verify connectivity manually using the Openclaw Skills health check command:

powershell -NoProfile -Command "irm http://127.0.0.1:8000/health | ConvertTo-Json -Depth 50"

MT5 HTTP Trader Data Schema & Taxonomy

The skill manages data through structured JSON payloads exchanged between the agent and the local server.

Endpoint Data Object Key Fields
/pair_signal Input a_symbol, b_symbol, timeframe
/order_draft Output Full trade specification JSON
/order_confirm Input Validated draft payload from the draft stage
/health Output ok status (boolean)

MT5 HTTP Trader Advanced Features

  • Human-in-the-Loop Safety: Zero-automation policy for order confirmation prevents unauthorized trades.
  • PowerShell Native Integration: Optimized for Windows systems using irm for seamless JSON handling.
  • Deep Data Parsing: Utilizes ConvertTo-Json with a depth of 50 to handle complex, nested trading metadata without data loss.
  • Explicit Signal Interpreting: Logic to automatically stop and summarize if signals indicate a NO TRADE or HOLD status.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*