Samples demonstrating how to implement various features of algorithmic trading solutions.
- Linux (x86-64, AArch64)
- macOS (x86-64, Arm64)
- Abseil-C++ (Apache 2.0 License)
- FlatBuffers (Apache 2.0 License)
- fmt (MIT License)
- roq-api (MIT License)
- roq-logging (MIT License)
- roq-web (Commerical License, free to use)
- roq-client (Commerical License, free to use)
Optional
- Catch2 (Boost Software License 1.0 License)
- Google Benchmark (Apache 2.0 License)
The project is primarily designed to be compatible with the conda package manager.
Use
stablefor (the approx. monthly) release build. Useunstablefor the more regularly updated development builds.
git submodule update --init --recursivescripts/create_conda_env unstable debugsource opt/conda/bin/activate devSometimes you may need to delete CMakeCache.txt if CMake has cached an incorrect configuration.
cmake . && make -j4- Example 1
- Connect to market gateway
- Subscribe using regex patterns
- Example 2
- Manage disconnect
- Process incremental market data update
- Maintain a market depth view
- Update a simple model
- Example 3
- Maintain positions
- Place limit orders
- Deal with order acks and updates
- Historical simulation
- Live trading
- Example 4
- Subscribe and nothing else
- Example 5
- Transfer
CustomMessagefrom a secondary thread
- Transfer
- Import
- Convert any data source to an event-log
- Encoding has header-only dependencies
Simulation requires you to either use your own event logs (automatically captured when you're running a gateway) or use sample data
conda install -y --channel https://roq-trading.com/conda/unstable \
roq-dataData can now be found in the $CONDA_PREFIX/share/roq-data/ directory.
conda install -y --channel https://roq-trading.com/conda/unstable \
roq-deribitIt is easiest to start from a config file template
cp $CONDA_PREFIX/share/roq-deribit/config.toml ~/deribit.tomlEdit this file and update with your Deribit API credentials (link).
You should look for these lines and replace as appropriate
login = "YOUR_DERIBIT_LOGIN_GOES_HERE"
secret = "YOUR_DERIBIT_SECRET_GOES_HERE"
Launch the gateway
roq-deribit \
--name "deribit" \
--config_file ~/deribit.toml \
--client_listen_address ~/deribit.sockconda install -y --channel https://roq-trading.com/conda/unstable \
roq-coinbase-proIt is easiest to start from a config file template
cp $CONDA_PREFIX/share/roq-coinbase-pro/config.toml ~/coinbase-pro.tomlEdit this file and update with your Coinbase Pro API credentials (link).
You should look for these lines and replace as appropriate
login = "YOUR_COINBASE_PRO_API_KEY_GOES_HERE"
password = "YOUR_COINBASE_PRO_PASSPHRASE_GOES_HERE"
secret = "YOUR_COINBASE_PRO_SECRET_GOES_HERE"
Launch the gateway
roq-coinbase-pro \
--name "coinbase-pro" \
--config_file ~/coinbase-pro.toml \
--client_listen_address ~/coinbase-pro.sockThe project is released under the terms of the BSD 3-Clause license.