[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-c9s--bbgo":3,"tool-c9s--bbgo":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":76,"owner_location":79,"owner_email":80,"owner_twitter":75,"owner_website":76,"owner_url":81,"languages":82,"stars":120,"forks":121,"last_commit_at":122,"license":123,"difficulty_score":10,"env_os":124,"env_gpu":125,"env_ram":125,"env_deps":126,"category_tags":134,"github_topics":135,"view_count":23,"oss_zip_url":76,"oss_zip_packed_at":76,"status":16,"created_at":142,"updated_at":143,"faqs":144,"releases":174},2870,"c9s\u002Fbbgo","bbgo","The modern cryptocurrency trading bot framework written in Go.","bbgo 是一个基于 Go 语言开发的现代化加密货币量化交易框架，旨在帮助用户高效构建、回测并部署自动交易策略。它主要解决了加密货币交易中多交易所接口不统一、实时数据处理复杂以及策略开发重复造轮子等痛点，让使用者能专注于核心逻辑而非底层连接。\n\nbbgo 非常适合两类人群：一是希望直接运行内置策略（如网格交易）进行自动化投资的普通交易者；二是需要灵活开发自定义策略、进行历史数据回测或研究技术指标的开发者与研究人员。\n\n在技术亮点方面，bbgo 提供了强大的交易所抽象层，目前已支持包括币安、OKX 在内的八大主流交易所，用户只需一套代码即可实现多账户、多交易所的同时管理。框架内置了丰富的技术分析指标库（如 MACD、布林带、RSI 等），其使用体验类似 Python 的 pandas Series，极大降低了量化门槛。此外，它还具备基于 K 线的回测引擎、参数优化工具、TWAP 订单执行算法以及 Slack\u002FTelegram 实时通知功能，为从策略验证到实盘监控的全流程提供了坚实支撑。无论是想尝试量化新手，还是追求高性能的专业团队，bbgo 都是一个值得考虑的开源选择。","* [English👈](.\u002FREADME.md)\n* [中文](.\u002FREADME.zh_TW.md)\n\n# BBGO\n\nA modern crypto trading bot framework written in Go.\n\n## Current Status\n\n[![Go](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Factions\u002Fworkflows\u002Fgo.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Factions\u002Fworkflows\u002Fgo.yml)\n[![GoDoc](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_ff803135673c.png)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fc9s\u002Fbbgo)\n[![Go Report Card](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_2b4a70945b89.png)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fc9s\u002Fbbgo)\n[![DockerHub](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fyoanlin\u002Fbbgo.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fyoanlin\u002Fbbgo)\n[![Coverage Status](http:\u002F\u002Fcodecov.io\u002Fgithub\u002Fc9s\u002Fbbgo\u002Fcoverage.svg?branch=main)](http:\u002F\u002Fcodecov.io\u002Fgithub\u002Fc9s\u002Fbbgo?branch=main)\n\u003Cimg alt=\"open collective badge\" src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbadge.svg\">\n\u003Cimg alt=\"open collective badge\" src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbacker\u002Fbadge.svg?label=backer&color=brightgreen\" \u002F>\n\n## Community\n\n[![Telegram Global](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftelegram-global-blue.svg)](https:\u002F\u002Ft.me\u002Fbbgo_intl)\n[![Telegram Taiwan](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftelegram-tw-blue.svg)](https:\u002F\u002Ft.me\u002Fbbgocrypto)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fbbgotrading?label=Follow&style=social)](https:\u002F\u002Ftwitter.com\u002Fbbgotrading)\n\n## What You Can Do With BBGO\n\n### Trading Bot Users 💁‍♀️ 💁‍♂️\n\nYou can use BBGO to run the built-in strategies.\n\n### Strategy Developers 🥷\n\nYou can use BBGO's trading unit and back-test unit to implement your own strategies.\n\n### Trading Unit Developers 🧑‍💻\n\nYou can use BBGO's underlying common exchange API; currently, it supports 8 major exchanges, so you don't have to repeat\nthe implementation.\n\n## Features\n\n- Exchange abstraction interface.\n- Stream integration (user data web socket, market data web socket).\n- Real-time orderBook integration through a web socket.\n- TWAP order execution support. See [TWAP Order Execution](.\u002Fdoc\u002Ftopics\u002Ftwap.md)\n- PnL calculation.\n- Slack\u002FTelegram notification.\n- Back-testing: KLine-based back-testing engine. See [Back-testing](.\u002Fdoc\u002Ftopics\u002Fback-testing.md)\n- Built-in parameter optimization tool.\n- Built-in Grid strategy and many other built-in strategies.\n- Multi-exchange session support: you can connect to more than 2 exchanges with different accounts or subaccounts.\n- Indicators with interface similar\n  to `pandas.Series`([series](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fdoc\u002Fdevelopment\u002Fseries.md))([usage](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fdoc\u002Fdevelopment\u002Findicator.md)):\n    - [Accumulation\u002FDistribution Indicator](.\u002Fpkg\u002Findicator\u002Fad.go)\n    - [Arnaud Legoux Moving Average](.\u002Fpkg\u002Findicator\u002Falma.go)\n    - [Average True Range](.\u002Fpkg\u002Findicator\u002Fatr.go)\n    - [Bollinger Bands](.\u002Fpkg\u002Findicator\u002Fboll.go)\n    - [Commodity Channel Index](.\u002Fpkg\u002Findicator\u002Fcci.go)\n    - [Cumulative Moving Average](.\u002Fpkg\u002Findicator\u002Fcma.go)\n    - [Double Exponential Moving Average](.\u002Fpkg\u002Findicator\u002Fdema.go)\n    - [Directional Movement Index](.\u002Fpkg\u002Findicator\u002Fdmi.go)\n    - [Brownian Motion's Drift Factor](.\u002Fpkg\u002Findicator\u002Fdrift.go)\n    - [Ease of Movement](.\u002Fpkg\u002Findicator\u002Femv.go)\n    - [Exponentially Weighted Moving Average](.\u002Fpkg\u002Findicator\u002Fewma.go)\n    - [Hull Moving Average](.\u002Fpkg\u002Findicator\u002Fhull.go)\n    - [Trend Line (Tool)](.\u002Fpkg\u002Findicator\u002Fline.go)\n    - [Moving Average Convergence Divergence Indicator](.\u002Fpkg\u002Findicator\u002Fmacd.go)\n    - [On-Balance Volume](.\u002Fpkg\u002Findicator\u002Fobv.go)\n    - [Pivot](.\u002Fpkg\u002Findicator\u002Fpivot.go)\n    - [Running Moving Average](.\u002Fpkg\u002Findicator\u002Frma.go)\n    - [Relative Strength Index](.\u002Fpkg\u002Findicator\u002Frsi.go)\n    - [Simple Moving Average](.\u002Fpkg\u002Findicator\u002Fsma.go)\n    - [Ehler's Super Smoother Filter](.\u002Fpkg\u002Findicator\u002Fssf.go)\n    - [Stochastic Oscillator](.\u002Fpkg\u002Findicator\u002Fstoch.go)\n    - [SuperTrend](.\u002Fpkg\u002Findicator\u002Fsupertrend.go)\n    - [Triple Exponential Moving Average](.\u002Fpkg\u002Findicator\u002Ftema.go)\n    - [Tillson T3 Moving Average](.\u002Fpkg\u002Findicator\u002Ftill.go)\n    - [Triangular Moving Average](.\u002Fpkg\u002Findicator\u002Ftma.go)\n    - [Variable Index Dynamic Average](.\u002Fpkg\u002Findicator\u002Fvidya.go)\n    - [Volatility Indicator](.\u002Fpkg\u002Findicator\u002Fvolatility.go)\n    - [Volume Weighted Average Price](.\u002Fpkg\u002Findicator\u002Fvwap.go)\n    - [Zero Lag Exponential Moving Average](.\u002Fpkg\u002Findicator\u002Fzlema.go)\n    - [Fisher Transform](.\u002Fpkg\u002Findicator\u002Ffisher.go)\n    - [G-H Filter (Alpha-Beta Filter)](.\u002Fpkg\u002Findicator\u002Fghfilter.go)\n    - [Geometric Moving Average](.\u002Fpkg\u002Findicator\u002Fgma.go)\n    - [Kalman Filter](.\u002Fpkg\u002Findicator\u002Fkalmanfilter.go)\n    - [Klinger Oscillator](.\u002Fpkg\u002Findicator\u002Fklingeroscillator.go)\n    - [Linear Regression](.\u002Fpkg\u002Findicator\u002Flinreg.go)\n    - [Parabolic SAR](.\u002Fpkg\u002Findicator\u002Fpsar.go)\n    - [True Strength Index](.\u002Fpkg\u002Findicator\u002Ftsi.go)\n    - [UT Bot Alert](.\u002Fpkg\u002Findicator\u002FutBotAlert.go)\n    - [Volume Weighted Moving Average](.\u002Fpkg\u002Findicator\u002Fvwma.go)\n    - [Weighted Drift](.\u002Fpkg\u002Findicator\u002Fwdrift.go)\n    - [Welles Wilder's Moving Average](.\u002Fpkg\u002Findicator\u002Fwwma.go)\n    - [Standard Deviation](.\u002Fpkg\u002Findicator\u002Fstddev.go)\n    - [ATR Percentage](.\u002Fpkg\u002Findicator\u002Fatrp.go)\n    - [Volume Profile](.\u002Fpkg\u002Findicator\u002Fvolumeprofile.go)\n    - And more...\n- HeikinAshi OHLC \u002F Normal OHLC (check [this config](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fconfig\u002Fskeleton.yaml#L5))\n- React-powered Web Dashboard.\n- Docker image ready.\n- Kubernetes support.\n- Helm chart ready.\n- High precision float point (up to 16 digits, run with `-tags dnum`).\n\n## Screenshots\n\n![bbgo dashboard](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_a7e118726ec0.jpeg)\n\n![bbgo backtest report](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_e9e318ca569a.jpg)\n\n## Built-in Strategies\n\n| strategy        | description                                                                                                                             | type       | backtest support |\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|------------|------------------|\n| grid            | the first generation grid strategy, it provides more flexibility, but you need to prepare inventories                                   | maker      |                  |\n| grid2           | the second generation grid strategy, it can convert your quote asset into a grid, supports base+quote mode                              | maker      |                  |\n| bollgrid        | strategy implements a basic grid strategy with the built-in bollinger indicator                                                         | maker      |                  |\n| xmaker          | cross exchange market making strategy, it hedges your inventory risk on the other side                                                  | maker      | no               |\n| xdepthmaker     | cross exchange depth-based market making strategy                                                                                       | maker      | no               |\n| xfixedmaker     | cross exchange fixed-spread market making strategy                                                                                      | maker      | no               |\n| xnav            | this strategy helps you record the current net asset value                                                                              | tool       | no               |\n| xalign          | this strategy aligns your balance position automatically                                                                                | tool       | no               |\n| xfunding        | a funding rate fee strategy                                                                                                             | funding    | no               |\n| autoborrow      | this strategy uses margin to borrow assets, to help you keep a minimal balance                                                          | tool       | no               |\n| autobuy         | automatically buys a specific asset periodically                                                                                        | tool       | no               |\n| pivotshort      | this strategy finds the pivot low and enters the trade when the price breaks the previous low                                           | long\u002Fshort |                  |\n| schedule        | this strategy buy\u002Fsell with a fixed quantity periodically, you can use this as a single DCA, or to refill the fee asset like BNB         | tool       |                  |\n| irr             | this strategy opens the position based on the predicated return rate                                                                    | long\u002Fshort |                  |\n| bollmaker       | this strategy holds a long-term long\u002Fshort position, places maker orders on both sides, and uses a bollinger band to control the position size | maker      |                  |\n| wall            | this strategy creates a wall (large amount of order) on the order book                                                                  | maker      | no               |\n| scmaker         | this market making strategy is designed for stable coin markets, like USDC\u002FUSDT                                                         | maker      |                  |\n| drift           |                                                                                                                                         | long\u002Fshort |                  |\n| rsicross        | this strategy opens a long position when the fast rsi crosses over the slow rsi, this is a demo strategy for using the v2 indicator     | long\u002Fshort |                  |\n| emacross        | EMA crossover strategy                                                                                                                  | long\u002Fshort |                  |\n| marketcap       | this strategy implements a strategy that rebalances the portfolio based on the market capitalization                                     | rebalance  | no               |\n| supertrend      | this strategy uses DEMA and Supertrend indicator to open the long\u002Fshort position                                                        | long\u002Fshort |                  |\n| trendtrader     | this strategy opens a long\u002Fshort position based on the trendline breakout                                                               | long\u002Fshort |                  |\n| elliottwave     |                                                                                                                                         | long\u002Fshort |                  |\n| ewoDgtrd        |                                                                                                                                         | long\u002Fshort |                  |\n| fixedmaker      |                                                                                                                                         | maker      |                  |\n| factorzoo       |                                                                                                                                         | long\u002Fshort |                  |\n| fmaker          |                                                                                                                                         | maker      |                  |\n| linregmaker     | a linear regression based market maker                                                                                                  | maker      |                  |\n| liquiditymaker  | provides liquidity on the order book                                                                                                    | maker      |                  |\n| audacitymaker   | an audacious market making strategy                                                                                                     | maker      |                  |\n| convert         | convert strategy is a tool that helps you convert a specific asset to a target asset                                                    | tool       | no               |\n| dca             | dollar-cost averaging strategy                                                                                                          | tool       |                  |\n| dca2            | second generation dollar-cost averaging strategy                                                                                        | tool       |                  |\n| rebalance       | rebalances your portfolio based on target weights                                                                                       | rebalance  | no               |\n| deposit2transfer | automatically transfers deposits to another account                                                                                    | tool       | no               |\n| sentinel        | monitors exchange connectivity and health                                                                                               | tool       | no               |\n| tri             | triangular arbitrage strategy                                                                                                           | arbitrage  | no               |\n| random          | places random orders for testing purposes                                                                                               | tool       | no               |\n\n\n\n\n## Supported Exchanges\n\n- Binance Spot Exchange (and binance.us)\n- OKX Spot Exchange (previous OKEX)\n- Kucoin Spot Exchange\n- MAX Spot Exchange (located in Taiwan)\n- Bitget Exchange\n- Bybit Exchange\n- Coinbase Exchange\n- Bitfinex Exchange\n\n## Documentation and General Topics\n\n- Check the [documentation index](doc\u002FREADME.md)\n\n## Requirements\n\n* Go SDK 1.25\n\n* Linux \u002F MacOS \u002F Windows (WSL)\n\n* Get your exchange API key and secret after you register the accounts (you can choose one or more exchanges):\n\n  - MAX: \u003Chttps:\u002F\u002Fmax.maicoin.com\u002Fsignup?r=c7982718>\n  - Binance: \u003Chttps:\u002F\u002Faccounts.binance.com\u002Fen\u002Fregister?ref=38192708>\n  - OKEx: \u003Chttps:\u002F\u002Fwww.okex.com\u002Fjoin\u002F2412712?src=from:ios-share>\n  - Kucoin: \u003Chttps:\u002F\u002Fwww.kucoin.com\u002Fucenter\u002Fsignup?rcode=r3KX2D4>\n  - Bybit: \u003Chttps:\u002F\u002Fwww.bybit.com\u002F>\n  - Bitget: \u003Chttps:\u002F\u002Fwww.bitget.com\u002F>\n  - Coinbase: \u003Chttps:\u002F\u002Fwww.coinbase.com\u002F>\n  - Bitfinex: \u003Chttps:\u002F\u002Fwww.bitfinex.com\u002F>\n\n  This project is maintained and supported by a small group of people. If you would like to support this project, please\n  Register on the exchanges using the provided links with the referral codes above.\n\n## Installation\n\n### Install from binary\n\nThe following script will help you set up a config file and a dotenv file:\n\n```sh\n# grid trading strategy for binance exchange\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-grid.sh) binance\n\n# grid trading strategy for max exchange\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-grid.sh) max\n\n# bollinger grid trading strategy for binance exchange\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-bollgrid.sh) binance\n\n# bollinger grid trading strategy for max exchange\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-bollgrid.sh) max\n```\n\nIf you already have configuration somewhere, a download-only script might be suitable for you:\n\n```sh\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fdownload.sh)\n```\n\nOr refer to the [Release Page](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Freleases) and download manually.\n\nSince v2, we've added a new float point implementation from dnum to support decimals with higher precision. To download &\nsetup, please refer to [Dnum Installation](doc\u002Ftopics\u002Fdnum-binary.md)\n\n### One-click Linode StackScript\n\nStackScript allows you to one-click deploy a lightweight instance with bbgo.\n\n- BBGO grid on Binance \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F950715>\n- BBGO grid USDT\u002FTWD on MAX \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F793380>\n- BBGO grid USDC\u002FTWD on MAX \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797776>\n- BBGO grid LINK\u002FTWD on MAX \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797774>\n- BBGO grid USDC\u002FUSDT on MAX \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797777>\n- BBGO grid on MAX \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F795788>\n- BBGO bollmaker on Binance \u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F1002384>\n\n### Build from source\n\nSee [Build from source](.\u002Fdoc\u002Fbuild-from-source.md)\n\n## Configuration\n\nAdd your dotenv file:\n\n```sh\n# for Binance Exchange, if you have one\nBINANCE_API_KEY=\nBINANCE_API_SECRET=\n\n# if you want to use binance.us, change this to 1\nBINANCE_US=0\n\n# for MAX exchange, if you have one\nMAX_API_KEY=\nMAX_API_SECRET=\n\n# for OKEx exchange, if you have one\nOKEX_API_KEY=\nOKEX_API_SECRET=\nOKEX_API_PASSPHRASE\n\n# for kucoin exchange, if you have one\nKUCOIN_API_KEY=\nKUCOIN_API_SECRET=\nKUCOIN_API_PASSPHRASE=\nKUCOIN_API_KEY_VERSION=2\n\n# for Bybit exchange, if you have one\nBYBIT_API_KEY=\nBYBIT_API_SECRET=\n\n# for Bitget exchange, if you have one\nBITGET_API_KEY=\nBITGET_API_SECRET=\nBITGET_API_PASSPHRASE=\n\n# for Coinbase exchange, if you have one\nCOINBASE_API_KEY=\nCOINBASE_API_SECRET=\n\n# for Bitfinex exchange, if you have one\nBITFINEX_API_KEY=\nBITFINEX_API_SECRET=\n```\n\nPrepare your dotenv file `.env.local` and BBGO yaml config file `bbgo.yaml`.\n\nTo check the available environment variables, please see [Environment Variables](.\u002Fdoc\u002Fconfiguration\u002Fenvvars.md)\n\nThe minimal bbgo.yaml could be generated by:\n\n```sh\ncurl -o bbgo.yaml https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fconfig\u002Fminimal.yaml\n```\n\nTo run strategy:\n\n```sh\nbbgo run\n```\n\nTo start bbgo with the frontend dashboard:\n\n```sh\nbbgo run --enable-webserver\n```\n\nIf you want to switch to another dotenv file, you can add an `--dotenv` option or `--config`:\n\n```sh\nbbgo sync --dotenv .env.dev --config config\u002Fgrid.yaml --session binance\n```\n\nTo query transfer history:\n\n```sh\nbbgo transfer-history --session max --asset USDT --since \"2019-01-01\"\n```\n\n\u003C!--\nTo calculate pnl:\n\n```sh\nbbgo pnl --exchange binance --asset BTC --since \"2019-01-01\"\n```\n--->\n\n## Advanced Configuration\n\n### Synchronize System Time With Binance\n\nBBGO provides the script for UNIX systems\u002Fsubsystems to synchronize date with Binance. `jq` and `bc` are required to be\ninstalled in previous.\nTo install the dependencies in Ubuntu, try the following commands:\n\n```bash\nsudo apt install -y bc jq\n```\n\nAnd to synchronize the date, try:\n\n```bash\nsudo .\u002Fscripts\u002Fsync_time.sh\n```\n\nYou could also add the script to crontab so that the system time could get synchronized with Binance regularly.\n\n### Testnet (Paper Trading)\n\nCurrently only supports Binance testnet. To run bbgo in testnet, apply new API keys\nfrom [Binance Test Network](https:\u002F\u002Ftestnet.binance.vision), and set the following env before you start bbgo:\n\n```bash\nexport PAPER_TRADE=1\nexport DISABLE_MARKET_CACHE=1 # the symbols supported in testnet is far less than the mainnet\n```\n\n### Notification\n\n- [Setting up Telegram notification](.\u002Fdoc\u002Fconfiguration\u002Ftelegram.md)\n- [Setting up Slack notification](.\u002Fdoc\u002Fconfiguration\u002Fslack.md)\n\n### Synchronizing Trading Data\n\nBy default, BBGO does not sync your trading data from the exchange sessions, so it's hard to calculate your profit and\nloss correctly.\n\nBy synchronizing trades and orders to the local database, you can earn some benefits like PnL calculations, backtesting\nand asset calculation.\n\nYou can only use one database driver MySQL or SQLite to store your trading data.\n\n**Notice**: SQLite is not fully supported, we recommend you use MySQL instead of SQLite.\n\n#### Configure MySQL Database\n\nTo use MySQL database for data syncing, first, you need to install your MySQL server:\n\n```sh\n# For Ubuntu Linux\nsudo apt-get install -y mysql-server\n\n# For newer Ubuntu Linux\nsudo apt install -y mysql-server\n```\n\nOr [run it in docker](https:\u002F\u002Fhub.docker.com\u002F_\u002Fmysql)\n\nCreate your mysql database:\n\n```sh\nmysql -uroot -e \"CREATE DATABASE bbgo CHARSET utf8\"\n```\n\nThen put these environment variables in your `.env.local` file:\n\n```sh\nDB_DRIVER=mysql\nDB_DSN=\"user:password@tcp(127.0.0.1:3306)\u002Fbbgo\"\n```\n\n#### Configure Sqlite3 Database\n\nTo use SQLite3 instead of MySQL, simply put these environment variables in your `.env.local` file:\n\n```sh\nDB_DRIVER=sqlite3\nDB_DSN=bbgo.sqlite3\n```\n\n## Synchronizing your own trading data\n\nOnce you have your database configured, you can sync your own trading data from the exchange.\n\nSee [Configure Sync For Private Trading Data](.\u002Fdoc\u002Fconfiguration\u002Fsync.md)\n\n## Using Redis to keep persistence between BBGO sessions\n\nTo use Redis, first you need to install your Redis server:\n\n```sh\n# For Ubuntu\u002FDebian Linux\nsudo apt-get install -y redis\n\n# For newer Ubuntu\u002FDebian Linux\nsudo apt install -y redis\n```\n\nSet the following environment variables in your `bbgo.yaml`:\n\n```yaml\npersistence:\n  redis:\n    host: 127.0.0.1  # The IP address or the hostname to your Redis server, 127.0.0.1 if same as BBGO  \n    port: 6379  # Port to Redis server, default 6379\n    db: 0  # DB number to use. You can set to another DB to avoid conflict if other applications are using Redis too.\n```\n\n## Built-in Strategies\n\nCheck out the strategy directory [strategy](pkg\u002Fstrategy) for all built-in strategies:\n\n- `pricealert` strategy demonstrates how to use the notification system [pricealert](pkg\u002Fstrategy\u002Fexample\u002Fpricealert). See\n  [document](.\u002Fdoc\u002Fstrategy\u002Fpricealert.md).\n- `buyandhold` strategy demonstrates how to subscribe kline events and submit market\n  order [buyandhold](pkg\u002Fstrategy\u002Fexample\u002Fpricedrop)\n- `bollgrid` strategy implements a basic grid strategy with the built-in bollinger\n  indicator [bollgrid](pkg\u002Fstrategy\u002Fbollgrid)\n- `grid` strategy implements the fixed price band grid strategy [grid](pkg\u002Fstrategy\u002Fgrid). See\n  [document](.\u002Fdoc\u002Fstrategy\u002Fgrid.md).\n- `supertrend` strategy uses Supertrend indicator as trend, and DEMA indicator as noise\n  filter [supertrend](pkg\u002Fstrategy\u002Fsupertrend). See\n  [document](.\u002Fdoc\u002Fstrategy\u002Fsupertrend.md).\n- `support` strategy uses K-lines with high volume as support [support](pkg\u002Fstrategy\u002Fsupport). See\n  [document](.\u002Fdoc\u002Fstrategy\u002Fsupport.md).\n- `flashcrash` strategy implements a strategy that catches the flashcrash [flashcrash](pkg\u002Fstrategy\u002Fflashcrash)\n- `marketcap` strategy implements a strategy that rebalances the portfolio based on the market\n  capitalization [marketcap](pkg\u002Fstrategy\u002Fmarketcap). See [document](.\u002Fdoc\u002Fstrategy\u002Fmarketcap.md).\n- `pivotshort` - shorting focused strategy.\n- `irr` - return rate strategy.\n- `drift` - drift strategy.\n- `grid2` - the second-generation grid strategy.\n- `rebalance` - rebalances your portfolio based on target weights. [rebalance](pkg\u002Fstrategy\u002Frebalance). See [document](.\u002Fdoc\u002Fstrategy\u002Frebalance.md).\n\nTo run these built-in strategies, just modify the config file to make the configuration suitable for you, for example, if\nyou want to run\n`buyandhold` strategy:\n\n```sh\nvim config\u002Fbuyandhold.yaml\n\n# run bbgo with the config\nbbgo run --config config\u002Fbuyandhold.yaml\n```\n\n## Back-testing\n\nSee [Back-testing](.\u002Fdoc\u002Ftopics\u002Fback-testing.md)\n\n## Adding Strategy\n\nSee [Developing Strategy](.\u002Fdoc\u002Ftopics\u002Fdeveloping-strategy.md)\n\n## Write your own private strategy\n\nCreate your go package, initialize the repository with `go mod`, and add bbgo as a dependency:\n\n```sh\ngo mod init\ngo get github.com\u002Fc9s\u002Fbbgo@main\n```\n\nWrite your own strategy in the strategy file:\n\n```sh\nvim strategy.go\n```\n\nYou can grab the skeleton strategy from \u003Chttps:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fpkg\u002Fstrategy\u002Fexample\u002Fskeleton\u002Fstrategy.go>\n\nNow add your config:\n\n```sh\nmkdir config\n(cd config && curl -o bbgo.yaml https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fconfig\u002Fminimal.yaml)\n```\n\nAdd your strategy package path to the config file `config\u002Fbbgo.yaml`\n\n```yaml\n---\nbuild:\n  dir: build\n  imports:\n  - github.com\u002Fyour_id\u002Fyour_swing\n  targets:\n  - name: swing-amd64-linux\n    os: linux\n    arch: amd64\n  - name: swing-amd64-darwin\n    os: darwin\n    arch: amd64\n```\n\nRun `bbgo run` command, bbgo will compile a wrapper binary that imports your strategy:\n\n```sh\ndotenv -f .env.local -- bbgo run --config config\u002Fbbgo.yaml\n```\n\nOr you can build your own wrapper binary via:\n\n```shell\nbbgo build --config config\u002Fbbgo.yaml\n```\n\nSee also:\n\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fnarumiruna\u002Fbbgo-template>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fnarumiruna\u002Fbbgo-marketcap>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Faustin362667\u002Fshadow>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fjnlin\u002Fbbgo-strategy-infinite-grid>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fyubing744\u002Ftrading-gpt>\n\n## Command Usages\n\n### Submitting Orders to a specific exchange session\n\n```shell\nbbgo submit-order --session=okex --symbol=OKBUSDT --side=buy --price=10.0 --quantity=1\n```\n\n### Listing Open Orders of a specific exchange session\n\n```sh\nbbgo list-orders open --session=okex --symbol=OKBUSDT\nbbgo list-orders open --session=max --symbol=MAXUSDT\nbbgo list-orders open --session=binance --symbol=BNBUSDT\n```\n\n### Canceling an open order\n\n```shell\n# both order id and symbol is required for okex\nbbgo cancel-order --session=okex --order-id=318223238325248000 --symbol=OKBUSDT\n\n# for max, you can just give your order id\nbbgo cancel-order --session=max --order-id=1234566\n```\n\n### Debugging user data stream\n\n```shell\nbbgo userdatastream --session okex\nbbgo userdatastream --session max\nbbgo userdatastream --session binance\n```\n\n## Dynamic Injection\n\nIn order to minimize the strategy code, bbgo supports dynamic dependency injection.\n\nBefore executing your strategy, bbgo injects the components into your strategy object if it finds the embedded field\nthat is using bbgo component. for example:\n\n```go\ntype Strategy struct {\n  Symbol string `json:\"symbol\"\n  Market types.Market\n}\n```\n\nSupported components (single exchange strategy only for now):\n\n- `*bbgo.ExchangeSession`\n- `bbgo.OrderExecutor`\n\nIf you have `Symbol string` field in your strategy, your strategy will be detected as a symbol-based strategy, then the\nfollowing types could be injected automatically:\n\n- `types.Market`\n\n## Strategy Execution Phases\n\n1. Load config from the config file.\n2. Allocate and initialize exchange sessions.\n3. Add exchange sessions to the environment (the data layer).\n4. Use the given environment to initialize the trader object (the logic layer).\n5. The trader initializes the environment and starts the exchange connections.\n6. Call strategy.Run() method sequentially.\n\n## Exchange API Examples\n\nPlease check out the example directory: [examples](examples)\n\nInitialize MAX API:\n\n```go\nkey := os.Getenv(\"MAX_API_KEY\")\nsecret := os.Getenv(\"MAX_API_SECRET\")\n\nmaxRest := maxapi.NewRestClient(maxapi.ProductionAPIURL)\nmaxRest.Auth(key, secret)\n```\n\nCreating user data stream to get the order book (depth):\n\n```go\nstream := max.NewStream(key, secret)\nstream.Subscribe(types.BookChannel, symbol, types.SubscribeOptions{})\n\nstreambook := types.NewStreamBook(symbol)\nstreambook.BindStream(stream)\n```\n\n## Deployment\n\n- [Helm Chart](.\u002Fdoc\u002Fdeployment\u002Fhelm-chart.md)\n- Baremetal machine or a VPS\n\n## Development\n\n- [Adding New Exchange](.\u002Fdoc\u002Fdevelopment\u002Fadding-new-exchange.md)\n- [Migration](.\u002Fdoc\u002Fdevelopment\u002Fmigration.md)\n\n### Setting up your local repository\n\n1. Click the \"Fork\" button from the GitHub repository.\n2. Clone your forked repository into `$GOPATH\u002Fgithub.com\u002Fc9s\u002Fbbgo`.\n3. Change the directory to `$GOPATH\u002Fgithub.com\u002Fc9s\u002Fbbgo`.\n4. Create a branch and start your development.\n5. Test your changes.\n6. Push your changes to your fork.\n7. Send a pull request.\n\n### Testing Desktop App\n\nfor webview\n\n```sh\nmake embed && go run -tags web .\u002Fcmd\u002Fbbgo-webview\n```\n\nfor lorca\n\n```sh\nmake embed && go run -tags web .\u002Fcmd\u002Fbbgo-lorca\n```\n\n## FAQ\n\n### What's Position?\n\n- Base Currency & Quote Currency \u003Chttps:\u002F\u002Fwww.ig.com\u002Fau\u002Fglossary-trading-terms\u002Fbase-currency-definition>\n- How to calculate the average cost? \u003Chttps:\u002F\u002Fwww.janushenderson.com\u002Fen-us\u002Finvestor\u002Fplanning\u002Fcalculate-average-cost\u002F>\n\n### Looking For A New Strategy?\n\nYou can write an article about BBGO on any topic, in 750-1500 words for exchange, and I can implement the strategy for\nyou (depending on the complexity and effort). If you're interested in, DM me in telegram \u003Chttps:\u002F\u002Ft.me\u002Fc123456789s> or\nx\u002Ftwitter \u003Chttps:\u002F\u002Fx.com\u002Fc9s>, and we can discuss.\n\n### Adding New Crypto Exchange support?\n\nIf you want BBGO to support a new crypto exchange that is not included in the current BBGO, we can implement it for you.\nThe cost is 10 ETH. If you're interested in it, DM me in telegram \u003Chttps:\u002F\u002Ft.me\u002Fc123456789s>.\n\n## Community\n\n- Telegram Group \u003Chttps:\u002F\u002Ft.me\u002Fbbgo_intl>\n- Telegram Group (Taiwan) \u003Chttps:\u002F\u002Ft.me\u002Fbbgocrypto>\n- X\u002FTwitter \u003Chttps:\u002F\u002Fx.com\u002Fbbgotrading>\n\n## Contributing\n\nSee [Contributing](.\u002FCONTRIBUTING.md)\n\n### Financial Contributors\n\n[[Become a backer](https:\u002F\u002Fopencollective.com\u002Fbbgo#backer)]\n\n\u003Ca href=\"https:\u002F\u002Fopencollective.com\u002Fbbgo#backers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbacker.svg?width=890\">\u003C\u002Fa>\n\n## BBGO Tokenomics\n\nTo support the development of BBGO, we have created a bounty pool to support contributors by giving away $BBG tokens.\nCheck the details in [$BBG Contract Page](contracts\u002FREADME.md) and our [official website](https:\u002F\u002Fbbgo.finance)\n\n## Supporter\n\n- GitBook\n\n## License\n\nAGPL License\n","* [English👈](.\u002FREADME.md)\n* [中文](.\u002FREADME.zh_TW.md)\n\n# BBGO\n\n一个用 Go 语言编写的现代加密货币交易机器人框架。\n\n## 当前状态\n\n[![Go](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Factions\u002Fworkflows\u002Fgo.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Factions\u002Fworkflows\u002Fgo.yml)\n[![GoDoc](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_ff803135673c.png)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fc9s\u002Fbbgo)\n[![Go Report Card](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_2b4a70945b89.png)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fc9s\u002Fbbgo)\n[![DockerHub](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fyoanlin\u002Fbbgo.svg)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fyoanlin\u002Fbbgo)\n[![Coverage Status](http:\u002F\u002Fcodecov.io\u002Fgithub\u002Fc9s\u002Fbbgo\u002Fcoverage.svg?branch=main)](http:\u002F\u002Fcodecov.io\u002Fgithub\u002Fc9s\u002Fbbgo?branch=main)\n\u003Cimg alt=\"open collective badge\" src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbadge.svg\">\n\u003Cimg alt=\"open collective badge\" src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbacker\u002Fbadge.svg?label=backer&color=brightgreen\" \u002F>\n\n## 社区\n\n[![Telegram Global](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftelegram-global-blue.svg)](https:\u002F\u002Ft.me\u002Fbbgo_intl)\n[![Telegram Taiwan](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftelegram-tw-blue.svg)](https:\u002F\u002Ft.me\u002Fbbgocrypto)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fbbgotrading?label=Follow&style=social)](https:\u002F\u002Ftwitter.com\u002Fbbgotrading)\n\n## 使用 BBGO 可以做什么\n\n### 交易机器人用户 💁‍♀️ 💁‍♂️\n\n你可以使用 BBGO 运行内置策略。\n\n### 策略开发者 🥷\n\n你可以利用 BBGO 的交易单元和回测单元来实现自己的策略。\n\n### 交易单元开发者 🧑‍💻\n\n你可以使用 BBGO 底层的通用交易所 API；目前支持 8 家主流交易所，因此无需重复实现。\n\n## 特性\n\n- 交易所抽象接口。\n- 流式集成（用户数据 WebSocket、市场数据 WebSocket）。\n- 通过 WebSocket 实时整合订单簿。\n- 支持 TWAP 订单执行。详见 [TWAP 订单执行](.\u002Fdoc\u002Ftopics\u002Ftwap.md)\n- 盈亏计算。\n- Slack\u002FTelegram 通知。\n- 回测：基于 K 线的回测引擎。详见 [回测](.\u002Fdoc\u002Ftopics\u002Fback-testing.md)\n- 内置参数优化工具。\n- 内置网格策略及其他多种内置策略。\n- 多交易所会话支持：你可以使用不同账户或子账户连接超过 2 家交易所。\n- 指标接口与 `pandas.Series` 类似（[系列](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fdoc\u002Fdevelopment\u002Fseries.md)）（[使用方法](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fdoc\u002Fdevelopment\u002Findicator.md))：\n    - [累积\u002F分配指标](.\u002Fpkg\u002Findicator\u002Fad.go)\n    - [阿诺·勒古移动平均线](.\u002Fpkg\u002Findicator\u002Falma.go)\n    - [平均真实波幅](.\u002Fpkg\u002Findicator\u002Fatr.go)\n    - [布林带](.\u002Fpkg\u002Findicator\u002Fboll.go)\n    - [商品通道指数](.\u002Fpkg\u002Findicator\u002Fcci.go)\n    - [累计移动平均线](.\u002Fpkg\u002Findicator\u002Fcma.go)\n    - [双重指数移动平均线](.\u002Fpkg\u002Findicator\u002Fdema.go)\n    - [方向性运动指数](.\u002Fpkg\u002Findicator\u002Fdmi.go)\n    - [布朗运动漂移因子](.\u002Fpkg\u002Findicator\u002Fdrift.go)\n    - [动量指标](.\u002Fpkg\u002Findicator\u002Femv.go)\n    - [指数加权移动平均线](.\u002Fpkg\u002Findicator\u002Fewma.go)\n    - [赫尔移动平均线](.\u002Fpkg\u002Findicator\u002Fhull.go)\n    - [趋势线（工具）](.\u002Fpkg\u002Findicator\u002Fline.go)\n    - [移动平均收敛发散指标](.\u002Fpkg\u002Findicator\u002Fmacd.go)\n    - [资金流量指数](.\u002Fpkg\u002Findicator\u002Fobv.go)\n    - [枢轴点](.\u002Fpkg\u002Findicator\u002Fpivot.go)\n    - [运行移动平均线](.\u002Fpkg\u002Findicator\u002Frma.go)\n    - [相对强弱指数](.\u002Fpkg\u002Findicator\u002Frsi.go)\n    - [简单移动平均线](.\u002Fpkg\u002Findicator\u002Fsma.go)\n    - [埃勒斯超级平滑滤波器](.\u002Fpkg\u002Findicator\u002Fssf.go)\n    - [随机振荡器](.\u002Fpkg\u002Findicator\u002Fstoch.go)\n    - [超趋势指标](.\u002Fpkg\u002Findicator\u002Fsupertrend.go)\n    - [三重指数移动平均线](.\u002Fpkg\u002Findicator\u002Ftema.go)\n    - [蒂尔森 T3 移动平均线](.\u002Fpkg\u002Findicator\u002Ftill.go)\n    - [三角移动平均线](.\u002Fpkg\u002Findicator\u002Ftma.go)\n    - [可变指数动态平均线](.\u002Fpkg\u002Findicator\u002Fvidya.go)\n    - [波动率指标](.\u002Fpkg\u002Findicator\u002Fvolatility.go)\n    - [成交量加权平均价格](.\u002Fpkg\u002Findicator\u002Fvwap.go)\n    - [零延迟指数移动平均线](.\u002Fpkg\u002Findicator\u002Fzlema.go)\n    - [费雪变换](.\u002Fpkg\u002Findicator\u002Ffisher.go)\n    - [G-H 滤波器（阿尔法-贝塔滤波器）](.\u002Fpkg\u002Findicator\u002Fghfilter.go)\n    - [几何移动平均线](.\u002Fpkg\u002Findicator\u002Fgma.go)\n    - [卡尔曼滤波器](.\u002Fpkg\u002Findicator\u002Fkalmanfilter.go)\n    - [克林格振荡器](.\u002Fpkg\u002Findicator\u002Fklingeroscillator.go)\n    - [线性回归](.\u002Fpkg\u002Findicator\u002Flinreg.go)\n    - [抛物线 SAR](.\u002Fpkg\u002Findicator\u002Fpsar.go)\n    - [真实强度指数](.\u002Fpkg\u002Findicator\u002Ftsi.go)\n    - [UT 机器人警报](.\u002Fpkg\u002Findicator\u002FutBotAlert.go)\n    - [成交量加权移动平均线](.\u002Fpkg\u002Findicator\u002Fvwma.go)\n    - [加权漂移](.\u002Fpkg\u002Findicator\u002Fwdrift.go)\n    - [韦尔斯·怀尔德移动平均线](.\u002Fpkg\u002Findicator\u002Fwwma.go)\n    - [标准差](.\u002Fpkg\u002Findicator\u002Fstddev.go)\n    - [ATR 百分比](.\u002Fpkg\u002Findicator\u002Fatrp.go)\n    - [成交量分布图](.\u002Fpkg\u002Findicator\u002Fvolumeprofile.go)\n    - 以及更多...\n- 平均蜡烛 OHLC \u002F 普通 OHLC（请查看 [此配置](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fconfig\u002Fskeleton.yaml#L5)）\n- 基于 React 的 Web 控制台。\n- 已准备好 Docker 镜像。\n- 支持 Kubernetes。\n- Helm 图表已准备就绪。\n- 高精度浮点数运算（最多 16 位小数，需使用 `-tags dnum` 参数运行）。\n\n## 截图\n\n![bbgo 控制台](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_a7e118726ec0.jpeg)\n\n![bbgo 回测报告](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_readme_e9e318ca569a.jpg)\n\n## 内置策略\n\n| 策略            | 描述                                                                                                                             | 类型       | 回测支持 |\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|------------|------------------|\n| grid            | 第一代网格策略，灵活性更高，但需要提前准备库存                                   | 做市       |                  |\n| grid2           | 第二代网格策略，可将你的报价资产转化为网格，支持基础币+报价币模式                              | 做市       |                  |\n| bollgrid        | 结合内置布林带指标的基本网格策略                                                         | 做市       |                  |\n| xmaker          | 跨交易所做市策略，可对冲另一侧的库存风险                                                  | 做市       | 无               |\n| xdepthmaker     | 跨交易所基于深度的做市策略                                                                | 做市       | 无               |\n| xfixedmaker     | 跨交易所固定价差做市策略                                                                  | 做市       | 无               |\n| xnav            | 该策略帮助记录当前的净资产值                                                              | 工具       | 无               |\n| xalign          | 该策略自动对齐你的余额和仓位                                                              | 工具       | 无               |\n| xfunding        | 资金费率收费策略                                                                          | 资金费率   | 无               |\n| autoborrow      | 该策略利用保证金借入资产，以帮助你维持最低余额                                            | 工具       | 无               |\n| autobuy         | 定期自动买入特定资产                                                                      | 工具       | 无               |\n| pivotshort      | 该策略寻找枢轴低点，并在价格跌破前低时入场交易                                           | 多空       |                  |\n| schedule        | 该策略按固定数量定期买卖，可用作单一DCA，或用于补充如BNB等费用币                          | 工具       |                  |\n| irr             | 该策略根据预测的回报率开仓                                                               | 多空       |                  |\n| bollmaker       | 该策略持有长期多空头寸，在两侧挂单做市，并使用布林带控制仓位大小                         | 做市       |                  |\n| wall            | 该策略在订单簿上创建一道“墙”（大量订单）                                                   | 做市       | 无               |\n| scmaker         | 专为稳定币市场设计的做市策略，如USDC\u002FUSDT                                                 | 做市       |                  |\n| drift           |                                                                                                                                         | 多空       |                  |\n| rsicross        | 当快速RSI上穿慢速RSI时开多仓，这是一个使用v2指标的演示策略                               | 多空       |                  |\n| emacross        | EMA交叉策略                                                                               | 多空       |                  |\n| marketcap       | 该策略根据市值重新平衡投资组合                                                           | 再平衡     | 无               |\n| supertrend      | 该策略使用DEMA和超级趋势指标开多空仓                                                     | 多空       |                  |\n| trendtrader     | 该策略根据趋势线突破开多空仓                                                             | 多空       |                  |\n| elliottwave     |                                                                                                                                         | 多空       |                  |\n| ewoDgtrd        |                                                                                                                                         | 多空       |                  |\n| fixedmaker      |                                                                                                                                         | 做市       |                  |\n| factorzoo       |                                                                                                                                         | 多空       |                  |\n| fmaker          |                                                                                                                                         | 做市       |                  |\n| linregmaker     | 基于线性回归的做市策略                                                                    | 做市       |                  |\n| liquiditymaker  | 在订单簿上提供流动性                                                                      | 做市       |                  |\n| audacitymaker   | 大胆的做市策略                                                                            | 做市       |                  |\n| convert         | 转换策略是一个工具，可帮助你将特定资产转换为目标资产                                     | 工具       | 无               |\n| dca             | 成本平均策略                                                                              | 工具       |                  |\n| dca2            | 第二代成本平均策略                                                                        | 工具       |                  |\n| rebalance       | 根据目标权重重新平衡你的投资组合                                                          | 再平衡     | 无               |\n| deposit2transfer | 自动将存款转入另一个账户                                                                  | 工具       | 无               |\n| sentinel        | 监控交易所的连接性和健康状况                                                              | 工具       | 无               |\n| tri             | 三角套利策略                                                                              | 套利       | 无               |\n| random          | 为测试目的随机下单                                                                        | 工具       | 无               |\n\n## 支持的交易所\n\n- 币安现货交易所（包括 binance.us）\n- OKX 现货交易所（前 OKEX）\n- Kucoin 现货交易所\n- MAX 现货交易所（位于中国台湾）\n- Bitget 交易所\n- Bybit 交易所\n- Coinbase 交易所\n- Bitfinex 交易所\n\n## 文档与通用主题\n\n- 请查看 [文档索引](doc\u002FREADME.md)\n\n## 要求\n\n* Go SDK 1.25\n\n* Linux \u002F MacOS \u002F Windows (WSL)\n\n* 注册账户后获取您的交易所 API 密钥和密钥：您可以选择一个或多个交易所：\n\n  - MAX: \u003Chttps:\u002F\u002Fmax.maicoin.com\u002Fsignup?r=c7982718>\n  - 币安: \u003Chttps:\u002F\u002Faccounts.binance.com\u002Fen\u002Fregister?ref=38192708>\n  - OKEx: \u003Chttps:\u002F\u002Fwww.okex.com\u002Fjoin\u002F2412712?src=from:ios-share>\n  - Kucoin: \u003Chttps:\u002F\u002Fwww.kucoin.com\u002Fucenter\u002Fsignup?rcode=r3KX2D4>\n  - Bybit: \u003Chttps:\u002F\u002Fwww.bybit.com\u002F>\n  - Bitget: \u003Chttps:\u002F\u002Fwww.bitget.com\u002F>\n  - Coinbase: \u003Chttps:\u002F\u002Fwww.coinbase.com\u002F>\n  - Bitfinex: \u003Chttps:\u002F\u002Fwww.bitfinex.com\u002F>\n\n  本项目由一小群人维护和支持。如果您想支持该项目，请使用提供的链接和上述推荐码在各交易所注册。\n\n## 安装\n\n### 从二进制文件安装\n\n以下脚本将帮助您设置配置文件和 dotenv 文件：\n\n```sh\n# 币安交易所的网格交易策略\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-grid.sh) binance\n\n# MAX 交易所的网格交易策略\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-grid.sh) max\n\n# 币安交易所的布林格网格交易策略\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-bollgrid.sh) binance\n\n# MAX 交易所的布林格网格交易策略\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fsetup-bollgrid.sh) max\n```\n\n如果您已经拥有配置，也可以使用仅下载的脚本：\n\n```sh\nbash \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fscripts\u002Fdownload.sh)\n```\n\n或者访问 [发布页面](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Freleases)，手动下载。\n\n自 v2 版本起，我们引入了 dnum 的新浮点实现，以支持更高精度的小数。有关下载和设置，请参阅 [Dnum 安装指南](doc\u002Ftopics\u002Fdnum-binary.md)。\n\n### 一键 Linode StackScript\n\nStackScript 允许您一键部署带有 bbgo 的轻量级实例。\n\n- BBGO 网格交易（币安）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F950715>\n- BBGO 网格交易 USDT\u002FTWD（MAX）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F793380>\n- BBGO 网格交易 USDC\u002FTWD（MAX）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797776>\n- BBGO 网格交易 LINK\u002FTWD（MAX）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797774>\n- BBGO 网格交易 USDC\u002FUSDT（MAX）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F797777>\n- BBGO 网格交易（MAX）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F795788>\n- BBGO 布林格指标（币安）\u003Chttps:\u002F\u002Fcloud.linode.com\u002Fstackscripts\u002F1002384>\n\n### 从源代码构建\n\n请参阅 [从源代码构建](.\u002Fdoc\u002Fbuild-from-source.md)\n\n## 配置\n\n添加您的 dotenv 文件：\n\n```sh\n# 对于币安交易所，如果您有 API 密钥和密钥\nBINANCE_API_KEY=\nBINANCE_API_SECRET=\n\n# 如果您想使用 binance.us，请将此值更改为 1\nBINANCE_US=0\n\n# 对于 MAX 交易所，如果您有 API 密钥和密钥\nMAX_API_KEY=\nMAX_API_SECRET=\n\n# 对于 OKEx 交易所，如果您有 API 密钥和密钥\nOKEX_API_KEY=\nOKEX_API_SECRET=\nOKEX_API_PASSPHRASE\n\n# 对于 Kucoin 交易所，如果您有 API 密钥和密钥\nKUCOIN_API_KEY=\nKUCOIN_API_SECRET=\nKUCOIN_API_PASSPHRASE=\nKUCOIN_API_KEY_VERSION=2\n\n# 对于 Bybit 交易所，如果您有 API 密钥和密钥\nBYBIT_API_KEY=\nBYBIT_API_SECRET=\n\n# 对于 Bitget 交易所，如果您有 API 密钥和密钥\nBITGET_API_KEY=\nBITGET_API_SECRET=\nBITGET_API_PASSPHRASE=\n\n# 对于 Coinbase 交易所，如果您有 API 密钥和密钥\nCOINBASE_API_KEY=\nCOINBASE_API_SECRET=\n\n# 对于 Bitfinex 交易所，如果您有 API 密钥和密钥\nBITFINEX_API_KEY=\nBITFINEX_API_SECRET=\n```\n\n准备您的 dotenv 文件 `.env.local` 和 BBGO yaml 配置文件 `bbgo.yaml`。\n\n如需查看可用的环境变量，请参阅 [环境变量](.\u002Fdoc\u002Fconfiguration\u002Fenvvars.md)。\n\n最小化的 bbgo.yaml 可以通过以下命令生成：\n\n```sh\ncurl -o bbgo.yaml https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fconfig\u002Fminimal.yaml\n```\n\n运行策略：\n\n```sh\nbbgo run\n```\n\n启动带前端仪表盘的 bbgo：\n\n```sh\nbbgo run --enable-webserver\n```\n\n如果您想切换到另一个 dotenv 文件，可以添加 `--dotenv` 或 `--config` 选项：\n\n```sh\nbbgo sync --dotenv .env.dev --config config\u002Fgrid.yaml --session binance\n```\n\n查询转账记录：\n\n```sh\nbbgo transfer-history --session max --asset USDT --since \"2019-01-01\"\n```\n\n\u003C!--\n计算盈亏：\n\n```sh\nbbgo pnl --exchange binance --asset BTC --since \"2019-01-01\"\n```\n-->\n\n## 高级配置\n\n### 将系统时间与币安同步\n\nBBGO 提供了一个适用于 UNIX 系统\u002F子系统的脚本，用于将日期与币安同步。在此之前需要安装 `jq` 和 `bc`。在 Ubuntu 上安装依赖项的命令如下：\n\n```bash\nsudo apt install -y bc jq\n```\n\n然后执行同步脚本：\n\n```bash\nsudo .\u002Fscripts\u002Fsync_time.sh\n```\n\n您还可以将该脚本添加到 crontab 中，以便定期将系统时间与币安同步。\n\n### 测试网（模拟交易）\n\n目前仅支持币安测试网。要在测试网上运行 bbgo，请从 [Binance 测试网络](https:\u002F\u002Ftestnet.binance.vision) 申请新的 API 密钥，并在启动 bbgo 之前设置以下环境变量：\n\n```sh\nexport PAPER_TRADE=1\nexport DISABLE_MARKET_CACHE=1 # 测试网支持的交易对远少于主网\n```\n\n### 通知\n\n- [设置 Telegram 通知](.\u002Fdoc\u002Fconfiguration\u002Ftelegram.md)\n- [设置 Slack 通知](.\u002Fdoc\u002Fconfiguration\u002Fslack.md)\n\n### 同步交易数据\n\n默认情况下，BBGO 不会从交易所会话中同步您的交易数据，因此难以准确计算您的盈亏。\n\n通过将交易和订单同步到本地数据库，您可以获得一些好处，例如盈亏计算、回测和资产计算。\n\n您只能使用 MySQL 或 SQLite 数据库驱动来存储您的交易数据。\n\n**注意**：SQLite 并未完全支持，我们建议您使用 MySQL 而不是 SQLite。\n\n#### 配置 MySQL 数据库\n\n要使用 MySQL 数据库进行数据同步，首先需要安装 MySQL 服务器：\n\n```sh\n# 对于 Ubuntu Linux\nsudo apt-get install -y mysql-server\n\n# 对于较新的 Ubuntu Linux\nsudo apt install -y mysql-server\n```\n\n或者在 Docker 中运行 [MySQL](https:\u002F\u002Fhub.docker.com\u002F_\u002Fmysql)。\n\n创建您的 MySQL 数据库：\n\n```sh\nmysql -uroot -e \"CREATE DATABASE bbgo CHARSET utf8\"\n```\n\n然后在您的 `.env.local` 文件中添加以下环境变量：\n\n```sh\nDB_DRIVER=mysql\nDB_DSN=\"user:password@tcp(127.0.0.1:3306)\u002Fbbgo\"\n```\n\n#### 配置 SQLite3 数据库\n\n要使用 SQLite3 而不是 MySQL，只需在您的 `.env.local` 文件中添加以下环境变量：\n\n```sh\nDB_DRIVER=sqlite3\nDB_DSN=bbgo.sqlite3\n```\n\n## 同步您自己的交易数据\n\n在配置好数据库后，您可以从交易所同步自己的交易数据。\n\n请参阅 [为私有交易数据配置同步](.\u002Fdoc\u002Fconfiguration\u002Fsync.md)\n\n## 使用 Redis 在 BBGO 会话之间保持持久化\n\n要使用 Redis，首先需要安装 Redis 服务器：\n\n```sh\n# 对于 Ubuntu\u002FDebian Linux\nsudo apt-get install -y redis\n\n# 对于较新的 Ubuntu\u002FDebian Linux\nsudo apt install -y redis\n```\n\n在您的 `bbgo.yaml` 中设置以下环境变量：\n\n```yaml\npersistence:\n  redis:\n    host: 127.0.0.1  # 您的 Redis 服务器的 IP 地址或主机名，如果与 BBGO 相同则为 127.0.0.1\n    port: 6379  # 到 Redis 服务器的端口，默认为 6379\n    db: 0  # 要使用的数据库编号。如果您希望避免与其他应用程序使用 Redis 时发生冲突，可以设置为其他数据库。\n```\n\n## 内置策略\n\n请查看策略目录 [strategy](pkg\u002Fstrategy)，了解所有内置策略：\n\n- `pricealert` 策略演示了如何使用通知系统 [pricealert](pkg\u002Fstrategy\u002Fexample\u002Fpricealert)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Fpricealert.md)。\n- `buyandhold` 策略演示了如何订阅 K 线事件并提交市价单 [buyandhold](pkg\u002Fstrategy\u002Fexample\u002Fpricedrop)\n- `bollgrid` 策略实现了基于内置布林带指标的基本网格策略 [bollgrid](pkg\u002Fstrategy\u002Fbollgrid)\n- `grid` 策略实现了固定价格区间网格策略 [grid](pkg\u002Fstrategy\u002Fgrid)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Fgrid.md)。\n- `supertrend` 策略使用超趋势指标作为趋势判断，并用 DEMA 指标作为噪声过滤器 [supertrend](pkg\u002Fstrategy\u002Fsupertrend)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Fsupertrend.md)。\n- `support` 策略将高成交量的 K 线视为支撑位 [support](pkg\u002Fstrategy\u002Fsupport)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Fsupport.md)。\n- `flashcrash` 策略实现了一种捕捉闪崩行情的策略 [flashcrash](pkg\u002Fstrategy\u002Fflashcrash)\n- `marketcap` 策略实现了一种基于市值重新平衡投资组合的策略 [marketcap](pkg\u002Fstrategy\u002Fmarketcap)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Fmarketcap.md)。\n- `pivotshort` - 专注于做空的策略。\n- `irr` - 收益率策略。\n- `drift` - 偏移策略。\n- `grid2` - 第二代网格策略。\n- `rebalance` - 根据目标权重重新平衡您的投资组合。[rebalance](pkg\u002Fstrategy\u002Frebalance)。详情请参阅\n  [文档](.\u002Fdoc\u002Fstrategy\u002Frebalance.md)。\n\n要运行这些内置策略，只需修改配置文件以使其适合您的需求。例如，如果您想运行\n`buyandhold` 策略：\n\n```sh\nvim config\u002Fbuyandhold.yaml\n\n# 使用该配置运行 bbgo\nbbgo run --config config\u002Fbuyandhold.yaml\n```\n\n## 回测\n\n请参阅 [回测](.\u002Fdoc\u002Ftopics\u002Fback-testing.md)\n\n## 添加策略\n\n请参阅 [开发策略](.\u002Fdoc\u002Ftopics\u002Fdeveloping-strategy.md)\n\n## 编写您自己的私有策略\n\n创建您的 Go 包，使用 `go mod` 初始化仓库，并将 bbgo 添加为依赖项：\n\n```sh\ngo mod init\ngo get github.com\u002Fc9s\u002Fbbgo@main\n```\n\n在策略文件中编写您自己的策略：\n\n```sh\nvim strategy.go\n```\n\n您可以从 \u003Chttps:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fblob\u002Fmain\u002Fpkg\u002Fstrategy\u002Fexample\u002Fskeleton\u002Fstrategy.go> 获取策略框架。\n\n现在添加您的配置：\n\n```sh\nmkdir config\n(cd config && curl -o bbgo.yaml https:\u002F\u002Fraw.githubusercontent.com\u002Fc9s\u002Fbbgo\u002Fmain\u002Fconfig\u002Fminimal.yaml)\n```\n\n将您的策略包路径添加到配置文件 `config\u002Fbbgo.yaml` 中：\n\n```yaml\n---\nbuild:\n  dir: build\n  imports:\n  - github.com\u002Fyour_id\u002Fyour_swing\n  targets:\n  - name: swing-amd64-linux\n    os: linux\n    arch: amd64\n  - name: swing-amd64-darwin\n    os: darwin\n    arch: amd64\n```\n\n运行 `bbgo run` 命令，bbgo 将编译一个导入您策略的包装二进制文件：\n\n```sh\ndotenv -f .env.local -- bbgo run --config config\u002Fbbgo.yaml\n```\n\n或者您也可以通过以下方式构建自己的包装二进制文件：\n\n```shell\nbbgo build --config config\u002Fbbgo.yaml\n```\n\n相关资源：\n\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fnarumiruna\u002Fbbgo-template>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fnarumiruna\u002Fbbgo-marketcap>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Faustin362667\u002Fshadow>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fjnlin\u002Fbbgo-strategy-infinite-grid>\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fyubing744\u002Ftrading-gpt>\n\n## 命令用法\n\n### 向特定交易所会话提交订单\n\n```shell\nbbgo submit-order --session=okex --symbol=OKBUSDT --side=buy --price=10.0 --quantity=1\n```\n\n### 列出特定交易所会话的未成交订单\n\n```sh\nbbgo list-orders open --session=okex --symbol=OKBUSDT\nbbgo list-orders open --session=max --symbol=MAXUSDT\nbbgo list-orders open --session=binance --symbol=BNBUSDT\n```\n\n### 取消未成交订单\n\n```shell\n# 对于 okex，订单 ID 和交易对都必须提供\nbbgo cancel-order --session=okex --order-id=318223238325248000 --symbol=OKBUSDT\n\n# 对于 max，只需提供订单 ID 即可\nbbgo cancel-order --session=max --order-id=1234566\n```\n\n### 调试用户数据流\n\n```sh\nbbgo userdatastream --session okex\nbbgo userdatastream --session max\nbbgo userdatastream --session binance\n```\n\n## 动态注入\n\n为了尽量减少策略代码量，bbgo 支持动态依赖注入。\n\n在执行您的策略之前，如果 bbgo 发现您的策略对象中嵌入了正在使用 bbgo 组件的字段，它会将这些组件注入到您的策略对象中。例如：\n\n```go\ntype Strategy struct {\n  Symbol string `json:\"symbol\"`\n  Market types.Market\n}\n```\n\n目前仅支持单个交易所策略的组件：\n\n- `*bbgo.ExchangeSession`\n- `bbgo.OrderExecutor`\n\n如果您在策略中定义了 `Symbol string` 字段，您的策略将被识别为基于交易对的策略，此时可以自动注入以下类型：\n\n- `types.Market`\n\n## 策略执行阶段\n\n1. 从配置文件中加载配置。\n2. 分配并初始化交易所会话。\n3. 将交易所会话添加到环境（数据层）中。\n4. 使用给定的环境初始化交易者对象（逻辑层）。\n5. 交易者初始化环境并启动交易所连接。\n6. 依次调用策略的 `Run()` 方法。\n\n## 交易所 API 示例\n\n请查看示例目录：[examples](examples)\n\n初始化 MAX API：\n\n```go\nkey := os.Getenv(\"MAX_API_KEY\")\nsecret := os.Getenv(\"MAX_API_SECRET\")\n\nmaxRest := maxapi.NewRestClient(maxapi.ProductionAPIURL)\nmaxRest.Auth(key, secret)\n```\n\n创建用户数据流以获取订单簿（深度）：\n\n```go\nstream := max.NewStream(key, secret)\nstream.Subscribe(types.BookChannel, symbol, types.SubscribeOptions{})\n\nstreambook := types.NewStreamBook(symbol)\nstreambook.BindStream(stream)\n```\n\n## 部署\n\n- [Helm Chart](.\u002Fdoc\u002Fdeployment\u002Fhelm-chart.md)\n- 裸机或 VPS\n\n## 开发\n\n- [添加新交易所](.\u002Fdoc\u002Fdevelopment\u002Fadding-new-exchange.md)\n- [迁移](.\u002Fdoc\u002Fdevelopment\u002Fmigration.md)\n\n### 设置本地仓库\n\n1. 在 GitHub 仓库中点击“Fork”按钮。\n2. 将您的 fork 仓库克隆到 `$GOPATH\u002Fgithub.com\u002Fc9s\u002Fbbgo`。\n3. 切换到 `$GOPATH\u002Fgithub.com\u002Fc9s\u002Fbbgo` 目录。\n4. 创建一个分支并开始开发。\n5. 测试您的更改。\n6. 将更改推送到您的 fork。\n7. 发送拉取请求。\n\n### 测试桌面应用\n\n对于 WebView：\n\n```sh\nmake embed && go run -tags web .\u002Fcmd\u002Fbbgo-webview\n```\n\n对于 Lorca：\n\n```sh\nmake embed && go run -tags web .\u002Fcmd\u002Fbbgo-lorca\n```\n\n## 常见问题解答\n\n### 什么是仓位？\n\n- 基础货币与报价货币 \u003Chttps:\u002F\u002Fwww.ig.com\u002Fau\u002Fglossary-trading-terms\u002Fbase-currency-definition>\n- 如何计算平均成本？ \u003Chttps:\u002F\u002Fwww.janushenderson.com\u002Fen-us\u002Finvestor\u002Fplanning\u002Fcalculate-average-cost\u002F>\n\n### 寻找新的交易策略吗？\n\n您可以撰写一篇关于 BBGO 的文章，主题不限，字数在 750–1500 字之间，作为交换，我可以为您实现该策略（具体取决于复杂度和工作量）。如果您感兴趣，请通过 Telegram \u003Chttps:\u002F\u002Ft.me\u002Fc123456789s> 或 X\u002FTwitter \u003Chttps:\u002F\u002Fx.com\u002Fc9s> 私信我，我们可以进一步讨论。\n\n### 添加对新加密交易所的支持？\n\n如果您希望 BBGO 支持当前未包含的某个加密交易所，我们可以为您实现这一功能。费用为 10 ETH。如果您有兴趣，请通过 Telegram \u003Chttps:\u002F\u002Ft.me\u002Fc123456789s> 私信我。\n\n## 社区\n\n- Telegram 群组 \u003Chttps:\u002F\u002Ft.me\u002Fbbgo_intl>\n- Telegram 群组（台湾）\u003Chttps:\u002F\u002Ft.me\u002Fbbgocrypto>\n- X\u002FTwitter \u003Chttps:\u002F\u002Fx.com\u002Fbbgotrading>\n\n## 贡献\n\n请参阅 [贡献指南](.\u002FCONTRIBUTING.md)\n\n### 财务支持者\n\n[[成为支持者](https:\u002F\u002Fopencollective.com\u002Fbbgo#backer)]\n\n\u003Ca href=\"https:\u002F\u002Fopencollective.com\u002Fbbgo#backers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Fbbgo\u002Ftiers\u002Fbacker.svg?width=890\">\u003C\u002Fa>\n\n## BBGO 代币经济模型\n\n为了支持 BBGO 的开发，我们设立了一个赏金池，用于通过发放 $BBG 代币来支持贡献者。详情请查看 [$BBG 合约页面](contracts\u002FREADME.md) 和我们的[官方网站](https:\u002F\u002Fbbgo.finance)。\n\n## 支持者\n\n- GitBook\n\n## 许可证\n\nAGPL 许可证","# BBGO 快速上手指南\n\nBBGO 是一个用 Go 语言编写的现代化加密货币交易机器人框架，支持多交易所连接、内置多种策略、回测引擎及实时数据流处理。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: Linux, macOS, Windows (推荐 Linux 服务器部署)\n- **Go 版本**: Go 1.20 或更高版本\n- **容器环境 (可选)**: Docker 20.10+, Kubernetes 1.20+ (如需容器化部署)\n\n### 前置依赖\n- 已安装的 Go 开发环境\n- Git 版本控制工具\n- 交易所 API Key (用于实盘或模拟盘交易)\n- (可选) Slack 或 Telegram Token (用于通知)\n\n## 安装步骤\n\n### 方式一：源码安装 (推荐开发者使用)\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo.git\ncd bbgo\n\n# 编译主程序 (开启高精度浮点数支持)\ngo build -tags dnum -o bbgo .\u002Fcmd\u002Fbbgo\n\n# 验证安装\n.\u002Fbbgo version\n```\n\n### 方式二：Docker 安装 (推荐生产环境使用)\n\n```bash\n# 拉取官方镜像\ndocker pull yoanlin\u002Fbbgo:latest\n\n# 创建配置目录\nmkdir -p ~\u002F.bbgo\n```\n\n## 基本使用\n\n### 1. 初始化配置文件\nBBGO 通过 YAML 文件配置策略和交易所。复制示例配置并编辑：\n\n```bash\ncp config\u002Fskeleton.yaml bbgo.yaml\n```\n\n编辑 `bbgo.yaml`，填入你的交易所密钥和策略参数（以下以网格策略为例）：\n\n```yaml\nsessions:\n  max:\n    envVarPrefix: max\n    # 在此处配置 MAX 交易所的 API Key 和 Secret\n    # export MAX_API_KEY=your_key\n    # export MAX_API_SECRET=your_secret\n\nexchangeStrategies:\n  - on: max\n    grid2:\n      symbol: BTCUSDT\n      upperPrice: 50000\n      lowerPrice: 30000\n      gridNum: 20\n      amount: \"100\" # 每格投入金额\n      profitSpread: 0.005 # 利润间距\n```\n\n### 2. 运行交易机器人\n\n**本地运行：**\n```bash\n# 确保已设置环境变量或使用配置文件\nexport MAX_API_KEY=your_key\nexport MAX_API_SECRET=your_secret\n\n.\u002Fbbgo run --config bbgo.yaml\n```\n\n**Docker 运行：**\n```bash\ndocker run -it --rm \\\n  -v $(pwd)\u002Fbbgo.yaml:\u002Froot\u002Fbbgo.yaml \\\n  -e MAX_API_KEY=your_key \\\n  -e MAX_API_SECRET=your_secret \\\n  yoanlin\u002Fbbgo:latest run --config \u002Froot\u002Fbbgo.yaml\n```\n\n### 3. 访问 Web 仪表盘\n启动成功后，默认在浏览器访问 `http:\u002F\u002Flocalhost:8080` 即可查看实时订单、资产状况及策略日志。\n\n### 4. 执行回测 (可选)\n使用内置的回测引擎验证策略表现：\n\n```bash\n.\u002Fbbgo backtest --config bbgo.yaml --base-asset-baseline --start 2023-01-01 --end 2023-12-31\n```\n回测报告将在终端输出，并可在 Web 仪表盘中查看可视化图表。","一位量化交易开发者希望在不同交易所部署自定义的网格套利策略，并需要实时风控与历史回测验证。\n\n### 没有 bbgo 时\n- 开发者需分别为币安、OKX 等不同交易所重复编写底层 API 对接代码，耗时且容易出错。\n- 缺乏统一的历史数据回测引擎，策略上线前只能用小资金实盘“试错”，风险极高。\n- 手动监控多个账户的盈亏（PnL）和订单状态，无法在行情剧烈波动时及时收到 Slack 或 Telegram 警报。\n- 实现复杂的移动平均线（如 ALMA、Hull MA）等技术指标需从零造轮子，难以快速验证交易逻辑。\n- 多交易所资金调度困难，无法在一个程序中同时管理不同账户的子账号资产。\n\n### 使用 bbgo 后\n- 利用 bbgo 统一的交易所抽象接口，一套代码即可无缝连接支持的主流交易所，开发效率提升数倍。\n- 直接使用内置的 KLine 回测引擎，在几分钟内完成策略对过去几年数据的验证，大幅降低实盘亏损风险。\n- 配置内置的 PnL 计算与通知模块，系统自动推送异常波动警报，实现 7x24 小时无人值守监控。\n- 调用类似 pandas Series 接口的丰富技术指标库（如 RSI、布林带），几行代码即可构建复杂策略逻辑。\n- 通过多会话支持功能，轻松在同一实例中协调多个交易所账户，自动执行跨市场套利指令。\n\nbbgo 将开发者从繁琐的基础设施搭建中解放出来，使其能专注于策略逻辑本身，显著降低了加密货币量化交易的门槛与风险。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fc9s_bbgo_a7e11872.jpg","c9s",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fc9s_b9c2601e.jpg","a developer who really loves crafting tools\r\n","Taipei, Taiwan","yoanlin93+github@gmail.com","https:\u002F\u002Fgithub.com\u002Fc9s",[83,87,91,95,99,103,107,111,114,117],{"name":84,"color":85,"percentage":86},"Go","#00ADD8",93.9,{"name":88,"color":89,"percentage":90},"Solidity","#AA6746",2.7,{"name":92,"color":93,"percentage":94},"JavaScript","#f1e05a",1.5,{"name":96,"color":97,"percentage":98},"TypeScript","#3178c6",0.9,{"name":100,"color":101,"percentage":102},"Shell","#89e051",0.7,{"name":104,"color":105,"percentage":106},"Makefile","#427819",0.2,{"name":108,"color":109,"percentage":110},"CSS","#663399",0.1,{"name":112,"color":113,"percentage":110},"SCSS","#c6538c",{"name":115,"color":85,"percentage":116},"Go Template",0,{"name":118,"color":119,"percentage":116},"Dockerfile","#384d54",1619,369,"2026-04-03T10:07:45","AGPL-3.0","Linux, macOS, Windows","未说明",{"notes":127,"python":128,"dependencies":129},"该工具主要使用 Go 语言编写，非 Python 项目。支持通过 Docker 容器、Kubernetes 或 Helm 图表部署。若需启用高精度浮点数运算，编译时需添加 `-tags dnum` 标签。内置多种交易策略和技术指标，支持连接 8 家主流交易所。","不适用 (基于 Go 语言)",[130,131,132,133],"Go (版本未明确，建议较新版本)","Docker (可选)","Kubernetes (可选)","Helm (可选)",[15,13],[136,137,138,139,140,141],"trading","trading-bot","cryptocurrency","binance","bitcoin","crypto","2026-03-27T02:49:30.150509","2026-04-06T05:16:36.028323",[145,150,155,160,165,170],{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},13261,"为什么 BollGrid 策略在运行一段时间后停止下单，必须重启程序才能继续？","这通常是因为订阅的 K 线周期（interval）与实际接收到的数据不匹配。例如配置为 5m，但实际接收到的 kline.interval 始终是 1m，导致策略逻辑中的更新条件无法满足。请检查 bbgo 启动时的日志，确认是否成功订阅了指定周期（如 5m）。该问题在真实交易所（如 MAX）运行时可能出现，而在回测中正常，需排查 ExchangeSession 的订阅处理逻辑。","https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fissues\u002F93",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},13262,"如何在回测中让 Grid 策略产生交易？我同步了数据但交易数量为 0。","确保使用正确的命令同步数据并运行回测。首先执行数据同步：`.\u002Fbbgo backtest --exchange binance -v --sync --sync-only --sync-from \u003C起始日期> --config grid.yaml`。然后运行回测时加上 `--base-asset-baseline` 参数：`.\u002Fbbgo backtest --exchange binance --sync-from \u003C起始日期> --config grid.yaml --base-asset-baseline`。如果仍无交易，请检查配置文件中的价格区间（upperPrice\u002FlowerPrice）是否覆盖了对应时间段的市场价格，以及 quantity 和 gridNumber 设置是否合理。相关修复已包含在 v1.18.0 及后续版本中。","https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fissues\u002F282",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},13263,"AverageDepthPrice 和 AverageDepthPriceByQuote 方法的具体作用是什么？","AverageDepthPrice 用于根据基础资产数量（如买入 2 BTC）计算平均深度价格；AverageDepthPriceByQuote 则根据报价资产数量（如花费 120000 USDT）计算平均价格。两者都应返回加权平均单价。例如，若买 2 BTC 的平均价为 59818.97，则用约 119637.94 USDT 购买时，AverageDepthPriceByQuote 也应返回相同的单价 59818.97。实现细节已在提交 f39e47f19 中更新修正。","https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fissues\u002F1861",{"id":161,"question_zh":162,"answer_zh":163,"source_url":164},13264,"回测报告中出现重复订单或图表时间不同步怎么办？","部分看似重复的日志可能是控制台输出复制粘贴造成的误解。若确认为报告问题，请注意 Grid 策略在特定配置下（如 long: false）可能在图表上显示买卖顺序反转或时间点异常。建议检查配置中的 profitSpread、gridNumber 和价格区间是否合理，并尝试升级至最新版本。维护者指出底层对象一致，通常为显示逻辑而非实际重复下单。","https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fissues\u002F631",{"id":166,"question_zh":167,"answer_zh":168,"source_url":169},13265,"DCA 策略是否有官方配置示例？","是的，DCA（定额投资）策略已正式加入 bbgo。用户可参考项目目录下的 config\u002Fdca.yaml 文件获取标准配置模板。该策略支持定期自动买入，适合长期定投场景。","https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fissues\u002F673",{"id":171,"question_zh":172,"answer_zh":173,"source_url":164},13266,"如何查看回测结果中的订单详情和盈亏报告？","运行回测后，系统会自动生成详细的盈亏报告，包括交易次数、总买卖量、手续费、未实现利润等。同时会输出 orders.tsv 文件记录所有订单详情。若使用 UI 界面，可通过内置的 Lightweight Charts 查看价格线与订单标记。确保命令行中包含 `--output` 和 `--subdir` 参数以保存完整报告。",[175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,255,260,265,270],{"id":176,"version":177,"summary_zh":178,"released_at":179},71944,"bbgo-0.4.3","bbgo 交易机器人的 Helm Chart","2025-08-18T12:36:35",{"id":181,"version":182,"summary_zh":183,"released_at":184},71945,"v1.63.0","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.62.2...main)\n\n - [#2094](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2094): 修复：修复自交易保护的交易映射键\n - [#2093](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2093): 修复：[coinbase] 在全局订单转换中添加已执行数量和更新时间\n - [#2092](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2092): 修复：[coinbase] 修复交易历史分页并更新测试\n - [#2091](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2091): 改进：[tradingdesk] 添加回退设置和验证\n - [#2088](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2088): 修复：[coinbase] 允许转账历史查询使用空资产参数，并更新测试\n - [#2090](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2090): 改进：[tradingdesk] 提升持久化能力，优化最小数量调整\n - [#2089](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2089): 修复：[sync] 为订单和交易同步失败添加日志记录\n - [#2086](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2086): 功能：[coinbase] 实现转账历史查询服务\n - [#2087](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2087): 改进：[tradingdesk] 改善持仓加载和计算\n - [#2085](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2085): 功能：[tradingdesk] 提供一个基础的工作示例\n - [#2084](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2084): 功能：[Coinbase] 实现 ExchangeTradeHistoryService 并修复分页问题\n - [#2081](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2081): 重构：[tradingdesk] 使用 TradingManager 进行重构\n - [#2083](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2083): 修复：[okx] 修复 okx 币种转换问题\n - [#2057](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2057): 依赖：将 morphy2k\u002Frevive-action 从 2.7.6 升级至 2.7.7\n - [#2082](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2082): 杂项：[tradingdesk] 配置币安相关功能\n - [#2080](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2080): 功能：[core] 添加 Slack 上传 API 支持\n - [#2079](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2079): 修复：[xmaker] 即使未平仓头寸为零，也继续检查价差做市情况\n - [#2078](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2078): 修复：[xmaker] 修复价差做市订单取消问题\n - [#2077](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2077): 修复：[docs] 替换 Twitter 社交网络名称和链接\n - [#2076](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2076): 策略：tradingdesk 策略的初始提交\n - [#2075](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2075): 杂项：修复有问题的注释\n - [#2073](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2073): 功能：添加基于蒙特卡洛方法的风险管理 VaR\n - [#2072](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2072): 改进：[xmaker] 自动根据吃单手续费调整对冲市场价格\n - [#2074](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2074): 修复：仅当订单没有 OrderID 和 ClientOrderID 时才…\n - [#2069](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2069): 重构：提取交易所会话配置\n - [#2071](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2071): 改进：[xmaker] 支持对冲市场的持久化\n - [#2070](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F2070): 改进：[xmaker] 合成对冲优雅关闭，并进行测试","2025-07-15T05:42:42",{"id":186,"version":187,"summary_zh":188,"released_at":189},71946,"v1.62.2","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.62.1...main)\n\n## 修复\n\n- 修复了 xmaker 覆盖仓位的问题\n","2025-04-22T04:47:30",{"id":191,"version":192,"summary_zh":193,"released_at":194},71947,"v1.62.1","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.62.0...main)\n\n","2025-04-21T10:23:28",{"id":196,"version":197,"summary_zh":198,"released_at":199},71948,"v1.62.0","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.61.0...main)\n\n - [#1985](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1985): 功能：[dca2] 更新指标\n - [#1981](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1981): 功能：[okx] 支持为 queryAccount 方法同步 OKX 永续合约账户信息\n - [#1986](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1986): 功能：[coinbase] 实现按交易对取消订单（并小幅修复余额相关问题）\n - [#1983](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1983): 功能：[dca2] 在下达开仓\u002F止盈订单前验证阶段\n - [#1979](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1979): 功能：[dca2] 重构 recoverState 函数\n - [#1965](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1965): 功能：[okx] 支持 OKX 永续合约订单，并修复示例代码\n - [#1967](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1967): 功能：[grid2] 使用 UniversalCancelAllOrders\n - [#1973](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1973): 功能：[xgap] 引入 SellBelowBestAsk 标志，以根据市场状况调整定价逻辑\n - [#1946](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1946): 功能：[session] 为 Session 添加 SetMarkets\u002FSetMarket 方法，用于同…\n - [#1954](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1954): 功能：[sync] 带有退避重试机制的同步功能\n - [#1951](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1951): 功能：[binance] 支持通过开关控制期货对冲订单\n - [#1948](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1948): 功能：[metrics] 为 xdepthmaker 的做市商市场添加 Prometheus 指标\n - [#1949](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1949): 功能：[depthmaker] 添加深度 RESTful API 回退支持\n - [#1942](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1942): 功能：使 bbgo 能够从其他包中添加自定义交易所\n - [#1938](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1938): 功能：[bbgo] 将 logger 作为参数传递给 bbgo.Sync\n - [#1890](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1890): 功能：[xalign] 添加价差警告提示\n - [#1882](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1882): 功能：[pyroscope] 支持配置性能分析\n - [#1879](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1879): 功能：[okx] 增加更多保证金 API 端点集成\n - [#1876](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1876): 功能：添加孤立森林算法\n - [#1877](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1877): 功能：[sentinel] 查询历史 K 线数据\n - [#1875](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1875): 功能：[autoborrow] 添加高利率预警\n - [#1874](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1874): 功能：[binance] 支持显示下个小时的保证金利息率\n - [#1916](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1916): 功能：[coinbase] Coinbase WebSocket 连接\n - [#1913](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1913): 功能：[coinbase] 实现 Coinbase WebSocket 消息解析\n - [#1901](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1901): 功能：[exchange] 新增 OTC 相关接口和字段\n - [#1889](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1889): 功能：[sentinel] 添加百分位排名\n - [#1992](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1992): 修复：[xmaker] 解决","2025-04-21T09:02:28",{"id":201,"version":202,"summary_zh":203,"released_at":204},71949,"v1.61.0","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.60.3...main)\n\n## 修复\n\n - [#1751](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1751): 修复：OnNew 事件必须在 OnFilled 之前调用\n - [#1761](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1761): 修复：[bybit] 修复冗余代码\n - [#1781](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1781): 修复：[xmaker] 修复已覆盖仓位字段\n - [#1787](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1787): 修复：修复订单更新比较方法\n - [#1788](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1788): 修复：[core] 移除会话订单存储\n - [#1789](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1789): 修复：在 Deposit 中添加 slackAttachment 方法\n - [#1790](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1790): 修复：[xmaker] 在调用 updateQuote 之前检查连接性\n - [#1797](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1797): 修复：[liqmaker] 修复 stopEMA 订阅\n - [#1802](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1802): 修复：[xmaker] 在提交订单前截断余额\n - [#1803](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1803): 修复：[deposit2transfer] 在转账前检查转账金额\n - [#1809](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1809): 修复：[xalign] 确保 LargetAmountAlert 不为 nil\n - [#1811](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1811): 修复：[deposit2transfer] 修复上次存款时间的检查\n - [#1816](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1816): 修复：[熔断机制] 按交易对分离指标标签，并添加 panic 处理程序\n - [#1817](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1817): 修复：重构并重新设计连接性\n - [#1818](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1818): 修复：修复存款时间检查\n - [#1819](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1819): 修复：[max] 使用相同的深度查询 QueryDepth\n - [#1827](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1827): 修复：在 tryFetch 中不重置快照和 once\n - [#1828](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1828): 修复：[depth] 修复过早的快照 ID 检查\n - [#1829](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1829): 修复：如果 event.FinalUpdateID 存在，深度缓冲区可以跳过旧事件\n - [#1830](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1830): 修复：[xdepthmaker] 修复盘口定价\n - [#1837](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1837): 修复：将 go-chart 从 2.1.0 升级到 2.1.2，以避免 CVE 漏洞\n - [#1842](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1842): 修复：将 CircuitBreakLossThreshold 赋值给 MaximumTotalLoss，并删除 circuitBreakEMA\n - [#1849](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1849): 修复：[xalign] 将市场添加到价格解析器中\n - [#1850](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1850): 修复：[depth] 修复深度缓冲区及测试\n - [#1853](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1853): 修复：如果期货订单是市价单，则使用平均价格代替零价格\n - [#1854](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1854): 修复：[dca2] 更新消息日志级别\n - [#1865](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1865): 修复：修复 AverageDepthPrice，并添加测试 TestPriceVolumeSlice\\_AverageDepthPrice\n - [#1869](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1869): 修复：[okex] 为 okx 添加 TestExchange\\_SubmitOrder 测试\n - [#1873](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1873): 修复：[max] 修复查询","2024-12-23T06:28:30",{"id":206,"version":207,"summary_zh":208,"released_at":209},71950,"v1.60.3","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.60.2...main)\n\n - 修复：修复 xmaker 的默认价格\n - [#1744](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1744)：当新订单被加入到活跃委托簿时，调用 b.EmitNew()\n","2024-09-15T16:40:00",{"id":211,"version":212,"summary_zh":213,"released_at":214},71951,"v1.60.2","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.60.1...main)\n\n - [#1739](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1739): 功能：[dca2] 为轮动持仓设置交易所手续费率\n - [#1738](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1738): 功能：[okx] 更新交易对至最新\n - [#1737](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1737): 功能：[xmaker] 实现 tryArbitrage\n - [#1730](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1730): 功能：[xmaker] 添加市价交易信号\n - [#1734](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1734): 重构：[xmaker] 重构以支持 ioc 套利 [部分1]\n - [#1736](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1736): 细微改进：[session] 移除环境 nil 校验日志\n - [#1742](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1742): 修复：types\u002Fstream：将 errorf 改为 warnf\n - [#1741](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1741): 修复：升级 github.com\u002Fc9s\u002Frequestgen 至 1.4.3\n - [#1740](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1740): 修复：升级 requestgen 并重新生成最大取消订单请求文件\n - [#1726](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1726): 依赖：将 morphy2k\u002Frevive-action 从 2.5.9 升级到 2.5.10\n - [#1735](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1735): 修复：配置环境\n - [#1724](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1724): 修复：修正切片初始化长度\n - [#1733](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1733): 修复：[bbgo] 修复默认值及初始化步骤\n - [#1732](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1732): 修复：修正环境变量名称\n - [#1728](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1728): 修复：[core] 修复内存泄漏\n - [#1731](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1731): 修复：修正 JSON 标签\n","2024-09-12T09:59:44",{"id":216,"version":217,"summary_zh":218,"released_at":219},71952,"v1.60.1","## 修复\n\n- 修复了 xmaker 的 bug\n- 更新了用于同步 CronJob 的 Helm Chart\n- 修复了最大存款 API\n\n[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.60.0...main)\n\n - [#1727](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1727)：修复：更新币安杠杆订单的 timeInForce 参数\n - [#1729](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1729)：修复：[max] 修复 v3 存款状态转换问题\n - [#1723](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1723)：修复：[xmaker] 避免从 0.0 信号中计算保证金\n - [#1721](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1721)：修复：[xmaker] 修复 aggregatePrice 方法\n - [#1725](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1725)：改进：[xmaker] 改进对冲保证金账户的杠杆计算\n - [#1722](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1722)：特性：[xmaker] 添加信号\n - [#1720](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1720)：特性：[xmaker] 改进保证金授信\n - [#1718](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1718)：特性：[xmaker] 增加更多配置指标\n - [#1719](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1719)：改进：[xmaker] 修复布林带价格计算\n - [#1709](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1709)：改进：[xmaker] 改进利润统计 ticker 并集成限流器\n - [#1708](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1708)：特性：[xmaker] 集成熔断机制\n - [#1712](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1712)：特性：[xmaker] 添加利润修正器\n - [#1710](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1710)：改进：[xmaker] 提高稳定性\n - [#1717](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1717)：重构：[xmaker] 重构对冲工作器和报价工作器\n - [#1716](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1716)：修复：[xmaker] 利润对象可能为 nil\n - [#1707](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1707)：修复：[xmaker] 仓位指标缺少标签\n - [#1715](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1715)：升级：[go] 升级过时的包\n - [#1713](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1713)：特性：[chart] 添加环境变量部分\n - [#1711](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1711)：特性：[binance] 新增杠杆订单副作用 AUTO_BORROW_REPAY\n - [#1705](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1705)：修复：[k8s] 修复 sync.enabled 选项\n - [#1704](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1704)：特性：[k8s] 添加用于同步的 CronJob\n - [#1700](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1700)：修复：[autobuy] 修复当布林带设置未配置时出现的错误\n - [#1703](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1703)：特性：[core] 添加仓位指标\n - [#1702](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1702)：改进：优化余额相关指标\n - [#1699](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1699)：重构：[twap] 升级 twap 命令并添加可选的订单更新限流器\n - [#1701](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1701)：发布：v1.60.0\n - [#1714](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1714)：依赖项：将 actions\u002Fsetup-node 从 2 升级到 4","2024-09-04T07:08:35",{"id":221,"version":222,"summary_zh":223,"released_at":224},71953,"v1.60.0","[完整变更日志](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.59.2...main)\n\n - [#1683](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1683): 依赖：将 codecov\u002Fcodecov-action 从 3 升级到 4\n - [#1680](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1680): 依赖：将 docker\u002Fsetup-buildx-action 从 1 升级到 3\n - [#1684](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1684): 依赖：将 docker\u002Fmetadata-action 从 3 升级到 5\n - [#1681](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1681): 依赖：将 actions\u002Fcheckout 从 2 升级到 4\n - [#1689](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1689): 修复：修复 float64 系列使用均值或标准差函数时结果为零的问题\n - [#1697](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1697): 功能：重新设计并重构 TWAP 订单执行器\n - [#1698](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1698): 功能：更新获取交易记录的 API\n - [#1692](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1692): 删除：移除 Python 相关内容\n - [#1693](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1693): 修复：修复 Binance 交易所查询期货订单的问题\n - [#1696](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1696): 修复：[core] setting.InitializeConverter 可能返回 nil 转换器对象\n - [#1695](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1695): 修复：[max] 修复 GetDepositHistoryRequest\n - [#1694](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1694): 修复：[max] 修复最大提现 API 参数问题\n - [#1691](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1691): 功能：[bitget] 将公共 WebSocket 升级至 v2 版本\n - [#1690](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1690): 功能：改进交易\u002F订单转换器\n - [#1688](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1688): 功能：[xdepthmaker] 分离对冲交易对\n - [#1685](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1685): 改进：[xalign] 改进通知功能\n - [#1679](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1679): 修复：[xalign] 修复最大提现历史记录 API 查询问题\n - [#1671](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1671): 依赖：将 morphy2k\u002Frevive-action 从 2.5.4 升级到 2.5.9\n - [#1672](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1672): 依赖：将 docker\u002Flogin-action 从 1 升级到 3\n - [#1674](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1674): 依赖：将 docker\u002Fsetup-qemu-action 从 1 升级到 3\n - [#1676](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1676): 依赖：将 docker\u002Fbuild-push-action 从 2 升级到 6\n - [#1677](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1677): 依赖：将 golangci\u002Fgolangci-lint-action 从 4 升级到 6\n - [#1678](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1678): 功能：[xalign] 添加提现检测功能\n - [#1673](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1673): 依赖：将 actions\u002Fsetup-go 从 4 升级到 5\n - [#1675](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1675): 依赖：将 actions\u002Fcache 从 2 升级到 4\n - [#1670](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1670): CI：创建 .github\u002Fdependabot.yml 文件\n - [#1669](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1669): 功能：[max] 更新 MAX API 的 URL\n - [#1668](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1668): 重构：支持自定义按列排序\n - [#1663](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1663): 修复：[rebalance] 将数量向下取整\n - [#1667](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1667): 修复：[common] 修复利润固定器批量查询问题\n - [#1666](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1666): 功能：[liqmaker] 增加专业版","2024-08-21T06:53:25",{"id":226,"version":227,"summary_zh":228,"released_at":229},71954,"v1.59.2","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.59.1...main)\n\n - [#1636](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1636): fix: tg order decimal\n - [#1633](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1633): FIX: fix strategy initialization\n - [#1634](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1634): FIX: [dca2] fix triggerNextState loop side effect\n - [#1635](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1635): FIX: [okx] update okx symbols\n - [#1632](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1632): FIX: disable bbgo.sync in common strategy to fix xgap\n - fixed liquiditymaker book subscription\n - added retry backoff to deposit2transfer\n","2024-05-20T10:42:20",{"id":231,"version":232,"summary_zh":233,"released_at":234},71955,"v1.59.1","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.59.0...main)\n\n## Fixes\n\n- liquiditymaker: fix dust quantity orders\n","2024-05-14T09:45:16",{"id":236,"version":237,"summary_zh":238,"released_at":239},71956,"v1.59.0","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.58.0...main)\n\n - [#1629](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1629): REFACTOR: [dca2] refactor dca2 strategy to make it can back testing\n - [#1630](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1630): FIX: [liquiditymaker] fix cancel all orders\n - [#1628](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1628): FIX: [atrpin] sync position to redis\n - [#1627](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1627): FEATURE: [grid2] use feeProcessing field to make sure the trading fee…\n - [#1626](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1626): FEATURE: [dca2] make QueryOrderTradesUntilsuccessful take feeProcessi…\n - [#1618](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1618): CHORE: [atrpin] add submitting log\n - [#1619](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1619): chore: fix some comments\n - [#1620](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1620): REFACTOR: move logErr to util\n - [#1622](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1622): FEATURE: [dca2] emit position after recovery and refactor\n - [#1623](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1623): FEATURE: [liquiditymaker] limit adjustment order quantity\n - [#1621](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1621): FEATURE: [dca2] add position callback\n - [#1617](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1617): MINOR: [dca2] refactor and make open-position interval longer\n - [#1616](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1616): FEATURE: [dca2] recollect position before placing the take-profit order\n - [#1609](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1609): FEATURE: emit position when position updated and reset\n - [#1615](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1615): FIX: fix dca2 panic problem\n - [#1612](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1612): FIX: [grid2] fix issue when recovering with finalizing orders\n - [#1614](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1614): FEATURE: [max] add fee processing field\n - [#1611](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1611): FEATURE: [dca2] new flag EnableQuoteInvestmentReallocate to decide if…\n - [#1605](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1605): support Binance paper trading for sync sub-command\n - [#1606](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1606): FIX: issue #1037, get-order command error\n - [#1608](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1608): FIX: [xalign] fix buy side max amount\n - [#1599](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1599): FEATURE: [dca2] when all open-position orders are filled, place the t…\n - [#1601](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1601): add vscode launch setting for easier run \u002F debug\n - [#1595](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1595): REFACTOR: [max] simplify max query ticker\n - [#1602](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1602): DOC: add rebalance doc\n - [#1604](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1604): FEATURE:[indicator] add adx indicator\n - [#1603](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1603): consistent config param for all sub-commands\n - [#1596](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1596): \n - [#1600](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1600): update default value for config param of backtest cmd to have same value with root cmd\n - [#1597](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1597): FEATURE: close short positions with ClosePosition\n","2024-05-14T07:20:46",{"id":241,"version":242,"summary_zh":243,"released_at":244},71957,"v1.58.0","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.57.0...main)\n\n - [#1593](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1593): FIX: [xalign] add more complex test case for xalign strategy\n - [#1594](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1594): FIX: [dca2] fix order group id not set issue\n - [#1589](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1589): FEATURE: [dca2] add ttl for persistence and nextRoundPaused flag\n - [#1592](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1592): FIX: [xalign] correct the base\u002Fquote currency balance name when it's reversed\n - [#1591](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1591): FIX: [okx] update okx url\n - [#1586](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1586): IMPROVE: [dca2] new struct RoundCollector for testing and use flag to decide re…\n - [#1587](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1587): FIX: [xtri] remove repetitive words\n - [#1582](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1582): Fix: Restore parameters when update active order book\n - [#1588](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1588): FIX: [xalign] check if the quote balance will be used up and below the expected balance\n - [#1585](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1585): FIX: [xalign] fix reversed market\n - [#1584](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1584): MINOR: [dca2] use GeneralBackoff not GeneralLiteBackoff\n - [#1583](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1583): FEATURE: [okx] query recent trades\n - [#1580](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1580): FIX: [dca2] must calculate and emit profit at the end of the round\n - [#1581](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1581): MINOR: [okx][bitget] remove the query after place order\n - [#1579](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1579): CHORE: [xgap] subscribe to level 5 book\n - [#1575](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1575): FEATURE: [bbgo] add ExchangePublic\n - [#1578](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1578): FIX: [okx] remove the query after place order\n - [#1577](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1577): FIX: [bitget] fix post only order\n - [#1576](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1576): MINOR: [dca2] add more log and retry\n - [#1574](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1574): MINOR: [dca2] remove debug log\n - [#1572](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1572): TEST: [bitget] add test to query trades, cancel orders, closed orders\n - [#1573](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1573): CHORE: [max] adjust max order limiter\n - [#1569](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1569): FIX: fix some typos\n - [#1571](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1571): FIX: [rebalance] fix cannot lock fund\n - [#1570](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1570): MINOR: add log when there is error at calculating and emit profit\n - [#1568](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1568): FIX: [xfunding] add many fixes and improvements\n - [#1563](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1563): TEST: [bitget] add market\u002Flimit maker tests for place order\n - [#1567](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1567): REFACTOR: refactor profit fixer\n - [#1565](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1565): TEST: [bitget] add more tests for query open orders\n - [#1566](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1566): FIX: [xdepthmaker] fix crash\n - [#1564](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1564): FIX: [xdepthmaker] fix use of uninitialized vars\n - [#1561](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1561): FIX: [bitget] support market order on bitget unfilled order conversion\n - [#1562](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1562): FIX: [xdepthmaker] add disableHedge option and put profix fixer before Initialize()\n - [#1560](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1560): TEST: [bitget] add tests for query account, place order\n - [#1559](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1559): FEATURE: [xdepthmaker] add profit fixer\n - [#1558](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1558): TEST: [bitget] add test for kline and ticker\n - [#1556](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1556): TEST: [bitget] add tests for query markets\n - [#1540](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1540): MINOR: [dca2] add metrics for dca2\n - [#1555](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1555): FIX: [bbgo] use origin order if error occurred\n - [#1554](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1554): MINOR: [bbgo] add more logs\n - [#1549](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1549): FIX: [exit] Use configuration instead of kine fixed interval\n - [#1550](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1550): FEATURE: [rebalance] add balance type\n - [#1552](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1552): FIX: [dca2] all the profit will use in the first order of the next round\n - [#1553](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1553): FEAT: Add SMMA indicator\n - [#1551](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1551): DELETE: [okx] rm redundant codes\n - [#1545](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1545): FEATURE: add universal cancel all orders api helper\n","2024-03-19T09:01:07",{"id":246,"version":247,"summary_zh":248,"released_at":249},71958,"v1.57.0","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.56.2...main)\n\n - [#1548](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1548): MINOR: [bitget] refactor log\n - [#1541](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1541): FEATURE: [rebalance] add price type\n - [#1547](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1547): REFACTOR: move trading related utility functions to the tradingutil package\n - [#1546](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1546): FEATURE: add exchange field to types.Market\n - [#1544](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1544): FIX: [bitget] batch subscribe channel\n - [#1542](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1542): FIX: [bitget] use new size instead of size\n - [#1531](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1531): improve: [deposit2transfer] improve deposit logging\n - [#1534](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1534): FIX: [okx] refine okx rate limiter\n - [#1539](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1539): FIX: add check for order pointer\n - [#1538](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1538): FIX: [retry] fix and improve QueryOrderUntilFilled status check\n - [#1537](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1537): FIX: [slacknotifier] handle slack.Attachment pointer\n - [#1536](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1536): MINOR: [okx] print more logs\n - [#1535](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1535): FIX: [okx] allow char in place order\n - [#1533](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1533): DOC: update indicator documents for v2\n - [#1530](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1530): FIX: [okx] fix trade id\n - [#1529](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1529): CHORE: [atrpin] modify log again\n - [#1528](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1528): REFACTOR: [binance] rewrite binance depth requestgen\n - [#1527](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1527): CHORE: [atrpin] modify position log\n - [#1526](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1526): FIX: simplify booksignal struct\n - [#1525](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1525): FEATURE: [binance] add margin request\n - [#1515](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1515): [dca2] add dev mode field for dev\n - [#1524](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1524): MINOR: [binance] update borrow\u002Frepay api changes\n - [#1523](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1523): MAJOR: [binance] replace margin\u002Ftransfer to asset\u002Ftransfer\n - [#1520](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1520): FEATURE: [okx] add response validation func\n - [#1522](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1522): FEATURE: [INDICATOR] keltner channel\n - [#1521](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1521): FIX: [telegram] prevent sending error to telegram for the case of no opened position\n - [#1519](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1519): FEATURE: [okx] support kline subscriptions\n - [#1514](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1514): FEATURE: [okx] add new kline stream\n - [#1507](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1507): REFACTOR: [okx] refactor kline api\n","2024-02-27T14:26:44",{"id":251,"version":252,"summary_zh":253,"released_at":254},71959,"v1.56.2","## Fixes\n\n- Added the missing debug.go files\n\n[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.56.1...main)\n\n","2024-01-29T10:01:05",{"id":256,"version":257,"summary_zh":258,"released_at":259},71960,"v1.56.1","## Fixes\n\n- fixed backtest Initialize() call\n\n[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.56.0...main)\n\n","2024-01-28T06:54:51",{"id":261,"version":262,"summary_zh":263,"released_at":264},71961,"v1.56.0","\n## Fixes\n\n- fixed bollmaker indicator history kline subscription\n- fixed dca2 bug\n- fixed xgap bugs\n- fixed rebalance strategy positions\n- fixed common strategy persistence issue\n\n## Features\n\n- upgraded rockhopper to v2 to support multi external migration packages\n- added and improved okex exchange integration\n- added inventory skew\n\n\n[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.55.4...main)\n\n - [#1512](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1512): FIX: [bollmaker] fix bollinger indicator history kline push\n - [#1511](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1511): MINOR: compile and update migration package\n - [#1509](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1509): [dca2] fix dca2 bug\n - [#1510](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1510): feature: support extra migration packages\n - [#1508](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1508): FIX: [okx] fix query open order time param\n - [#1506](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1506): FEATURE: upgrade migration tool rockhopper to v2\n - [#1505](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1505): FIX: [okx] add cash trade mode to place order param\n - [#1504](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1504): FEATURE: [okx] set ping interval\n - [#1502](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1502): REFACTOR: [okx] refactor order trade event by json.Unmarshal\n - [#1503](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1503): FEATURE: [okx] emit balance snapshot after authenticated\n - [#1501](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1501): FEATURE: [okx] fix queryTrades and queryOrderTrade api\n - [#1500](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1500): FEATURE: [okx] refactor query closed order\n - [#1498](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1498): FEATURE: [okx] support query open orders\n - [#1497](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1497): FEATURE: [okx] generate cancel order by requestgen\n - [#1494](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1494): FEATURE: [okx] generate place order request by requestgen\n - [#1496](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1496): FEATURE: [okx] support Unsubscription and Resubscription\n - [#1474](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1474): FEATURE: [dca2] add callbacks and shutdown function\n - [#1491](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1491): DOCS: Translate the README into zh-TW\n - [#1495](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1495): DOCS: fix frontend path\n - [#1493](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1493): FEATURE: [okx] generate account info request by requestgen\n - [#1492](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1492): FEATURE: [okx] generate ticker request by requestgen\n - [#1489](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1489): REFACTOR: [okx] refactor account info\n - [#1490](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1490): REFACTOR: [okx] query markets\n - [#1486](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1486): FEATURE: [okx] support market trade streaming\n - [#1488](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1488): FEATURE: [autoborrow] add margin repay alert\n - [#1485](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1485): CHORE: [xgap] print currency when insufficient balance\n - [#1487](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1487): FIX: [bitget] ignore offline symbols\n - [#1477](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1477): REFACTOR: [okx] refactor book and kline\n - [#1484](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1484): FEATURE: [xgap] check balance before placing orders\n - [#1482](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1482): CHORE: [xgap] improve log message\n - [#1483](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1483): CHORE: rename cronExpression to schedule\n - [#1402](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1402): FEATURE: inventory skew\n - [#1480](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1480): REFACTOR: [xgap] refactor with common strategy\n - [#1481](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1481): FIX: specify the version of morphy2k\u002Frevive-action to 2.5.4\n - [#1475](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1475): REFACTOR: [rebalance] refactor MultiMarketStrategy.Initialize\n - [#1479](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1479): FIX: [xgap] fix order cancel error\n - [#1470](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1470): FEATURE: [xnav] add cron schedule\n - [#1476](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1476): CHORE: [okex] add stream test for book\n - [#1456](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1456): FEATURE: [bitget] get account assets\n - [#1467](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1467): WIP: feature: sync futures data and backtest with them\n - [#1473](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1473): FEATURE: remove Short\n - [#1468](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1468): FEATURE: add autobuy strategy\n - [#1464](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1464): FEATURE: [dca2] run state machine\n - [#1471](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1471): FEATURE: add DisableMarketDataStore option\n - [#1472](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1472): FIX: [grid2] subscribe 1m kline only when one of the trigger price is set\n - [#1463](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1463): FEATURE: [bollmaker] add emaCross signal\n - [#1465](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1465): FIX: [rebalance] fix position map and profit stats map\n","2024-01-26T09:06:15",{"id":266,"version":267,"summary_zh":268,"released_at":269},71962,"v1.55.4","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.55.3...main)\n\n - [#1466](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1466): FIX: [xdepthmaker] remove shared trade collector and fix hedge\n - [#1393](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1393): STRATEGY: add emacross strategy\n - [#1462](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1462): FEATURE: [bollmaker] support custom quantity\n","2023-12-20T15:11:22",{"id":271,"version":272,"summary_zh":273,"released_at":274},71963,"v1.55.3","[Full Changelog](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fcompare\u002Fv1.55.2...main)\n\n - [#1461](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1461): FIX: [xdepthmaker] fix double binding\n - [#1460](https:\u002F\u002Fgithub.com\u002Fc9s\u002Fbbgo\u002Fpull\u002F1460): FIX: fix and improve session UpdatePrice method\n","2023-12-18T15:00:04"]