Skip to content
/ ATS Public

My implementation of an algorithmic trading systems library in C++

License

Notifications You must be signed in to change notification settings

anouarac/ATS

Repository files navigation

ATS

ATS is an open-source implementation of an algorithmic trading systems library in C++.

It currently supports the Binance Exchange but the project is modular and any exchange can be added.

User Interface

Prerequisites

The project requires C++ 17 and CMake.

Submodules include binance-cxx-api, GoogleTest and their dependencies.

Quick Start Overview

Cloning

git clone --recurse-submodules -j4 https://github.com/anouarac/ATS.git

Building

$ cd ATS
$ mkdir build
$ cd build
Windows
$ cmake-gui ..

Then generate the binaries in the build directory.

Linux/Mac
$ cmake ..
$ make -j4

You should now be able to run the targets either through an IDE such as Visual Studio, or through the terminal.

Example

Working with this library can go as follows with the Binance EMS:

  • Place Binance Spot Net API keys in $HOME/.binance/key and $HOME/.binance/secret, or $HOME/.binance/test_key and $HOME/.binance/test_secretfor the Spot Test Net.
  • Import the following libraries
    #include <iostream>
    #include "ats.h"
    #include "json/json.h"
    #include "binance_logger.h"
  • Setup Logger
    binance::Logger::set_debug_level(1);
    binance::Logger::set_debug_logfp(stderr);
  • Initialise OMS and Binance EMS
    ats::OrderManager oms;
    ats::BinanceExchangeManager b_ems(oms, 1);
  • Interact with EMS
    Json::Value result;
    b_ems.getUserInfo(result);
    std::cout << result.toStyledString() << std::endl;
    std::cout << b_ems.getPrice("ETHUSDT") << std::endl;

You can find more examples in examples.

Documentation

For further details check the documentation.

Releases

No releases published

Packages

No packages published