The offcenter_trading project is a set of C++ applications and libraries that implement a microservices based trading system.
This project is hosted on github under user CodeRancher.
To clone this repository use the git command:
git clone https://github.com/CodeRancher/offcenter_trading.gitThe most simple build, if dependencies are installed globally.
cd offcenter_trading
mkdir build
cd build
cmake ..
makeA more complicated build if the libraries are in non-standard locations.
cd offcenter_trading
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=<installation path> \
-DBUILD_DOC=<ON|OFF> \
-DCMAKE_PREFIX_PATH="<nlohmann json path>;<cpprestsdk path>" \
-DBOOST_ROOT=<boost root> \
-DEASYLOGGINGPP_ROOT=<easyloggingpp root> \
-DEASYLOGGINGPP_USE_STATIC_LIBS=<ON|OFF> \
-DAPR_ALTLOCATION=<alt location for apr> \
-DGTEST_ROOT=<googletest root> \
..
make installImportant make commands.
| Command | Action |
|---|---|
| make | Build library. Build documentation if ${BUILD_DOC}=ON |
| make install | Build library and install to ${CMAKE_INSTALL_PREFIX}. Build documentation if ${BUILD_DOC}=ON |
| make doc_doxygen | Build library. Build documentation if ${BUILD_DOC}=ON |
Important cmake build variables.
| Variable | Description | Examples |
|---|---|---|
| CMAKE_INSTALL_PREFIX | Install directory for make install. |
e.g. ${HOME}/libs |
| CMAKE_PREFIX_PATH | Directories to search during make. |
${HOME}/libs/cmake/nlohmann_json;${HOME}/libs/cmake/cpprestsdk |
| BUILD_DOC | Build Doxygen documentation during make doc_doxygen. Can be 'ON' or 'OFF'. |
ON |
| BOOST_ROOT | Boost library location. | e.g. ${HOME}/libs |
| EASYLOGGINGPP_ROOT | Easylogging++ library location. | e.g. ${HOME}/libs |
| EASYLOGGINGPP_USE_STATIC_LIBS | If ${EASYLOGGINGPP_USE_STATIC_LIBS} is ON then static libs are searched. | ON |
| APR_ALTLOCATION | Alternate location to search for libraries/executables | e.g. ${HOME}/libs |
| GTEST_ROOT | The root directory of the Google Test installation. | e.g. ${HOME}/libs |
| Library | Minimum Version | License |
|---|---|---|
| nlohmann json | 3.9.1 | MIT |
| C++ REST SDK | 2.10.16 | MIT |
| Boost | 1.74 | Boost Software License 1.0 |
| Easylogging++ | 9.97.0 | MIT |
| SOCI | v4.0.1 | GNU LGPL version 2.1 |
| GoogleTest | 1.10.0 | BSD 3-Clause "New" or "Revised" License (modified) |
| OpenSSL | 1.1.1 | openssl-ssleay |
| MariaDBClient | 1.0.1 | GNU LGPL version 2.1 |
| Tools |
|---|
| Doxygen |
Common elements used in any of the Trading libraries or applications.
Trading specific datatypes.
AMQP conversion routines for the trading specific datatypes.
JSON conversion routines for the trading specific datatypes.
SOCI conversion routines for the trading specific datatypes.
SQL for creating a trading database. Not currently used.
Placeholder for building imgui. Not implemented.
Specific code for the Oanda Persistence Client application.
Generic code for trading.
Database specific code for trading.
Missing Functionality
Add missing functionality.
Testing
The library needs testing from end-to-end. There are basic tests and examples for some of the most used calls but the rest of the system needs validation.
Documentation
- Create the missing documenation.
- Add examples.