[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ccxt--binance-trade-bot":3,"tool-ccxt--binance-trade-bot":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":76,"owner_website":78,"owner_url":79,"languages":80,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":32,"env_os":97,"env_gpu":98,"env_ram":98,"env_deps":99,"category_tags":105,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":106,"updated_at":107,"faqs":108,"releases":139},9322,"ccxt\u002Fbinance-trade-bot","binance-trade-bot","Automated cryptocurrency trading bot","binance-trade-bot 是一款专为币安（Binance）交易所设计的自动化加密货币交易机器人。它的核心理念基于一个市场观察：大多数加密货币的走势高度相关，往往跟随比特币波动，只是存在时间上的相位差。\n\n该工具主要解决了投资者难以全天候监控市场并精准捕捉不同币种间相对强弱变化的问题。它通过一种独特的“轮动策略”自动执行交易：始终将资产从当前表现“强势”的币种兑换为表现“弱势”的币种，并借助 USDT 作为桥梁货币来连接那些没有直接交易对的代币组合。当市场轮动使得原币种重新变得强势时，机器人会自动换回，从而在扣除手续费后实现持有数量的增长。其内置的安全机制确保只有在能增加持有量的情况下才会进行回转交易，避免资产缩水。\n\n这款工具特别适合具备一定编程基础、希望尝试量化策略的加密货币爱好者及开发者使用。用户需要自行配置 Python 环境并设置币安 API 密钥。虽然项目提供了 Docker 部署和云端一键安装选项，降低了部分门槛，但使用者仍需对交易逻辑和风险有清晰认知，以便根据市场情况调整配置的币种列表和参数。","# Binance Trade Bot\n> An automated cryptocurrency trading bot for Binance\n\n## Author\nCreated by **Eden Gaon**\n\n[![Twitter Follow](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fcloudposse.svg?style=social&label=Follow%20%400xedeng)](https:\u002F\u002Ftwitter.com\u002Fshapeden)\n[![LinkedIn](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLinkedIn-Connect-blue?style=flat&logo=linkedin)](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Feden-gaon-6956a219\u002F)\n\n## Project Status\n[![GitHub Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fworkflow\u002Fstatus\u002Fedeng23\u002Fbinance-trade-bot\u002Fbinance-trade-bot?label=build)](https:\u002F\u002Fgithub.com\u002Fedeng23\u002Fbinance-trade-bot\u002Factions)\n[![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fedeng23\u002Fbinance-trade-bot)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fedeng23\u002Fbinance-trade-bot)\n\n## Quick Deploy\n[![Deploy to Heroku](https:\u002F\u002Fwww.herokucdn.com\u002Fdeploy\u002Fbutton.svg)](https:\u002F\u002Fheroku.com\u002Fdeploy?template=https:\u002F\u002Fgithub.com\u002Fedeng23\u002Fbinance-trade-bot)\n[![Deploy to DigitalOcean](https:\u002F\u002Fmp-assets1.sfo2.digitaloceanspaces.com\u002Fdeploy-to-do\u002Fdo-btn-blue.svg)](https:\u002F\u002Fcloud.digitalocean.com\u002Fapps\u002Fnew?repo=https:\u002F\u002Fgithub.com\u002Fcoinbookbrasil\u002Fbinance-trade-bot\u002Ftree\u002Fmaster&refcode=a076ff7a9a6a)\n\n## Community\nJoin our growing community on Telegram to discuss strategies, get help, or just chat!\n\n[![Telegram Chat](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fccxt_binance-trade-bot_readme_e2bcc2f56867.png)](https:\u002F\u002Ft.me\u002Fbinancetradebotchat)\n\n#### Community Telegram Chat\nhttps:\u002F\u002Ft.me\u002Fbinancetradebotchat\n\n## Why?\n\nThis project was inspired by the observation that all cryptocurrencies pretty much behave in the same way. When one spikes, they all spike, and when one takes a dive, they all do. _Pretty much_. Moreover, all coins follow Bitcoin's lead; the difference is their phase offset.\n\nSo, if coins are basically oscillating with respect to each other, it seems smart to trade the rising coin for the falling coin, and then trade back when the ratio is reversed.\n\n## How?\n\nThe trading is done in the Binance market platform, which of course, does not have markets for every altcoin pair. The workaround for this is to use a bridge currency that will complement missing pairs. The default bridge currency is Tether (USDT), which is stable by design and compatible with nearly every coin on the platform.\n\n\u003Cp align=\"center\">\n  Coin A → USDT → Coin B\n\u003C\u002Fp>\n\nThe way the bot takes advantage of the observed behaviour is to always downgrade from the \"strong\" coin to the \"weak\" coin, under the assumption that at some point the tables will turn. It will then return to the original coin, ultimately holding more of it than it did originally. This is done while taking into consideration the trading fees.\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\u003Cb>Coin A\u003C\u002Fb> → USDT → Coin B\u003C\u002Fp>\n  \u003Cp>Coin B → USDT → Coin C\u003C\u002Fp>\n  \u003Cp>...\u003C\u002Fp>\n  \u003Cp>Coin C → USDT → \u003Cb>Coin A\u003C\u002Fb>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\nThe bot jumps between a configured set of coins on the condition that it does not return to a coin unless it is profitable in respect to the amount held last. This means that we will never end up having less of a certain coin. The risk is that one of the coins may freefall relative to the others all of a sudden, attracting our reverse greedy algorithm.\n\n## Binance Setup\n\n-   Create a [Binance account](https:\u002F\u002Faccounts.binance.com\u002Fregister?ref=PGDFCE46) (Includes my referral link, I'll be super grateful if you use it).\n-   Enable Two-factor Authentication.\n-   Create a new API key.\n-   Get a cryptocurrency. If its symbol is not in the default list, add it.\n\n## Tool Setup\n\n### Install Python dependencies\n\nRun the following line in the terminal: `pip install -r requirements.txt`.\n\n### Create user configuration\n\nCreate a .cfg file named `user.cfg` based off `.user.cfg.example`, then add your API keys and current coin.\n\n**The configuration file consists of the following fields:**\n\n-   **api_key** - Binance API key generated in the Binance account setup stage.\n-   **api_secret_key** - Binance secret key generated in the Binance account setup stage.\n-   **testnet** - Default is false, whether to use the testnet or not\n-   **current_coin** - This is your starting coin of choice. This should be one of the coins from your supported coin list. If you want to start from your bridge currency, leave this field empty - the bot will select a random coin from your supported coin list and buy it.\n-   **bridge** - Your bridge currency of choice. Notice that different bridges will allow different sets of supported coins. For example, there may be a Binance particular-coin\u002FUSDT pair but no particular-coin\u002FBUSD pair.\n-   **tld** - 'com' or 'us', depending on your region. Default is 'com'.\n-   **hourToKeepScoutHistory** - Controls how many hours of scouting values are kept in the database. After the amount of time specified has passed, the information will be deleted.\n-   **scout_sleep_time** - Controls how many seconds are waited between each scout.\n-   **use_margin** - 'yes' to use scout_margin. 'no' to use scout_multiplier.\n-   **scout_multiplier** - Controls the value by which the difference between the current state of coin ratios and previous state of ratios is multiplied. For bigger values, the bot will wait for bigger margins to arrive before making a trade.\n-   **scout_margin** - Minimum percentage coin gain per trade. 0.8 translates to a scout multiplier of 5 at 0.1% fee.\n-   **strategy** - The trading strategy to use. See [`binance_trade_bot\u002Fstrategies`](binance_trade_bot\u002Fstrategies\u002FREADME.md) for more information\n-   **buy_timeout\u002Fsell_timeout** - Controls how many minutes to wait before cancelling a limit order (buy\u002Fsell) and returning to \"scout\" mode. 0 means that the order will never be cancelled prematurely.\n-   **scout_sleep_time** - Controls how many seconds bot should wait between analysis of current prices. Since the bot now operates on websockets this value should be set to something low (like 1), the reasons to set it above 1 are when you observe high CPU usage by bot or you got api errors about requests weight limit.\n\n#### Environment Variables\n\nAll of the options provided in `user.cfg` can also be configured using environment variables.\n\n```\nCURRENT_COIN_SYMBOL:\nSUPPORTED_COIN_LIST: \"XLM TRX ICX EOS IOTA ONT QTUM ETC ADA XMR DASH NEO ATOM DOGE VET BAT OMG BTT\"\nBRIDGE_SYMBOL: USDT\nAPI_KEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A\nAPI_SECRET_KEY: NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j\nSCOUT_MULTIPLIER: 5\nSCOUT_SLEEP_TIME: 1\nTLD: com\nSTRATEGY: default\nBUY_TIMEOUT: 0\nSELL_TIMEOUT: 0\n```\n\n### Paying Fees with BNB\nYou can [use BNB to pay for any fees on the Binance platform](https:\u002F\u002Fwww.binance.com\u002Fen\u002Fsupport\u002Ffaq\u002F115000583311-Using-BNB-to-Pay-for-Fees), which will reduce all fees by 25%. In order to support this benefit, the bot will always perform the following operations:\n-   Automatically detect that you have BNB fee payment enabled.\n-   Make sure that you have enough BNB in your account to pay the fee of the inspected trade.\n-   Take into consideration the discount when calculating the trade threshold.\n\n### Notifications with Apprise\n\nApprise allows the bot to send notifications to all of the most popular notification services available such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.\n\nTo set this up you need to create a apprise.yml file in the config directory.\n\nThere is an example version of this file to get you started.\n\nIf you are interested in running a Telegram bot, more information can be found at [Telegram's official documentation](https:\u002F\u002Fcore.telegram.org\u002Fbots).\n\n### Run the bot\n\n```shell\npython -m binance_trade_bot\n```\n\n### Run the server that returns the information\n\n```shell\n python -m binance_trade_bot.api_server\n ```\n\n\n### Docker\n\nThe official image is available [here](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fedeng23\u002Fbinance-trade-bot) and will update on every new change.\n\n```shell\ndocker-compose up\n```\n\nIf you only want to start the SQLite browser\n\n```shell\ndocker-compose up -d sqlitebrowser\n```\n\n## Backtesting\n\nYou can test the bot on historic data to see how it performs.\n\n```shell\npython backtest.py\n```\n\nFeel free to modify that file to test and compare different settings and time periods\n\n## Developing\n\nTo make sure your code is properly formatted before making a pull request,\nremember to install [pre-commit](https:\u002F\u002Fpre-commit.com\u002F):\n\n```shell\npip install pre-commit\npre-commit install\n```\n\nThe scouting algorithm is unlikely to be changed. If you'd like to contribute an alternative\nmethod, [add a new strategy](binance_trade_bot\u002Fstrategies\u002FREADME.md).\n\n## Related Projects\n\nThanks to a group of talented developers, there is now a [Telegram bot for remotely managing this project](https:\u002F\u002Fgithub.com\u002Florcalhost\u002FBTB-manager-telegram).\n\n## Support the Project\n\n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fedeng\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fdefault-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\">\u003C\u002Fa>\n\n## Join the Chat\n\n-   **Discord**: [Invite Link](https:\u002F\u002Fdiscord.gg\u002Fm4TNaxreCN)\n\n## FAQ\n\nA list of answers to what seem to be the most frequently asked questions can be found in our discord server, in the corresponding channel.\n\n\u003Cp align=\"center\">\n  \u003Cimg src = \"https:\u002F\u002Fusercontent2.hubstatic.com\u002F6061829.jpg\">\n\u003C\u002Fp>\n\n## Want to build a bot from scratch?\n\n- Check out [CCXT](https:\u002F\u002Fgithub.com\u002Fccxt\u002Fccxt)  for more than 100 crypto exchanges with a unified trading API.\n- Check out [Python-Binance](https:\u002F\u002Fgithub.com\u002Fsammchardy\u002Fpython-binance) for a complete Python Wrapper.\n\n\n## Disclaimer\n\nThis project is for informational purposes only. You should not construe any\nsuch information or other material as legal, tax, investment, financial, or\nother advice. Nothing contained here constitutes a solicitation, recommendation,\nendorsement, or offer by me or any third party service provider to buy or sell\nany securities or other financial instruments in this or in any other\njurisdiction in which such solicitation or offer would be unlawful under the\nsecurities laws of such jurisdiction.\n\nIf you plan to use real money, USE AT YOUR OWN RISK.\n\nUnder no circumstances will I be held responsible or liable in any way for any\nclaims, damages, losses, expenses, costs, or liabilities whatsoever, including,\nwithout limitation, any direct or indirect damages for loss of profits.\n","# 币安交易机器人\n> 一款用于币安的自动化加密货币交易机器人\n\n## 作者\n由 **Eden Gaon** 创建\n\n[![Twitter 关注](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl\u002Fhttps\u002Ftwitter.com\u002Fcloudposse.svg?style=social&label=Follow%20%400xedeng)](https:\u002F\u002Ftwitter.com\u002Fshapeden)\n[![LinkedIn](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLinkedIn-Connect-blue?style=flat&logo=linkedin)](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Feden-gaon-6956a219\u002F)\n\n## 项目状态\n[![GitHub 状态](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fworkflow\u002Fstatus\u002Fedeng23\u002Fbinance-trade-bot\u002Fbinance-trade-bot?label=build)](https:\u002F\u002Fgithub.com\u002Fedeng23\u002Fbinance-trade-bot\u002Factions)\n[![Docker 拉取次数](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fedeng23\u002Fbinance-trade-bot)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fedeng23\u002Fbinance-trade-bot)\n\n## 快速部署\n[![部署到 Heroku](https:\u002F\u002Fwww.herokucdn.com\u002Fdeploy\u002Fbutton.svg)](https:\u002F\u002Fheroku.com\u002Fdeploy?template=https:\u002F\u002Fgithub.com\u002Fedeng23\u002Fbinance-trade-bot)\n[![部署到 DigitalOcean](https:\u002F\u002Fmp-assets1.sfo2.digitaloceanspaces.com\u002Fdeploy-to-do\u002Fdo-btn-blue.svg)](https:\u002F\u002Fcloud.digitalocean.com\u002Fapps\u002Fnew?repo=https:\u002F\u002Fgithub.com\u002Fcoinbookbrasil\u002Fbinance-trade-bot\u002Ftree\u002Fmaster&refcode=a076ff7a9a6a)\n\n## 社区\n加入我们的 Telegram 社区，一起讨论策略、获取帮助或随意聊天吧！\n\n[![Telegram 聊天](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fccxt_binance-trade-bot_readme_e2bcc2f56867.png)](https:\u002F\u002Ft.me\u002Fbinancetradebotchat)\n\n#### 社区 Telegram 聊天\nhttps:\u002F\u002Ft.me\u002Fbinancetradebotchat\n\n## 为什么？\n\n该项目的灵感来源于这样一个观察：几乎所有加密货币的表现都大同小异。当一种币暴涨时，其他币也会跟着涨；而当一种币暴跌时，其他币同样会下跌——“几乎”如此。此外，所有币种都会跟随比特币的走势，只是在时间上存在一定的相位差。\n\n因此，既然这些币种之间本质上是相互振荡的，那么在上涨的币种中卖出并买入下跌的币种，待两者比例反转后再换回来，似乎是一个明智的策略。\n\n## 怎么做？\n\n交易是在币安平台上进行的，但币安并不支持所有山寨币对的交易。为了解决这个问题，我们可以使用一种桥接币来补充缺失的交易对。默认的桥接币是 Tether (USDT)，它设计上非常稳定，并且几乎可以与平台上的任何币种进行交易。\n\n\u003Cp align=\"center\">\n  币 A → USDT → 币 B\n\u003C\u002Fp>\n\n机器人利用这一现象的方式是：始终从“强势”币种兑换成“弱势”币种，假设在某个时刻市场情况会发生逆转。随后再将资金换回最初的币种，最终持有的该币数量会比最初更多。整个过程还会考虑到交易手续费的影响。\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\u003Cb>币 A\u003C\u002Fb> → USDT → 币 B\u003C\u002Fp>\n  \u003Cp>币 B → USDT → 币 C\u003C\u002Fp>\n  \u003Cp>...\u003C\u002Fp>\n  \u003Cp>币 C → USDT → \u003Cb>币 A\u003C\u002Fb>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n机器人会在一组预设的币种之间不断切换，但只有在当前持有的币种数量相比上次持有时有所增加的情况下，才会回到该币种。这意味着我们永远不会减少某种币的数量。不过，风险在于其中某一种币可能会突然相对于其他币大幅下跌，从而触发我们的反向贪婪算法。\n\n## 币安设置\n\n-   创建一个 [币安账户](https:\u002F\u002Faccounts.binance.com\u002Fregister?ref=PGDFCE46)（包含我的推荐链接，如果您使用它，我将不胜感激）。\n-   启用双重身份验证。\n-   创建一个新的 API 密钥。\n-   获取一种加密货币。如果其符号不在默认列表中，请将其添加进去。\n\n## 工具设置\n\n### 安装 Python 依赖\n在终端运行以下命令：`pip install -r requirements.txt`。\n\n### 创建用户配置文件\n根据 `.user.cfg.example` 文件创建一个名为 `user.cfg` 的配置文件，然后填入您的 API 密钥和当前持有的币种。\n\n**配置文件包含以下字段：**\n\n-   **api_key** - 在币安账户设置阶段生成的币安 API 密钥。\n-   **api_secret_key** - 在币安账户设置阶段生成的币安密钥。\n-   **testnet** - 默认为 false，表示是否使用测试网络。\n-   **current_coin** - 这是您选择的起始币种。它应该是您支持的币种列表中的一个。如果您想从桥接币开始，可以将此字段留空——机器人会随机选择您支持的币种列表中的一个并买入。\n-   **bridge** - 您选择的桥接币。请注意，不同的桥接币会支持不同的币种组合。例如，可能存在特定币种\u002FUSDT 的交易对，但没有特定币种\u002FBUSD 的交易对。\n-   **tld** - 根据您的地区选择 ‘com’ 或 ‘us’。默认为 ‘com’。\n-   **hourToKeepScoutHistory** - 控制数据库中保留多少小时的扫描数据。超过指定时间后，这些信息将会被删除。\n-   **scout_sleep_time** - 控制每次扫描之间等待的秒数。\n-   **use_margin** - 设置为 ‘yes’ 使用 scout_margin，设置为 ‘no’ 使用 scout_multiplier。\n-   **scout_multiplier** - 控制当前币种比例与之前比例之差的倍数。数值越大，机器人就会等待更大的价差出现后再进行交易。\n-   **scout_margin** - 每笔交易中币种价值的最小涨幅百分比。例如，0.8 对应于 0.1% 手续费下的 scout_multiplier 为 5。\n-   **strategy** - 使用的交易策略。更多信息请参阅 [`binance_trade_bot\u002Fstrategies`](binance_trade_bot\u002Fstrategies\u002FREADME.md)。\n-   **buy_timeout\u002Fsell_timeout** - 控制在取消限价单（买入\u002F卖出）并返回“扫描”模式之前等待的分钟数。0 表示订单永远不会被提前取消。\n-   **scout_sleep_time** - 控制机器人在分析当前价格之间等待的秒数。由于机器人现在通过 WebSocket 运行，这个值应该设置得较低（比如 1）。只有在您发现机器人的 CPU 使用率过高，或者遇到关于请求权重限制的 API 错误时，才需要将此值调高。\n\n#### 环境变量\n`user.cfg` 中提供的所有选项也可以通过环境变量进行配置。\n\n```\nCURRENT_COIN_SYMBOL:\nSUPPORTED_COIN_LIST: \"XLM TRX ICX EOS IOTA ONT QTUM ETC ADA XMR DASH NEO ATOM DOGE VET BAT OMG BTT\"\nBRIDGE_SYMBOL: USDT\nAPI_KEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A\nAPI_SECRET_KEY: NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j\nSCOUT_MULTIPLIER: 5\nSCOUT_SLEEP_TIME: 1\nTLD: com\nSTRATEGY: default\nBUY_TIMEOUT: 0\nSELL_TIMEOUT: 0\n```\n\n### 使用 BNB 支付手续费\n您可以 [使用 BNB 支付币安平台上的任何手续费](https:\u002F\u002Fwww.binance.com\u002Fen\u002Fsupport\u002Ffaq\u002F115000583311-Using-BNB-to-Pay-for-Fees)，这将使所有费用降低 25%。为了支持这一优惠，机器人将始终执行以下操作：\n-   自动检测您是否启用了 BNB 支付手续费功能。\n-   确保您的账户中有足够的 BNB 来支付当前交易的手续费。\n-   在计算交易阈值时考虑折扣因素。\n\n### 使用 Apprise 发送通知\n\nApprise 使机器人能够向所有流行的通知服务发送通知，例如：Telegram、Discord、Slack、Amazon SNS、Gotify 等。\n\n要进行设置，您需要在配置目录中创建一个 `apprise.yml` 文件。\n\n我们提供了一个示例文件，供您快速上手。\n\n如果您有兴趣运行 Telegram 机器人，更多信息请参阅 [Telegram 官方文档](https:\u002F\u002Fcore.telegram.org\u002Fbots)。\n\n### 运行机器人\n\n```shell\npython -m binance_trade_bot\n```\n\n### 运行返回信息的服务器\n\n```shell\npython -m binance_trade_bot.api_server\n```\n\n### Docker\n\n官方镜像可在 [这里](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fedeng23\u002Fbinance-trade-bot) 获取，并会在每次更新时自动同步。\n\n```shell\ndocker-compose up\n```\n\n如果您只想启动 SQLite 浏览器：\n\n```shell\ndocker-compose up -d sqlitebrowser\n```\n\n## 回测\n\n您可以使用历史数据测试机器人，以了解其表现。\n\n```shell\npython backtest.py\n```\n\n请随意修改该文件，以测试和比较不同的设置及时间段。\n\n## 开发\n\n为确保在提交拉取请求之前代码格式正确，请务必安装 [pre-commit](https:\u002F\u002Fpre-commit.com\u002F)：\n\n```shell\npip install pre-commit\npre-commit install\n```\n\n侦察算法预计不会被更改。如果您希望贡献替代方法，请参阅 [添加新策略](binance_trade_bot\u002Fstrategies\u002FREADME.md)。\n\n## 相关项目\n\n得益于一群才华横溢的开发者，现在有一个用于远程管理该项目的 [Telegram 机器人](https:\u002F\u002Fgithub.com\u002Florcalhost\u002FBTB-manager-telegram)。\n\n## 支持本项目\n\n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fedeng\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fdefault-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\">\u003C\u002Fa>\n\n## 加入聊天\n\n- **Discord**：[邀请链接](https:\u002F\u002Fdiscord.gg\u002Fm4TNaxreCN)\n\n## 常见问题解答\n\n常见问题的答案列表可在我们的 Discord 服务器的相关频道中找到。\n\n\u003Cp align=\"center\">\n  \u003Cimg src = \"https:\u002F\u002Fusercontent2.hubstatic.com\u002F6061829.jpg\">\n\u003C\u002Fp>\n\n## 想从头开始构建机器人吗？\n\n- 请查看 [CCXT](https:\u002F\u002Fgithub.com\u002Fccxt\u002Fccxt)，它支持超过 100 家加密货币交易所，并提供统一的交易 API。\n- 也可以参考 [Python-Binance](https:\u002F\u002Fgithub.com\u002Fsammchardy\u002Fpython-binance)，这是一个完整的 Python 封装库。\n\n## 免责声明\n\n本项目仅用于信息参考之目的。您不应将任何此类信息或其他材料视为法律、税务、投资、金融或其他方面的建议。此处所包含的内容不构成我或任何第三方服务提供商在任何司法管辖区内的证券法规定下非法的买卖任何证券或其他金融工具的招揽、推荐、背书或要约。\n\n如果您计划使用真实资金，请务必自行承担风险。\n\n在任何情况下，我都不会以任何形式对任何索赔、损害赔偿、损失、费用、成本或责任承担责任，包括但不限于因利润损失而产生的直接或间接损害。","# Binance Trade Bot 快速上手指南\n\nBinance Trade Bot 是一个自动化的加密货币交易机器人，旨在通过监测不同币种间的相对强弱变化，在币安（Binance）平台上自动执行“高卖低买”策略，从而增加持有币种的数量。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows (推荐 Linux 环境部署)\n*   **Python 版本**：Python 3.8 或更高版本\n*   **币安账户**：\n    *   已注册币安账号并启用双重验证 (2FA)。\n    *   已创建 API Key，并勾选 **Spot & Margin Trading** (现货与杠杆交易) 权限。**切勿勾选提现权限**。\n    *   (可选但推荐) 开启使用 BNB 支付手续费功能，可享受 25% 费率折扣，机器人会自动识别此优惠。\n*   **资金准备**：账户中需持有一定的起始加密货币（如 USDT 或其他主流币）。\n\n## 安装步骤\n\n### 1. 克隆项目代码\n\n首先从 GitHub 获取源代码：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fedeng23\u002Fbinance-trade-bot.git\ncd binance-trade-bot\n```\n\n### 2. 安装依赖\n\n建议使用虚拟环境，然后安装所需的 Python 库。国内用户若遇到下载缓慢，可指定清华源加速：\n\n```bash\n# 创建虚拟环境 (可选)\npython3 -m venv venv\nsource venv\u002Fbin\u002Factivate  # Windows 用户使用: venv\\Scripts\\activate\n\n# 安装依赖 (使用国内镜像加速)\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. 配置用户参数\n\n在项目根目录下，复制示例配置文件并重命名：\n\n```bash\ncp .user.cfg.example user.cfg\n```\n\n编辑 `user.cfg` 文件，填入您的币安 API 信息和交易策略参数：\n\n```ini\napi_key = 您的_API_KEY\napi_secret_key = 您的_API_SECRET_KEY\ntestnet = false\ncurrent_coin = BTC\nbridge = USDT\ntld = com\nhourToKeepScoutHistory = 1\nscout_sleep_time = 1\nuse_margin = no\nscout_multiplier = 5\nstrategy = default\nbuy_timeout = 0\nsell_timeout = 0\n```\n\n**关键参数说明：**\n*   `current_coin`: 您希望开始交易的起始币种（必须在支持列表中）。若留空，机器人将随机选择一个币种买入。\n*   `bridge`: 桥接币种，默认为 `USDT`。机器人将通过 `币种 A -> USDT -> 币种 B` 的方式进行转换。\n*   `scout_multiplier`: 决定交易触发的敏感度。数值越大，机器人等待的利润空间越大才进行交易。\n\n> **提示**：您也可以完全通过**环境变量**来配置，无需修改 `.cfg` 文件。例如：\n> `export API_KEY=您的_KEY`\n\n## 基本使用\n\n### 方式一：直接运行机器人\n\n配置完成后，直接在终端启动机器人：\n\n```bash\npython -m binance_trade_bot\n```\n\n启动后，机器人将开始扫描市场，根据设定的策略在不同币种间自动切换交易。\n\n### 方式二：使用 Docker 部署（推荐）\n\n如果您已安装 Docker 和 Docker Compose，这是最简便的部署方式：\n\n```bash\ndocker-compose up\n```\n\n若只需查看数据库状态，可单独启动 SQLite 浏览器服务：\n\n```bash\ndocker-compose up -d sqlitebrowser\n```\n\n### 方式三：启动 API 服务器（可选）\n\n如果需要外部程序获取机器人状态数据，可启动内置 API 服务：\n\n```bash\npython -m binance_trade_bot.api_server\n```\n\n### 回测功能\n\n在投入真实资金前，您可以使用历史数据测试策略表现：\n\n```bash\npython backtest.py\n```\n\n您可以修改 `backtest.py` 文件以测试不同的时间段和参数设置。\n\n---\n**风险提示**：本项目仅供学习和参考。加密货币交易存在高风险，使用真实资金时请务必谨慎，盈亏自负。","一位拥有少量比特币和以太坊资产的散户投资者，希望在不增加本金投入的情况下，通过捕捉市场波动来自动增加持有的币种数量。\n\n### 没有 binance-trade-bot 时\n- **错失联动机会**：难以实时盯盘捕捉“比特币涨、山寨币滞后”或板块轮动时的短暂价差，常因反应慢而踏空。\n- **情绪化交易干扰**：在市场剧烈震荡时，容易因恐惧或贪婪做出非理性决策，导致在低位卖出或在高位追涨。\n- **人工计算繁琐**：每次切换币种需手动计算 USDT 桥接成本及交易手续费，难以确保每次循环都能实现“币本位”盈利。\n- **无法全天候运行**：受限于精力，无法在深夜或工作期间执行高频的“强币换弱币、弱币换回强币”策略。\n\n### 使用 binance-trade-bot 后\n- **自动捕捉相位差**：binance-trade-bot 基于“所有加密货币走势趋同但存在时间偏移”的逻辑，自动监测并执行从强势币到弱势币的切换。\n- **严格执行纪律**：程序完全摒弃情绪干扰，仅在数学计算确认扣除手续费后仍能获得更多目标币种时才触发交易。\n- **智能桥接路径**：自动利用 USDT 作为中间桥梁处理非直接交易对，无缝完成\"Coin A → USDT → Coin B\"的套利闭环。\n- **7x24 小时复利**：无需人工值守，机器人日夜不停地在一组配置好的币种间循环跳跃，确保持有的币种数量只增不减。\n\nbinance-trade-bot 的核心价值在于将复杂的相对强弱判断转化为自动化执行，帮助投资者在震荡市中通过“币本位”策略稳步积累更多筹码。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fccxt_binance-trade-bot_2dc78092.png","ccxt","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fccxt_82d4867a.png","CryptoCurrency eXchange Trading",null,"info@ccxt.trade","https:\u002F\u002Fccxt.com","https:\u002F\u002Fgithub.com\u002Fccxt",[81,85,89],{"name":82,"color":83,"percentage":84},"Python","#3572A5",99.5,{"name":86,"color":87,"percentage":88},"Dockerfile","#384d54",0.4,{"name":90,"color":91,"percentage":92},"Procfile","#3B2F63",0,8653,2314,"2026-04-18T14:40:41","GPL-3.0","Linux, macOS, Windows","未说明",{"notes":100,"python":98,"dependencies":101},"该工具为加密货币交易机器人，主要依赖网络请求而非本地计算，因此无特殊 GPU 或大内存需求。需配置 Binance API 密钥，支持通过 Docker 部署或源码运行（pip install -r requirements.txt）。可选配置 Apprise 实现多平台通知，支持回测功能。",[102,103,104],"python-binance","apprise","sqlite3",[13],"2026-03-27T02:49:30.150509","2026-04-19T06:03:19.237938",[109,114,119,124,129,134],{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},41840,"机器人报错'Failed to Buy\u002FSell'或尝试交易 0.0 数量的代币怎么办？","这通常是因为数据库或配置文件中的当前持有代币与实际账户不符。解决方法：\n1. 旧版本：手动创建 `.current_coin` 文件，写入你实际持有的代币符号（例如：`echo DASH > .current_coin`），然后重启机器人。\n2. 新版本（数据存入数据库）：需要手动修改数据库表 `current_coin_history`，添加一行记录以更新为正确的代币。\n重启后，机器人会检测到文件并自动重命名为 `.current_coin.old`，之后可删除该文件。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F75",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},41841,"遇到'APIError(code=-1013): Invalid quantity'错误如何解决？","此错误通常发生在机器人试图购买或出售数量为 0 或不符合交易所最小交易单位限制的代币时。常见原因包括账户余额不足、精度设置错误或代币同步问题。建议检查账户可用余额，并确保配置的起始代币正确。如果是由于更新导致的状态不同步，请参考相关 Issue 手动重置当前持有代币记录。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F35",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},41842,"使用 Binance.US 密钥时报错'Invalid API-key, IP, or permissions (code=-2015)'怎么办？","首先确保已安装最新的 Python 依赖包，旧版本可能不支持 Binance.US 的配置。在 `user.cfg` 配置文件中，确认 `tld` 参数设置为 `us`（即 `tld=us`）。此外，请检查 Binance API 密钥的权限设置，确保已启用现货交易（Spot Trading）权限。如果问题依旧，尝试重新生成 API 密钥。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F50",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},41843,"频繁遇到'Too much request weight used (code=-1003)'导致 IP 被禁怎么办？","这是因为机器人调用 API 的频率超过了币安的限制（每分钟 1200 权重）。临时解决方案是增加配置文件 `user.cfg` 中的 `scout_sleep_time` 值（例如设置为 300 秒或更高），以减少查询频率。长期解决方案是等待或实施基于 WebSocket 的更新功能，以避免轮询带来的高权重消耗。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F231",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},41844,"为什么增加了休眠时间仍然触发 API 请求权重限制？","币安近期调整了 API 端点的权重计算方式（例如 `\u002Fapi\u002Fv3\u002Faccount` 和 `\u002Fapi\u002Fv3\u002FopenOrders` 的权重增加）。即使增加了 `scout_sleep_time`，如果机器人内部频繁调用这些高权重接口（如获取余额或订单状态），仍会超限。建议在开发中引入配额计算器，或参考社区提供的优化代码（如减少 `get_currency_balance` 的调用次数）来缓解此问题。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F307",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},41845,"机器人日志显示试图买入'QTY 0.0'并报错，这是什么原因？","这表示机器人计算出的可交易数量为 0，通常是因为卖出操作完成后，剩余的稳定币（如 USDT）余额低于最小交易门槛，或者在计算买入数量时发生了精度丢失。请检查你的最小交易量配置，并确保账户中有足够的资金覆盖交易及手续费。如果是在连续交易后出现，可能需要重启机器人以重新同步账户余额状态。","https:\u002F\u002Fgithub.com\u002Fccxt\u002Fbinance-trade-bot\u002Fissues\u002F124",[140],{"id":141,"version":142,"summary_zh":76,"released_at":143},333883,"v1.0.1","2025-02-28T18:47:09"]