hft-recorder is a standalone desktop application and research lab on top of
CXETCPP.
Current truth:
- GUI-first product:
Qt 6 + QML - first milestone: capture clean normalized market data, replay it, validate it, and visualize it
- canonical session format: JSON corpus per session
- compression research happens on top of that corpus
Current Phase-1 capture target:
- fixed source:
Binance FAPI / ETHUSDT - one shared session folder under a user-selected parent directory
- three independent GUI buttons:
TradesBookTickerOrderbook
- orderbook contract:
- write the initial full book as the first depth row when REST seed is available
- then append WS deltas into
depth_tape.jsonl+depth_sidecar.jsonl
User build/run entrypoints:
./compile.sh- builds
CXETCPPshared library if needed - installs it into
~/.local/cxet - configures and builds
hft-recorder
- builds
./compile.sh --force-cxet- forcibly rebuilds and reinstalls
CXETCPPbefore buildinghft-recorder - use this when public headers in
~/.local/cxetbecame stale relative to the current repo
- forcibly rebuilds and reinstalls
./compile.sh --force clang- rebuilds hft-compressor, CXETCPP, and hft-recorder with Clang, replacing the active
~/.local/cxetinstall andbuild/app binaries
- rebuilds hft-compressor, CXETCPP, and hft-recorder with Clang, replacing the active
./compile.sh --force gcc- same flow with GCC, intended for back-to-back metric comparisons
./build/start- launches the Qt GUI in CPU-safe software mode
- does not open the metrics or chart API ports by default
- set
HFTREC_METRICS_MODE=fullto exposehttp://127.0.0.1:8080/metrics - set
HFTREC_API_MODE=onto expose the local chart API on127.0.0.1:18080
./build/start --gpu- launches the Qt GUI requesting the Qt Quick OpenGL backend
- intended for real Linux desktop GPU validation, e.g. Ubuntu 24 on the laptop
Current runtime truth:
- default runtime is intentionally software-safe
--gpuenables a hardware-backed Qt Quick/OpenGL setup for validation- the active viewer path is still
ChartItem(QQuickPaintedItem) - this means current
--gpuis hardware-backed compositing, not yet a separate GPU-native chart renderer ./build/startexportsHFTREC_METRICS_PORT=8080, but leaves metrics disabled unlessHFTREC_METRICS_MODEis set tofull,sampled, orcounters;/metricsincludeshftrec_build_info{compiler="..."}so Prometheus/Grafana can separate Clang and GCC runs when metrics are enabled
Primary user workflow:
- Open the GUI.
- Select exchange / market / symbols / duration.
- Capture a session into normalized JSON files.
- Open that session in validation and chart views.
- Run baseline and custom compression pipelines in the lab.
- Compare ratio, encode speed, decode speed, and lossless accuracy inside the GUI.
Dependency contract:
hft-recorderdoes not compileCXETCPPsourceshft-recorderlinks only against a prebuilt shared library such asbuild/libcxet_lib.sohft-recorderincludes only the public API surface needed to consumeCXETCPP- no
add_subdirectory(..)on the parent project - no dependency on
network/,parse/,exchanges/, or runtime internals
Public contract freeze:
- recorder-visible event meaning for trades, bookticker, and orderbook must stay stable
TradePublic,BookTickerData, andOrderBookSnapshotare the compatibility/output contracts- internal runtime payloads may change in memory/layout, but only behind the explicit compatibility bridge
hft-recorderis allowed to consumeTradeRuntimeV1/BookTickerRuntimeV1only at the capture boundary where they are immediately materialized into stable recorder rowshft-recordermust not depend on internal parser/layout details beyond that bridge
Laptop transfer note:
- code moves by normal git branch workflow
/mnt/d/recordingsis the default local corpus root and should be transferred separately from the repo- if a ready
libcxet_lib.soand matching public headers are already available, copy the installed~/.local/cxet/tree to the laptop before running./compile.sh - if that copied install is incompatible on Ubuntu 24, rerun
./compile.sh --force-cxeton the laptop to rebuild and reinstallCXETCPP
Repository layout:
doc/- source-of-truth architecture, corpus, GUI, and lab docssrc/gui/- Qt/QML app shell, models, and viewmodelssrc/core/- capture, corpus, validation, ranking, and lab backendsrc/variants/- custom compression candidatessrc/support/- wrappers around baseline compression librariesscripts/python_lab/- offline exploration and reports
Reading order:
doc/OVERVIEW.mddoc/SESSION_CORPUS_FORMAT.mddoc/GUI_PRODUCT.mddoc/IMPLEMENTATION_PLAN.mddoc/ARCHITECTURE.mddoc/VALIDATION_AND_RANKING.mddoc/STREAMS.mddoc/CONFIG_AND_CLI.mddoc/TESTING_CONTRACT.mddoc/BUILD_AND_ISOLATION.md