{"id":19476230,"url":"https://github.com/pgaref/orderbook","last_synced_at":"2025-04-25T14:32:16.980Z","repository":{"id":74272651,"uuid":"176708998","full_name":"pgaref/orderbook","owner":"pgaref","description":"OrderBook Simulator with Limit and Iceberg functionality","archived":false,"fork":false,"pushed_at":"2019-03-20T13:09:11.000Z","size":1641,"stargazers_count":75,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T22:41:44.819Z","etag":null,"topics":["hft-trading","matching-engine","order","orderbook","python","trading"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/pgaref.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":"2019-03-20T10:25:57.000Z","updated_at":"2025-03-23T20:39:44.000Z","dependencies_parsed_at":"2023-07-12T05:00:24.402Z","dependency_job_id":null,"html_url":"https://github.com/pgaref/orderbook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2Forderbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2Forderbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2Forderbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaref%2Forderbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgaref","download_url":"https://codeload.github.com/pgaref/orderbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250834156,"owners_count":21494920,"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":["hft-trading","matching-engine","order","orderbook","python","trading"],"created_at":"2024-11-10T19:37:41.448Z","updated_at":"2025-04-25T14:32:16.965Z","avatar_url":"https://github.com/pgaref.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OrderBook\nOrderBook Simulator with Limit and Iceberg functionality\n\n## Design\nProof of concept of a Limit Order Book (LOB)\nwhere the bid and ask order books are implemented as separate trees.\nInspired by the [Limit Book] blog post by Selph where limit levels\nare stored as nodes inside the trees and each node is a doubly-linked list of orders, sorted chronologically.\n\n## Structure\n* Source code stored under `orderbook/src/`\n* Tests stored under `test/`\n\n## Install\n* `python setup.py install`\n\n## Run\n* `runner.py \u003c data/ordersSimple.dat`\n\n## Test\n* Single: `python -m unittest test.testPriceTree`\n* All: `python -m unittest discover`\n\n\n## Notes\n* An order book is an electronic list of buy and sell orders for a security or other instrument organized by price level\n* Order books are used by almost every exchange for various assets like stocks, bonds, currencies, and even cryptocurrencies\n* These lists help improve market transparency as they provide information on price, availability, depth of trade, and who initiates transactions\n* There are three parts to an order book: buy orders, sell orders, and order history\n* =\u003e A limit order to sell is called an \"ask\".\n* Iceberg order is a conditional request made to the broker/system to buy or sell a large required quantity of stock, but in smaller predetermined quantity\n\n## Best practices\n*  Separate the intentions of a trading model–such as “place limit orders at $10.15 and $10.10″ from the resulting actual positions\n*  The data structure chosen to represent the limit order book will be the primary source of market information\n\n\n\n## References\n* [OrderBook](https://www.investopedia.com/terms/o/order-book.asp)\n* [OrderBook Programming](https://web.archive.org/web/20161116104649/http://rgmadvisors.com/problems/orderbook/)\n* [Building a Trading System](https://web.archive.org/web/20110219163418/http://howtohft.wordpress.com/2011/02/15/building-a-trading-system-general-considerations/)\n* [Limit Book](https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-to-build-a-fast-limit-order-book/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaref%2Forderbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgaref%2Forderbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaref%2Forderbook/lists"}