• Stars
    star
    466
  • Rank 94,105 (Top 2 %)
  • Language
    C++
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

C++ interfaces used to communicate with Roq gateways.

roq-api

API for algorithmic and high-frequency trading (HFT).

This project does not contain the closed source implementation of the C++ interfaces.

Links

Design

  • Modular.
  • Predictable low latency.
  • Support all aspects required by a production environment.
  • Aim to reduce "glue" code and offer standard solutions for data capture, monitoring, bridge solutions, etc.

Design

  • The C++ API allows clients (strategies) to
    • communicate with gateways using a unified interface, or
    • replay event-logs (exactly, for simulation and back-testing purposes).
  • The FIX bridge supports third-party solutions.
  • The JSON bridge supports other programming languages.
  • The adapters support third-party database solutions, e.g. ClickHouse.
  • The metrics interface supports third-party monitoring solutions, e.g. Prometheus, Alertmanager and Grafana.

Features

  • Open source interface (no need to sign an NDA to access or use).
  • Permissive license (anyone is free to copy and use for whatever purpose).
  • Free to download and try (no need to contact or register).
  • Unified client interface to access any market.
  • Design is strongly inspired by standards and specific implementations used by major exchanges.
  • Strong preference for allocation-free message encoding/decoding.
  • Extensive use of auto-generated code based on schemas.
  • Strongly typed messages (events).
  • Asynchronous interfaces and implementations.
  • C++ and shared memory for low latency.
  • Automatic capture of all events.
  • Free to download tools and database adapters.

Support and Maintenance

A SLA is required for production support. More information can be found here.

Feel free to contact us with any questions you may have.

Gateways

Currently supported traditional exchanges include

  • CME

Currently supported Cryptocurrency exchanges include

  • Binance
  • BitMEX
  • Bitstamp
  • Bybit
  • Coinbase PRO
  • Deribit
  • Gate
  • Gemini
  • HitBTC
  • Huobi
  • Kraken
  • KuCoin
  • OKX

The full list can be found here.

Instructions on how to install, configure and use the gateways can either be found in the samples or by consulting the documentation.

Operating Systems

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

All listed combinations are regularly compiled but only Linux/x86-64 is continuously being tested. If you require a specific combination, please contact us before using.

We plan to drop support for macOS/x86-64.

Library/Package Dependencies

Optional

  • Catch2 (Boost Software License 1.0 License)

Prerequisites

It is not very interesting to follow the instructions shown here due to this project only containing interfaces. The actual client implementation is closed source as mentioned elsewhere in this document.

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

Download and Install Mambaforge

Linux / x86_64

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

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

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

Linux / AArch64

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

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

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

macOS / x86_64

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

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

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

macOS / Arm64

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

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

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

Install Dependencies

source ~/conda/bin/activate

mamba install -y \
    git \
    cmake \
    abseil-cpp \
    fmt \
    jinja2 \
    clang-format \
    catch2

mamba install -y --channel https://roq-trading.com/conda/stable \
    roq-oss-magic_enum

Building

If you build for macOS, please consult the knowledge base.

git submodule update --init --recursive

mkdir build && cd build

cmake ..

make -j

make test

Using

You can download the closed source client implementation like this

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

Samples can be found here.

License

The project is released under the terms of the MIT license.

More Repositories

1

roq-cpp-samples

C++ examples.
C++
157
star
2

roq-python

Python 3.x bindings for some of Roq's C++23 APIs.
C++
10
star
3

roq-ansible

Ansible Playbook.
8
star
4

roq-logging

Logging utilities.
C++
7
star
5

roq-algo

C++ tools for building algorithmic trading strategies.
C++
3
star
6

roq-cmake

CMake scripts and utilties.
CMake
3
star
7

roq-clickhouse-adapter

Template project demonstrating ClickHouse integration.
C++
3
star
8

roq-cpp-client-template

Client template project using C++.
C++
3
star
9

roq-zeromq-bridge

Publish real-time events to ZeroMQ. [C++20] [Bridge] [EXAMPLE]
C++
2
star
10

roq-cpp-fix-client-template

FIX client template project using C++.
C++
2
star
11

roq-ansible-monitor

Monitor Roq's gateways using Prometheus and Grafana. [Ansible] [DevOps]
Python
1
star
12

roq-redis-bridge

Publish real-time events to Redis. [C++20] [Bridge] [EXAMPLE]
C++
1
star
13

roq-fix-proxy

FIX load-balancer supporting message routing by client. (Used with FIX-Bridge.)
C++
1
star
14

roq-analysis

Data analysis.
Jupyter Notebook
1
star
15

roq-algo-playground

C++ framework for using the algorithmic trading strategy library
C++
1
star
16

roq-issues

Issue tracker for Roq's software solutions.
1
star
17

.github

1
star
18

roq-docker-demo

Docker deployment using Supervisor to manage several Roq services.
Dockerfile
1
star
19

roq-ansible-gateways

Install and configure Roq's gateways [Ansible] [DevOps]
Python
1
star
20

roq-flags

Command-line utilities.
C++
1
star
21

roq-clickhouse-cpp

Demonstrates how to use the roq-adapter library to export event-logs to ClickHouse
C++
1
star
22

roq-risk-manager

Implements a basic position and risk management application. [C++20] [Risk]
C++
1
star
23

roq-vue

User interface for Roq's market gateways. [Vue] [EXPERIMENT]
Vue
1
star
24

roq-python-samples

Python examples.
Python
1
star
25

roq-java-samples

Java examples.
Java
1
star