All Projects → roq-trading → roq-samples

roq-trading / roq-samples

Licence: BSD-3-Clause license
How to use the Roq C++20 API for Live Cryptocurrency Algorithmic and High-Frequency Trading as well as for Back-Testing and Historical Simulation

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to roq-samples

Roq Api
API for algorithmic and high-frequency trading
Stars: ✭ 132 (+10.92%)
Mutual labels:  trading, trading-bot, exchange, market-data, trading-platform, low-latency, trading-strategies, trading-algorithms, algorithmic-trading, arbitrage
Socktrader
🚀 Websocket based trading bot for 💰cryptocurrencies 📈
Stars: ✭ 152 (+27.73%)
Mutual labels:  trading, trading-bot, exchange, trading-platform, trading-strategies, trading-algorithms, algorithmic-trading
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+2075.63%)
Mutual labels:  trading, trading-bot, exchange, market-data, trading-platform, trading-strategies
AutoTrader
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.
Stars: ✭ 227 (+90.76%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms, algorithmic-trading
quick trade
convenient script for trading with python.
Stars: ✭ 63 (-47.06%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms, algorithmic-trading
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (+10.92%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms, algorithmic-trading
Quant
Codera Quant is a Java framework for algorithmic trading strategies development, execution and backtesting via Interactive Brokers TWS API or other brokers API
Stars: ✭ 104 (-12.61%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms, algorithmic-trading
TradeBot
Crypto trading bot using Binance API (Java)
Stars: ✭ 292 (+145.38%)
Mutual labels:  trading, trading-bot, market-data, trading-strategies, backtesting
futu algo
Futu Algorithmic Trading Solution (Python) 基於富途OpenAPI所開發量化交易程序
Stars: ✭ 143 (+20.17%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, high-frequency-trading
Lean
Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
Stars: ✭ 5,675 (+4668.91%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms
Zvt
modular quant framework.
Stars: ✭ 1,801 (+1413.45%)
Mutual labels:  trading-bot, trading-platform, trading-strategies, algorithmic-trading, backtesting
rockfish
Rockfish is an arbitrage bot for the Stellar Decentralized Exchange (SDEX)
Stars: ✭ 58 (-51.26%)
Mutual labels:  trading, trading-bot, trading-strategies, trading-algorithms, arbitrage
adamant-tradebot
Free market-making software for cryptocurrency projects and exchanges. Makes trade volume, maintains spread and liquidity/depth, set price range, and builds live-like dynamic order book.
Stars: ✭ 113 (-5.04%)
Mutual labels:  trading, trading-bot, exchange, order-book, market-making
Gekko Strategies
Strategies to Gekko trading bot with backtests results and some useful tools.
Stars: ✭ 1,022 (+758.82%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms
Kelp
Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges
Stars: ✭ 580 (+387.39%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms
Jesse
An advanced crypto trading bot written in Python
Stars: ✭ 1,038 (+772.27%)
Mutual labels:  trading, trading-bot, trading-strategies, trading-algorithms, algorithmic-trading
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+181.51%)
Mutual labels:  trading, trading-bot, exchange, trading-strategies, trading-algorithms
Tradingview Alert Binance Trader
This trading bot listens to the TradingView alert emails on your inbox and executes trades on Binance based on the parameters set on the TD alerts.
Stars: ✭ 100 (-15.97%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms
tradingview-alert-binance-trader
This trading bot listens to the TradingView alert emails on your inbox and executes trades on Binance based on the parameters set on the TD alerts.
Stars: ✭ 153 (+28.57%)
Mutual labels:  trading, trading-bot, trading-platform, trading-strategies, trading-algorithms
Openalgo
💹 openAlgo is a public repository for various work product relavant to algorithms and the high frequency low latency electronic trading space with a bias toward market microstructure as well as exchange traded futures and options.
Stars: ✭ 158 (+32.77%)
Mutual labels:  trading, trading-strategies, trading-algorithms, algorithmic-trading

roq-samples

Samples demonstrating how to implement various features of algorithmic trading solutions.

Operating Systems

  • Linux (x86-64, AArch64)
  • macOS (x86-64)

Note! The Windows Subsystem for Linux (WSL) is NOT supported. Reason can be found here.

Library/Package Dependencies

Optional

Prerequisites

The project is primarily designed to be compatible with the conda package manager.

Download and Install Miniforge

Linux / x86_64

wget -N https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh

bash Miniforge3-Linux-x86_64.sh -b -u -p ~/conda

~/conda/bin/conda install -y \
    'gxx_linux-64>=12'

Linux / aarch64

wget -N https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh

bash Miniforge3-Linux-aarch64.sh -b -u -p ~/conda

~/conda/bin/conda install -y \
    'gxx_linux-aarch64>=12'

macOS / x86_64

wget -N https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh

bash Miniforge3-MacOSX-x86_64.sh -b -u -p ~/conda

~/conda/bin/conda install -y \
   'clang_osx-64>=14'

macOS / arm64

wget -N https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh

bash Miniforge3-MacOSX-arm64.sh -b -u -p ~/conda

~/conda/bin/conda install -y \
   'clang_osx-arm64>=14'

Install Dependencies

source ~/conda/bin/activate

conda install -y \
    git \
    make \
    cmake \
    abseil-cpp \
    flatbuffers \
    nlohmann_json \
    tomlplusplus \
    libevent

conda install -y --channel https://roq-trading.com/conda/stable \
    roq-client \
    roq-web \
    roq-oss-range-v3

Building

cmake .

make -j4

Using

  • 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 CustomMessage from a secondary thread
  • Import
    • Convert any data source to an event-log
    • Encoding has header-only dependencies

Simulation Data (install)

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/stable \
    roq-data

Data can now be found in the $CONDA_PREFIX/share/roq-data/ directory.

Gateways (install, configure, run)

Deribit

conda install -y --channel https://roq-trading.com/conda/stable \
    roq-deribit

It is easiest to start from a config file template

cp $CONDA_PREFIX/share/roq-deribit/config.toml ~/deribit.toml

Edit 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.sock

Coinbase Pro

conda install -y --channel https://roq-trading.com/conda/stable \
    roq-coinbase-pro

It is easiest to start from a config file template

cp $CONDA_PREFIX/share/roq-coinbase-pro/config.toml ~/coinbase-pro.toml

Edit 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.sock

License

The project is released under the terms of the BSD 3-Clause license.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].