{"id":26320899,"url":"https://github.com/pprunty/clunk","last_synced_at":"2025-03-15T16:15:26.032Z","repository":{"id":276981533,"uuid":"930938355","full_name":"pprunty/clunk","owner":"pprunty","description":"clunk","archived":false,"fork":false,"pushed_at":"2025-03-14T14:27:42.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T15:36:31.723Z","etag":null,"topics":["coinbase-api","cpp17","high-performance-computing","order-book","trading"],"latest_commit_sha":null,"homepage":"","language":"C++","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/pprunty.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":"2025-02-11T13:11:51.000Z","updated_at":"2025-03-14T14:27:46.000Z","dependencies_parsed_at":"2025-02-14T05:00:58.144Z","dependency_job_id":null,"html_url":"https://github.com/pprunty/clunk","commit_stats":null,"previous_names":["pprunty/clunk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprunty%2Fclunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprunty%2Fclunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprunty%2Fclunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprunty%2Fclunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pprunty","download_url":"https://codeload.github.com/pprunty/clunk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243754097,"owners_count":20342543,"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":["coinbase-api","cpp17","high-performance-computing","order-book","trading"],"created_at":"2025-03-15T16:15:25.462Z","updated_at":"2025-03-15T16:15:26.022Z","avatar_url":"https://github.com/pprunty.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clunk: High-Frequency Trading Order Book Visualizer\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pprunty/clunk/main/docs/logo.png\" alt=\"Clunk Logo\" width=\"300\"/\u003e\n  \u003ch3\u003eC++ Low-Latency Unified Networked Orderbook Kit\u003c/h3\u003e\n  \u003cp\u003eMicrosecond-level order book processing for professional quantitative trading\u003c/p\u003e\n\u003c/div\u003e\n\n## Overview\n\nClunk is a high-performance order book visualization system designed for quantitative trading applications. Built with C++ for optimal performance, Clunk connects to exchange market data feeds and provides real-time analysis with professional trading metrics.\n\n### Key Features\n\n- **Low-Latency Processing**: Built with C++ for microsecond-level processing times\n- **Real-Time Market Data**: Direct connection to Coinbase exchange market data feeds\n- **Advanced Market Microstructure Metrics**: \n  - Order book imbalance analysis\n  - Market pressure indicators \n  - VWAP (Volume-Weighted Average Price)\n  - Liquidity depth measurements\n  - Price impact estimation\n  - Spread analytics (absolute and basis points)\n- **Performance Analytics**: \n  - Update frequency metrics\n  - Processing latency measurements\n- **Visual Change Detection**: Color-coded highlighting of price and size changes for tick-by-tick visualization\n- **Cross-Platform**: Runs on macOS, Linux, and Windows\n\n## Screenshots\n\n![Clunk Order Book Visualization](https://raw.githubusercontent.com/pprunty/clunk/main/docs/screenshot.png)\n\n## Market Metrics Explained\n\nFor quantitative traders, Clunk provides essential metrics to inform trading decisions:\n\n| Metric | Description | Trading Significance |\n|--------|-------------|----------------------|\n| Order Book Imbalance | Ratio of bid volume to ask volume | Values above 1.0 indicate higher buying pressure; useful for predicting short-term price movements |\n| Market Pressure | Normalized (-1.0 to 1.0) representation of order book imbalance | Positive values indicate buying pressure; negative values indicate selling pressure |\n| Spread (bps) | Bid-ask spread in basis points (1bp = 0.01%) | Key liquidity indicator and cost metric for market makers |\n| Liquidity Depth | Available volume within 0.5% of best bid/ask | Provides insight into market depth and potential slippage |\n| Price Impact | Estimated price movement from a 1% market order | Useful for determining optimal order sizes and estimating execution cost |\n| VWAP | Volume-Weighted Average Price for bids and asks | Important benchmark for algorithmic trading strategies |\n\n## Quickstart Guide\n\n### Installation Requirements\n\n- C++17 compatible compiler\n- CMake 3.15 or higher\n- vcpkg package manager\n- Boost libraries (installed via vcpkg)\n- nlohmann_json (installed via vcpkg)\n- OpenSSL (installed via vcpkg)\n\n### Clone and Build\n\n```bash\n# Clone the repository\ngit clone https://github.com/pprunty/clunk.git\ncd clunk\n\n# Initialize vcpkg (if needed)\ngit clone https://github.com/Microsoft/vcpkg.git\n./vcpkg/bootstrap-vcpkg.sh\n\n# Build the project\nmake build\n\n# Run with default symbol (BTC-USD)\nmake run\n\n# Run with a specific symbol\nmake run-sym SYM=ETH-USD\n```\n\n### Command-Line Options\n\n```\nUsage: clunk [OPTIONS]\n\nOptions:\n  -h, --help                 Display this help message\n  -s, --symbol SYMBOL        Trading symbol (default: BTC-USD)\n  -d, --depth DEPTH          Order book depth to display (default: 10)\n  -r, --refresh RATE         Refresh rate in milliseconds (default: 500)\n  -v, --verbose              Enable verbose output\n  -c, --no-color-changes     Disable highlighting of price/size changes\n  -t, --highlight-time TIME  Duration to highlight changes (default: 2 refreshes)\n```\n\n### Examples\n\n```bash\n# Run with ETH-BTC symbol and 15 levels of depth\n./build/clunk -s ETH-BTC -d 15\n\n# Run with faster refresh rate (200ms)\n./build/clunk -s BTC-USD -r 200\n\n# Run with more verbose logging\n./build/clunk -s BTC-USD -v\n```\n\n## Technical Architecture\n\nClunk is designed with a focus on performance and modularity:\n\n- **Feed Handlers**: Extensible system for connecting to different exchange APIs\n- **Order Book**: High-performance price-time priority order book implementation\n- **Visualization**: Real-time console-based visualization with microsecond-level metrics\n\n### Performance Benchmarks\n\n| Metric | Value |\n|--------|-------|\n| Order Processing Latency | \u003c100 μs (average) |\n| Order Book Update Rate | \u003e10,000 updates/second |\n| Memory Footprint | \u003c50MB for standard market depth |\n\n## For Quantitative Trading Teams\n\nClunk was designed with professional quantitative trading applications in mind. Key applications include:\n\n- **Market Microstructure Analysis**: Study order flow patterns and market dynamics\n- **Algorithm Development**: Test and visualize trading strategies in real-time\n- **Liquidity Analysis**: Assess market depth and available liquidity\n- **Trading Signal Generation**: Use order book imbalance and market pressure as signals\n- **Execution Quality Analysis**: Evaluate trading costs and market impact\n\n## Commands\n\n- `make build` - Build the project\n- `make run` - Run with default symbol (BTC-USD)\n- `make run-sym SYM=ETH-USD` - Run with a specific symbol\n- `make test` - Run the tests\n- `make benchmark` - Run the benchmarks\n- `make clean` - Clean the build directory\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprunty%2Fclunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpprunty%2Fclunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprunty%2Fclunk/lists"}