跳到正文
TakoAPI
返回技能列表

mt5-httpapi

由 psyb0t 提供

Shopping & E-commerce
907下载量由 clawskills.sh 提供
3星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

MetaTrader 5 trading via REST API — get market data, place/modify/close orders, manage positions, pull history.

描述

该技能的功能

Wraps MetaTrader 5 in a REST API so you can place trades, manage positions, and pull market data over plain HTTP. Runs alongside an MT5 terminal inside a Windows environment and exposes forex, crypto, and stock market operations via JSON.

Removes the need for MQL5 scripting or Python MT5 bindings by exposing the full trading lifecycle through standard HTTP calls from any language or system.

何时使用

  • Automating entry orders based on technical indicator signals
  • Fetching live tick data for a custom trading algorithm
  • Closing all open positions before a scheduled market event
  • Adjusting stop-loss levels dynamically as price moves
  • Pulling daily deal history for P&L reporting

示例工作流

输入

User asks: Place a 0.1 lot BUY on EURUSD with SL at 1.08 and TP at 1.10

智能体
  1. 1

    GET /account to verify trade_allowed is true

  2. 2

    GET /symbols/EURUSD to confirm trade_mode is 4 and note trade_contract_size

  3. 3

    GET /terminal to confirm connected is true

  4. 4

    POST /orders with symbol EURUSD, type BUY, volume 0.1, sl 1.08, tp 1.10

  5. 5

    Check retcode in response — 10009 confirms execution

输出

Order filled at market price, deal and order IDs returned with ticket numbers

前置要求

  • MT5_API_URL environment variable pointing to the running API server
  • mt5-httpapi server installed and running (github.com/psyb0t/mt5-httpapi)
  • MetaTrader 5 terminal with a live or demo broker account
  • Windows environment or VM to host MetaTrader 5

安装

clawhub install psyb0t/mt5-httpapi

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接