A robust C++ trading bot for Bitfinex exchange. Features include order placement, modification, cancellation, orderbook retrieval, and position management. Built with security and performance in mind.
- Place, modify, and cancel orders on Bitfinex
- Retrieve orderbook data
- Manage trading positions
- Secure API credential handling
- C++11 or later
- CMake 3.10 or later
- libcurl
- OpenSSL
- nlohmann-json (header-only library)
-
Clone the repository:
git clone https://github.com/yourusername/BitfinexTradingBot.git cd BitfinexTradingBot
-
Download the
json.hpp
file:- Visit the nlohmann/json GitHub repository
- Navigate to the
single_include/nlohmann
directory - Download the
json.hpp
file - Place the downloaded
json.hpp
file in your project'sinclude
directory
-
Install other dependencies:
- On Ubuntu/Debian:
sudo apt-get install libcurl4-openssl-dev libssl-dev
- On macOS (using Homebrew):
brew install curl openssl
- On Windows, consider using vcpkg to manage dependencies:
vcpkg install curl openssl
- On Ubuntu/Debian:
-
Create a build directory and run CMake:
mkdir build && cd build cmake ..
-
Build the project:
make
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Edit the
.env
file and add your Bitfinex API credentials:BITFINEX_API_KEY=your_api_key_here BITFINEX_API_SECRET=your_api_secret_here
Run the executable generated in the build directory:
./BitfinexTradingBot