99# trader.cpp
1010a proof-of-concept, showcasing some c++ coding combined with some fintech concepts
1111
12- ## RUN REQUIREMENTS
12+ ## Run Requirements
1313- a Binance account, with an Ed25519 token that has FIX read permissions enabled
14- - ` stunnel ` or a local proxy, for TLS encryption
14+ - ` stunnel ` for TLS encryption ( or a local proxy)
1515
16- ## BUILD REQUIREMENTS
16+ ## Build Requirements
1717- C++20
1818- ` Conan ` (and a conan profile)
1919- ` CMake `
20+ - ` ninja `
2021
21- ## DEV REQUIREMENTS
22+ ## Dev Requirements
23+ - ` make ` (convenience)
2224- ` clang-tidy `
2325- ` clang-format `
2426- ` lcov `
2527
26- ## BUILD AND RUN
28+ ## Build and Run
2729(NB: this app uses ` make ` as a task runner, but it's not essential)
28301 . copy ` .env.example ` to ` .env ` , and set your public/private keys
29312 . run an SSL tunnel (e.g. ` stunnel binance/stunnel_prod.conf ` )
30323 . ` make init `
31334 . ` make build-debug `
32345 . ` make withenv RECIPE=run-debug `
3335
34- ## TEST
36+ ## Test
3537` make test `
3638
37- ## HELP
39+ ## Debug
40+ - vscode
41+ - app and test debug profiles are pre-configured in the following files:
42+ - ` .vscode/launch.json `
43+ - ` .vscode/tasks.json `
44+ - intellij (clion)
45+ - enable the ` debug ` CMake profile
46+
47+ ## Help
3848` make `
3949
50+ ## Cloud Config
51+ - Sonarcloud (click the badge)
52+ - Codecov (click the badge)
53+
4054
41- # AIM
55+ # Aims
4256
43- ## FUNCTIONAL
57+ ## Functional
4458- ✅ create a FIX connection to Binance
4559- ✅ subscribe to price updates
4660- create a basic trading signal (e.g. standard deviations)
4761- fire an order
4862- test in the Binance test environment
4963
50-
51- ## NON-FUNCTIONAL
64+ ## Non-functional
5265- ✅ basic cpp app to start with
5366- ✅ makefile and build chain
5467- ✅ package management
5568- ✅ debugging
69+ - ✅ single-threaded to start with, then re-architect (and mermaid diagram)
5670- ✅ UI
5771 - ✅ publish messages to thread-safe queue
5872 - ✅ consume messages from thread-safe queue on a worker thread
@@ -62,47 +76,50 @@ a proof-of-concept, showcasing some c++ coding combined with some fintech concep
6276 - ✅ fast
6377 - structured
6478 - basic schema (severity, correlationId)
65- - ✅ dependency injection
66- - ✅ single-threaded to start with, then re-architect (and mermaid diagram)
67- - ✅ code formatting / clang-format
79+ - code quality
80+ - ✅ clang-format
81+ - ✅ configure editor to auto-format
82+ - ✅ fail commits if not formatted
83+ - ✅ fail builds if not formatted
84+ - clang-tidy
85+ - all files tidied
86+ - configured clang-tidy => clang-format
87+ - fail commits/merges if not tidy
88+ - fail builds if not tidy
6889 - ✅ git hooks
6990 - ✅ integrated into build pipeline
70- - ✅ coverage badge
71- - ✅ custom docker build image with all dependencies (for faster pipelines)
72- - ✅ static code analysis
91+ - ✅ badges
7392 - ✅ sonarcloud integrated into build pipeline
74- - clang-tidy
75- - decimal type
76- - sparse arrays
77- - release binaries on github
78- - ccache.dev
79- - zeromq + protobufs?
80- - valgrind/cachegrind
81- - github releases
82- - local github action runner
83- - sonarqube integration
84- - nix virtual environment
85-
86- # STANDARDS
87- - high unit-test coverage
88- - static code analysis
89- - configure debugging
90- - git use
91- - integration test with mocked Binance
92- - load test with mocked Binance (k6?)
93- - profiling
94- - github action
95- - containerised integration tests / dind
93+ - sonarcloud coverage
94+ - pipeline
95+ - ✅ custom docker build image with all dependencies (hosted on GHCR for faster pipelines)
96+ - nix
97+ - ccache (faster pipelines)
98+ - github releases
99+ - local github action runner (` act ` )
100+ - containerised integration tests / dind
101+ - testing
102+ - ✅ dependency injection
103+ - integration test with mocked Binance
104+ - performance
105+ - profiling (valgrind/cachegrind)
106+ - load test with mocked Binance server (k6?)
107+ - sparse arrays
108+ - memory-mapped files
96109- observability
97- - opentelemetry
98- - grafana+tempo via docker-compose
110+ - opentelemetry
111+ - grafana+tempo via docker-compose
99112- versioning
100- - conventional commits
113+ - master branch merge check for conventional commit message (e.g. regex)
114+ - maybe a merge git gook check
101115 - automated semantic versioning
102116 - github-changelog-generator
103- - master branch merge check for conventional commit message
104- - maybe a git gook check for merges
105- - memory-mapped files
117+ - other
118+ - decimal type
119+ - zeromq + protobufs?
120+ - shellcheck?
121+ - deployment
122+ - terraform
106123
107- # CREDITS
124+ # Credits
108125- https://github.com/binance/binance-fix-connector-python
0 commit comments