explaingit

ayushm74/binance-lob-capture

Analysis updated 2026-05-18

0C++Audience · developerComplexity · 4/5Setup · hard

TLDR

A C++ service that records live Binance cryptocurrency market data to CSV files and can replay saved data offline for analysis.

Mindmap

mindmap
  root((lob capture))
    What it does
      Records market data
      Offline replay
    Tech stack
      C++
      CMake
      Boost OpenSSL
    Use cases
      Capture live data
      Replay sessions
      Analyze in pandas
    Audience
      Quant developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Capture live order book and trade data from Binance for one or more trading pairs.

USE CASE 2

Replay a previously recorded session offline to test analysis code without a live connection.

USE CASE 3

Load captured CSV files directly into pandas or polars for research.

What is it built with?

C++CMakeBoostOpenSSL

How does it compare?

ayushm74/binance-lob-capturealange/llama.cppbirdie-github/badprocess-guard
Stars000
LanguageC++C++C++
Setup difficultyhardmoderatemoderate
Complexity4/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a C++17 toolchain, CMake, and dependencies like Boost and OpenSSL installed via vcpkg or apt.

In plain English

This project is a C++ program for recording live market data from Binance, the cryptocurrency exchange, so that trading data can be studied or replayed later without needing an internet connection. It connects to Binance's public data feeds, which stream price updates and trade events as they happen, and saves every single message it receives to plain CSV files that can be opened directly in spreadsheet or data analysis tools like pandas. Internally, each currency pair being tracked gets its own pair of threads: one thread does nothing but read from the network and timestamp each incoming message the instant it arrives, while a second thread handles the slower work of writing files to disk and updating an internal record of the current best prices being bid and offered, known as the order book. Splitting the work this way keeps the disk writing from ever slowing down or delaying the network reading. Two kinds of output files are produced per currency pair per day, one recording every raw message received and one recording the order book state after each update is applied. The program can also run in a replay mode, reading a previously saved file back in and simulating the same processing pipeline entirely offline, which is useful for testing changes without needing a live connection to Binance. The project supports both Windows and Linux, with build instructions using CMake for each, and depends on a small number of established libraries for networking, encryption, and reading configuration data. It includes an automated test suite and shuts down cleanly on Ctrl+C, making sure files are flushed and queues are fully drained before the program exits.

Copy-paste prompts

Prompt 1
Help me build this project on Ubuntu using the CMake and Ninja instructions in the README.
Prompt 2
Explain how the network thread and processor thread in this repo divide the work.
Prompt 3
Show me the command to run this tool against multiple Binance symbols at once.
Prompt 4
Walk me through using this repo's replay mode on a previously captured CSV file.

Frequently asked questions

What is binance-lob-capture?

A C++ service that records live Binance cryptocurrency market data to CSV files and can replay saved data offline for analysis.

What language is binance-lob-capture written in?

Mainly C++. The stack also includes C++, CMake, Boost.

How hard is binance-lob-capture to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is binance-lob-capture for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.