Skip to main content
Glama

freqtrade-mcp

Freqtrade-MCP

MCP 服务器通过其 REST API 与Freqtrade加密货币交易机器人集成,实现自动交易操作的无缝 AI 代理交互。

GitHub 许可证Python 版本地位

安装

先决条件

  • Python 3.13+ :确保您的系统上安装了 Python。
  • Freqtrade :正在运行的 Freqtrade 实例,并启用了 REST API(请参阅Freqtrade 文档)。
  • Git :用于克隆存储库。

步骤

  1. 克隆存储库
    git clone https://github.com/kukapay/freqtrade-mcp.git cd freqtrade-mcp
  2. 安装依赖项:使用pip
    pip install freqtrade-client mcp[cli]
    或者使用uv (可选):
    uv add freqtrade-client "mcp[cli]"
  3. 客户端配置
    "mcpServers": { "freqtrade-mcp": { "command": "uv", "args": [ "--directory", "/your/path/to/freqtrade-mcp", "run", "__main__.py" ], "env": { "FREQTRADE_API_URL": "http://127.0.0.1:8080", "FREQTRADE_USERNAME": "your_username", "FREQTRADE_PASSWORD": "your_password" } } }
  4. Freqtrade配置通过将 api_server 部分添加到您的配置并将 api_server.enabled 设置为 true 来启用其余 API。示例配置:
    "api_server": { "enabled": true, "listen_ip_address": "127.0.0.1", "listen_port": 8080, "verbosity": "error", "enable_openapi": false, "jwt_secret_key": "somethingrandom", "CORS_origins": [], "username": "Freqtrader", "password": "SuperSecret1!", "ws_token": "sercet_Ws_t0ken" },
    在此处查看文档。

用法

可用工具

服务器将以下 Freqtrade API 端点公开为 MCP 工具:

工具描述参数
fetch_market_data获取一对 OHLCV 数据pair: strtimeframe: str
fetch_bot_status获取开放贸易状态没有任何
fetch_profit获取利润摘要没有任何
fetch_balance获取账户余额没有任何
fetch_performance获取性能指标没有任何
fetch_whitelist获取对的白名单没有任何
fetch_blacklist获取对的黑名单没有任何
fetch_trades获取交易历史记录没有任何
fetch_config获取机器人配置没有任何
fetch_locks获得贸易锁没有任何
place_trade进行买入/卖出交易pair: strside: strstake_amount: float
start_bot启动机器人没有任何
stop_bot停止机器人没有任何
reload_config重新加载机器人配置没有任何
add_blacklist将对添加到黑名单pair: str
delete_blacklist从黑名单中删除该对pair: str
delete_lock删除交易锁lock_id: int

示例提示

  1. 获取市场数据
    • “显示 BTC/USDT 的每小时价格数据。”
    • “ETH/BTC 的 5 分钟图表是什么样的?”
    • “请提供过去一小时 XRP/USDT 的最新烛台数据。”
  2. 获取机器人状态
    • “我的未平仓交易的当前状态是什么?”
    • “现在有活跃的交易吗?”
    • “请告诉我机器人目前的交易活动。”
  3. 获取利润
    • “我目前赚了多少利润?”
    • “该机器人的总利润摘要是多少?”
    • “你能给我看看我的交易收益吗?”
  4. 获取余额
    • “我的账户余额是多少?”
    • “我的交易账户里有多少钱?”
    • “告诉我我的 Freqtrade 钱包的当前余额。”
  5. 获取性能
    • “这个机器人的表现怎么样?”
    • “我交易的绩效指标是什么?”
    • “给我看看交易统计数据。”
  6. 获取白名单
    • “哪些货币对在白名单上?”
    • “该机器人可以使用哪些交易对?”
    • “请为我列出白名单中的对。”
  7. 获取黑名单
    • “哪些货币对被列入了黑名单?”
    • “目前哪些交易对被屏蔽了?”
    • “跟我说说黑名单的事。”
  8. 获取交易
    • “我的已平仓交易的历史记录是什么?”
    • “向我展示机器人完成的所有交易。”
    • “你能列出我过去的交易吗?”
  9. 获取配置
    • “当前的机器人配置是什么?”
    • “向我展示机器人正在使用的设置。”
    • “告诉我有关 Freqtrade 配置的信息。”
  10. 获取锁
  • “是否有任何交易锁处于活动状态?”
  • “目前有哪些锁?”
  • “给我看一下交易锁的清单。”
  1. 地点交易
  • “立即购买 0.01 BTC/USDT。”
  • “立即卖出 0.05 ETH/USDT。”
  • “下达 0.1 XRP/USDT 的买入订单。”
  1. 启动机器人
  • “启动交易机器人。”
  • “打开 Freqtrade 机器人。”
  • “立即让机器人运行起来。”
  1. 停止机器人
  • “停止交易机器人。”
  • “关闭 Freqtrade 机器人。”
  • “暂停机器人的交易。”
  1. 重新加载配置
  • “重新加载机器人的配置。”
  • “更新机器人设置。”
  • “刷新 Freqtrade 配置。”
  1. 添加黑名单
  • “将 ETH/USDT 列入黑名单。”
  • “将 BTC/ETH 添加到黑名单。”
  • “XRP/USDT 的区块交易。”
  1. 删除黑名单
  • “将 ETH/USDT 从黑名单中移除。”
  • “解除 BTC/ETH 交易封锁。”
  • “将 XRP/USDT 从黑名单中移除。”
  1. 删除锁
  • “删除ID为123的交易锁。”
  • “移除45号锁。”
  • “解锁ID 7的交易。”

执照

本项目遵循 MIT 许可证。详情请参阅许可证文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

与 Freqtrade 加密货币交易机器人集成的 MCP 服务器。

  1. 安装
    1. 先决条件
    2. 步骤
  2. 用法
    1. 可用工具
    2. 示例提示
  3. 执照

    Related MCP Servers

    • A
      security
      A
      license
      A
      quality
      A MCP server offering tools for cryptocurrency research and Ethereum-based automation.
      Last updated -
      113
      6
      37
      TypeScript
      AGPL 3.0
    • -
      security
      F
      license
      -
      quality
      An MCP server that enables AI models like Claude to interact with the Trading Simulator API for checking balances, viewing prices, and executing trades with automatic chain detection.
      Last updated -
      TypeScript
      • Linux
      • Apple
    • A
      security
      A
      license
      A
      quality
      An MCP server providing unified access to blockchain operations, bridging, swapping, and crypto trading strategies for AI agents.
      Last updated -
      20
      139
      Python
      GPL 3.0
      • Apple
      • Linux
    • -
      security
      A
      license
      -
      quality
      An MCP server that provides real-time cryptocurrency news sourced from NewsData for AI agents.
      Last updated -
      3
      Python
      MIT License

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/freqtrade-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server