{"repo":"pseudocodes/goctp_l3_estimate","free":true,"listed":false,"github":"https://github.com/pseudocodes/goctp_l3_estimate","clone":"git clone https://github.com/pseudocodes/goctp_l3_estimate.git","description":"国内 CTP 期货期权订单簿 L3 可视化工具","language":"Go","stars":23,"topics":["ctp","futures","goctp","orderbook","orderbook-tick-data","trading"],"license":"MIT","category":"trading","readme_excerpt":"CTP L3 订单簿估算器 一个基于 Go 实现的实时 L3 订单簿可视化工具，用于国内期货期权合约，它尝试从 L2 市场深度数据重建单个订单队列。提供交互式可视化功能。 基于 @jose-donato 的实现：binancef l3 estimate go ✨ 特性 🎯 核心 L3 重建 - 从 L2 数据实时重建单个订单队列 - 基于 FIFO 的队列管理与智能订单匹配 - 精确的小数运算，防止浮点错误 - 支持上期 CTP 提供的合约行情数据 🎨 高级可视化 - 基于年龄的着色 ：颜色越深 = 订单越旧（队列靠前） - 基于聚类的着色 ：每个订单大小聚类使用不同颜色 - 特殊高亮 ：最大和第二大订单使用金色高亮 📊 交互式前端 - 实时 D3.js 堆叠条形图 - 综合订单簿表格视图 - 队列可视化与单个订单条 - 交易对切换与实时更新 - 响应式设计，针对交易工作流优化 🚀 快速开始 选项 1: 使用运行脚本 (推荐) Option 2: Direct Go command Then open http://localhost:8080 in your browser. 📡 WebSocket API The application exposes a WebSocket API for programmatic control: 🏗️ Architecture 🔬 L3 重建算法细节 该算法采用多种策略以准确还原订单队列： 1. 新增订单 ：新订单插入队列尾部（FIFO） 2. 移除订单 ： - 优先尝试精确匹配（如取消） - 数量变化较大时 → 移除最大订单 - 数量变化较小时 → 从队头依次移除 3. 队列维护 ：定期优化队列并更新订单年龄 指标追踪：全面的队列分析与统计 📦 Dependencies - Backend : Go 1.23+, gorilla/websocket, shopspring/decimal, pseudocodes/go2ctp - Frontend : D3.js v7, vanilla JavaScript - Data Source : Hongyuan Futures CTP, openctp.cn/DataCenter.html 📄 License MIT License - see LICENSE file for details.","default_branch":null,"files":null,"tree":[],"storefront":"/r/pseudocodes","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pseudocodes/goctp_l3_estimate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}