{"id":13460934,"url":"https://github.com/kungfu-origin/kungfu","last_synced_at":"2025-05-14T14:07:24.739Z","repository":{"id":37193572,"uuid":"110795721","full_name":"kungfu-origin/kungfu","owner":"kungfu-origin","description":"Kungfu Trader","archived":false,"fork":false,"pushed_at":"2024-05-02T17:30:58.000Z","size":174268,"stargazers_count":3551,"open_issues_count":10,"forks_count":1142,"subscribers_count":287,"default_branch":"main","last_synced_at":"2025-04-12T13:57:33.413Z","etag":null,"topics":["ctp","hft","kungfu","low-latency","quantitative-trading","xtp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kungfu-origin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-15T06:54:01.000Z","updated_at":"2025-04-12T10:34:11.000Z","dependencies_parsed_at":"2024-02-28T02:19:46.296Z","dependency_job_id":"3df63ea9-933f-4ff0-a061-5b496349a1d6","html_url":"https://github.com/kungfu-origin/kungfu","commit_stats":null,"previous_names":["taurusai/kungfu"],"tags_count":453,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kungfu-origin%2Fkungfu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kungfu-origin%2Fkungfu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kungfu-origin%2Fkungfu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kungfu-origin%2Fkungfu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kungfu-origin","download_url":"https://codeload.github.com/kungfu-origin/kungfu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159193,"owners_count":22024558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctp","hft","kungfu","low-latency","quantitative-trading","xtp"],"created_at":"2024-07-31T10:00:51.125Z","updated_at":"2025-05-14T14:07:24.679Z","avatar_url":"https://github.com/kungfu-origin.png","language":"C++","funding_links":[],"categories":["Trading System","C++","金融股票"],"sub_categories":["Traditional Market","网络服务_其他"],"readme":"# Intro 简介\n\n[功夫核心库](https://libkungfu.cc) 是专为量化交易者设计的开源交易执行系统。功夫想要解决以下问题：\n* 低延迟交易 - 量化交易者对系统内响应速度有极高要求，功夫提供微秒级别的系统响应，支持带纳秒级时间戳的交易数据实时存储和盘后分析。\n* 开放的策略编写方式 - 功夫支持 Python 3 及 C++ 形式的策略编写，策略师可以不受限的自由使用第三方计算库，放飞创意。\n* 友好的使用方式 - 告别 Linux shell 小黑屋，功夫提供图形化操作界面，简化策略运维流程。而进阶用户仍然具备通过底层 API 以无界面形式使用系统的能力。\n* 跨平台运行 - 三大主流平台（Windows、MacOSX、Linux）皆可编译运行。\n\n功夫系统架构如下：\n* 后台核心（C++）\n  * 长拳（longfist） - 金融交易相关的数据格式定义，提供涵盖 c++/python/javascript/sqlite 的序列化支持。\n  * 易筋经（yijinjing） - 专为金融交易设计的超低延迟时间序列内存数据库，提供纳秒级时间精度，可落地交易相关的全部数据。\n  * 咏春（wingchun） - 策略执行引擎，提供策略开发接口，实时维护策略账目及持仓情况。\n* 策略接口（C++/Python）\n  * [RxCpp](https://github.com/ReactiveX/RxCpp) - 响应式事件处理框架，可对丰富数据类型的金融交易数据进行灵活处理。\n  * numpy/pandas - 自带的 Python 运行环境原生提供 numpy/pandas 等工具供策略使用。\n* 前端UI（Node.js）\n  * [Electron](https://electronjs.org) - 跨平台的桌面应用开发框架\n  * [Vue.js](https://vuejs.org) - UI开发框架\n\n功夫在系统设计上支持任意柜台的对接（涵盖中国所有股票、期货市场），功夫开源版提供 [XTP](https://xtp.zts.com.cn/) 柜台对接的参考实现。\n如果需要接入更多柜台请至 [功夫量化](https://www.kungfu-trader.com) 下载标准版或联系我们。\n\n初次使用请参考 [功夫核心库文档](https://docs.libkungfu.cc)。\n\n# License\n\nApache License 2.0\n\n# Setup 编译及运行环境\n\n功夫的编译依赖以下工具：\n\n* 支持 C++20 的编译器\n* [cmake](https://cmake.org/) (\u003e=3.15)\n* [Node.js](https://nodejs.org/) (^14.x)\n* [yarn](https://classic.yarnpkg.com/) (^1.x)\n* [Python 3](https://www.python.org/) (~3.9)\n* [pipenv](https://pipenv.pypa.io/) (\u003e=2023.9.1)\n\n开始编译前，请先确保安装以上工具，且正确设置 PATH 环境变量。\n\n# Compile 编译\n\n#### 常规操作\n\n获取代码并编译(必须用git方式获取代码，功夫编译需要获取git仓库的版本信息）：\n```\n## git clone kungfu repo\n$ cd kungfu\n$ yarn install --frozen-lockfile\n$ yarn build\n$ yarn package\n```\n\n编译结果输出在 artifact/build 目录下。\n\n遇到编译问题需要完整的重新编译时，执行以下命令：\n```\n$ yarn rebuild\n$ yarn package\n```\n\n#### 编译过程产生的临时文件\n\n编译过程会在代码所在目录下生成如下临时文件：\n```\nnode_modules\n**/node_modules\n**/build\n**/dist\n```\n\n通常情况下可通过执行如下命令对 build 和 dist 进行清理：\n```\n$ yarn clean\n```\n需要注意 node_modules 目录为 yarn 产生的包目录，一般情况下无需清除，如有特殊需要可手动删除。\n\n另外，编译过程中会在系统的以下路径产生输出：\n```\n$HOME/.conan                        # [conan](https://conan.io/center/) 的配置信息以及其存储的 C++ 依赖包\n$HOME/.cmake-js                     # [cmake.js](https://www.npmjs.com/package/cmake-js) 存储的 C++ 依赖包\n$HOME/.virtualenvs                  # pipenv(windows) 存储的 Python 依赖\n$HOME/.local/share/virtualenvs      # pipenv(unix) 存储的 Python 依赖\n```\n如果需要清理这些文件，都需要手动删除。\n\n# Help 帮助信息\n\n更多信息请访问网站 [功夫核心库](https://libkungfu.cc) 及 [功夫量化](https://www.kungfu-trader.com)。\n\n微信公众号：功夫量化\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkungfu-origin%2Fkungfu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkungfu-origin%2Fkungfu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkungfu-origin%2Fkungfu/lists"}