{"id":42804881,"url":"https://github.com/bhomnick/bexchange","last_synced_at":"2026-01-30T03:53:30.436Z","repository":{"id":57508598,"uuid":"107518801","full_name":"bhomnick/bexchange","owner":"bhomnick","description":"A simple limit order book implemented in Go","archived":false,"fork":false,"pushed_at":"2017-10-29T08:04:06.000Z","size":10,"stargazers_count":24,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-20T11:45:55.491Z","etag":null,"topics":["exchanges","go","golang","trading"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhomnick.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}},"created_at":"2017-10-19T08:25:21.000Z","updated_at":"2024-03-15T00:10:58.000Z","dependencies_parsed_at":"2022-09-13T08:01:57.763Z","dependency_job_id":null,"html_url":"https://github.com/bhomnick/bexchange","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhomnick/bexchange","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhomnick%2Fbexchange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhomnick%2Fbexchange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhomnick%2Fbexchange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhomnick%2Fbexchange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhomnick","download_url":"https://codeload.github.com/bhomnick/bexchange/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhomnick%2Fbexchange/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28900380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T03:36:35.398Z","status":"ssl_error","status_checked_at":"2026-01-30T03:36:34.949Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["exchanges","go","golang","trading"],"created_at":"2026-01-30T03:53:29.891Z","updated_at":"2026-01-30T03:53:30.431Z","avatar_url":"https://github.com/bhomnick.png","language":"Go","readme":"# bexchange\n\n[![Build Status](https://travis-ci.org/bhomnick/bexchange.svg?branch=master)](https://travis-ci.org/bhomnick/bexchange)\n\nThe `bexchange` package is a simple limit order book implemented as a go exercise. Currently limit buys, sells, and order cancellation are all supported.  \n\n## Example\n\n```go\npackage main\n\nimport (\n    bx \"github.com/bhomnick/bexchange\"\n)\n\nfunc main() {\n    actions := make(chan *bx.Action)\n    done := make(chan bool)\n\n    go bx.ConsoleActionHandler(actions, done)\n\n    ob := bx.NewOrderBook(actions)\n    ob.AddOrder(bx.NewOrder(1, false, 50, 50))\n    ob.AddOrder(bx.NewOrder(2, false, 45, 25))\n    ob.AddOrder(bx.NewOrder(3, false, 45, 25))\n    ob.AddOrder(bx.NewOrder(4, true, 55, 75))\n    ob.CancelOrder(1)\n    ob.Done()\n\n    \u003c-done\n}\n```\n\nAs the order book receives commands it generates action messages that needed to be handled to ensure durability. Two channels are used in this example: \n\n- The `actions` channel is written to by the order book and read by an action handler. For debugging purposes a `ConsoleActionHandler` is included that simply prints actions to the console as they arrive.\n- When the `Done` command is issued the program should block on the action handler to finish processing outstanding actions. The `done` channel allows this syncrhonization.\n\n## Future features\n\n- Serialize orderbook reads and writes to add consistency across trader clients\n- Add a websocket layer and web interface \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhomnick%2Fbexchange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhomnick%2Fbexchange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhomnick%2Fbexchange/lists"}