{"id":13616328,"url":"https://github.com/yzimhao/trading_engine","last_synced_at":"2025-04-14T00:32:06.863Z","repository":{"id":37637793,"uuid":"495734749","full_name":"yzimhao/trading_engine","owner":"yzimhao","description":"Go开发的金融证券交易系统","archived":false,"fork":false,"pushed_at":"2024-10-29T15:11:26.000Z","size":34075,"stargazers_count":211,"open_issues_count":0,"forks_count":59,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-11-02T06:58:35.916Z","etag":null,"topics":["matching","matching-engine","trading"],"latest_commit_sha":null,"homepage":"https://yzimhao.github.io/trading_engine/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yzimhao.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-24T08:29:19.000Z","updated_at":"2024-10-29T15:11:31.000Z","dependencies_parsed_at":"2024-06-18T09:43:17.583Z","dependency_job_id":"058f2340-b135-4aa0-936b-284b1e3a4652","html_url":"https://github.com/yzimhao/trading_engine","commit_stats":null,"previous_names":["yzimhao/trading-engine"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzimhao%2Ftrading_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzimhao%2Ftrading_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzimhao%2Ftrading_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yzimhao%2Ftrading_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yzimhao","download_url":"https://codeload.github.com/yzimhao/trading_engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223611922,"owners_count":17173535,"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":["matching","matching-engine","trading"],"created_at":"2024-08-01T20:01:26.980Z","updated_at":"2024-11-08T00:31:20.472Z","avatar_url":"https://github.com/yzimhao.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/yzimhao/trading_engine?style=social\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/yzimhao/trading_engine?style=social\"\u003e\n\t\u003cimg src=\"https://img.shields.io/github/issues/yzimhao/trading_engine\"\u003e\n\t\u003cimg src=\"https://img.shields.io/github/repo-size/yzimhao/trading_engine\"\u003e\n\t\u003cimg src=\"https://img.shields.io/github/license/yzimhao/trading_engine\"\u003e\n\u003c/p\u003e\n\n\n#### 贡献代码\n  全新重构，希望更多开源爱好者能加入共同开发练手，共同进步，请联系下方wx\n\n#### 撮合\n```\n    go get github.com/yzimhao/trading_engine/v2/pkg/matching\n```\n#### pkg example\n```go\n    ctx := context.Background()\n    opts := []matching.Option{\n        matching.WithPriceDecimals(2),\n        matching.WithQuantityDecimals(2),\n    }\n    btcusdt = matching.NewEngine(ctx, \"btcusdt\", opts...)\n\n    //添加订单\n    btcusdt.AddItem(...)\n    //移除订单\n    btcusdt.RemoveItem(...)\n\n    //监听事件结果\n    btcusdt.OnTradeResult(func(result types.TradeResult) {\n        //TODO\n    })\n    btcusdt.OnRemoveResult(func(result types.RemoveResult) {\n        //TODO\n    })\n\n    //获取深度\n    btcusdt.GetAskOrderBook(10) // [][2]string [[\"1.01\",\"4.00\"],[\"1.10\",\"2.00\"]]\n    btcusdt.GetBidOrderBook(10)\n\n```\n\n\n \n  #### 交流\n\u003cimg src=\"https://github.com/yzimhao/trading_engine/blob/main/documents/images/wechat.jpg?raw=true\" width = \"150\"/\u003e\n\n  #### Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=yzimhao/trading_engine\u0026type=Date)](https://star-history.com/#yzimhao/trading_engine\u0026Date)\n\n![Visitor's Count](https://profile-counter.glitch.me/yzimhao_trading_engine/count.svg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyzimhao%2Ftrading_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyzimhao%2Ftrading_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyzimhao%2Ftrading_engine/lists"}