Self-hosted crypto trading bot (automated high frequency market making) written in C++
Self-hosted crypto trading bot (automated high frequency market making) written in C++
self reminder:
patience is the mother of science
If you don't want to configure or hardcode your own trading strategies in your own machine,
you can fund liquidity pools of automated market makers at tinyman.org (or at any other defi out there),
just remember:
Our bots run on unix-like systems. Persistence is achieved through a built-in server-less SQLite C++ interface.
Data transfers are directly done from your machine to the exchange using the latest CURL and OpenSSL versions.
Installation in a dedicated Debian, Raspberry, Red Hat, CentOS or macOS instance without Docker is recommended.
The web UI is compatible with most web browsers/resolutions, but Brave or Firefox at 1600px are recommended.
Doesn't require configuration of any web server (unless installed behind your own reverse proxy).
_________________________________________
/ Hello, WORLD! \
| |
\ pssst.. 1.00000000 BTC = 56683.49 EUR. /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
All currency pairs are supported (use --list argument to see all currently tradable pairs on a given exchange).
| under maintenance | under development or abandoned | ||
| Spot Trading | Coinbase (fees) ⟿ REST + 2 WebSockets Binance (fees) Binance.US (fees) ⟿ REST + 1 WebSocket BitMEX (fees) ⟿ REST + 1 WebSocket | Kraken (fees) ⟿ REST + 2 WebSockets KuCoin (fees) ⟿ REST + 1 WebSocket Bitfinex (fees) Ethfinex (fees) ⟿ REST + 1 WebSocket | Gate.io (fees) ⟿ REST + 1 WebSocket HitBTC (fees) Bequant (fees) ⟿ REST + 2 WebSockets Poloniex (fees) ⟿ REST + 1 WebSocket |
| Margin Trading | none | none |
If you ask me, is the best and most secure by far, so here is my referral link for both of us to enjoy.
In case you are looking for referral links to other exchanges, feel free to post a new issue asking to other active users.
See etc/Dockerfile file.
Before starting with a manual installation, ensure your target machine has Windows 7 or greater and MSYS2 installed.
Use MSYS2 Terminal to install make (with command pacman -S make), then proceed as usual with the installation.
Ensure you agree to install collaborative non-free software (see Unlock section).
Ensure your target machine has git and make installed.
Download it wherever you want (feel free to customize the suggested folder name K) and execute the installer:
$ git clone ssh://[email protected]/ctubio/Krypto-trading-bot K
$ cd K
$ make installK.sh in your favorite text editor: $ vim K.shTo upgrade anytime see Upgrade to the latest commit section.
Ensure you agree to install collaborative non-free software (see Unlock section).
Ensure your target machine has curl and make installed.
Download it wherever you want (feel free to customize the suggested folder name K) and execute the installer:
$ mkdir K
$ cd K
$ curl -O krypto.ninja/Makefile
$ make installK.sh in your favorite text editor: $ vim K.shTo upgrade anytime to the latest release just run make reinstall.
See etc/K.sh.dist file or better your own copy of K.sh file located in the top level path.
It just contains a few variables with examples. The very end of the file contains the code that starts the bot.
Once your config file is ready, you can execute it to start the bot:
$ ./K.shAlternatively use make start to run K.sh in the background using screen (to see the output, attach the screen with make screen [or run all at once with make start screen]).
Feel free to run make stop or make restart anytime, and don't forget to read the fucking manual.
Troubleshooting:
--list argument.Optional:
See at least once ./K.sh --help to trade or make help to develop.
Use your own HTTP Basic Authentication credentials with --user and --pass arguments.
Use your own SSL certificate with --ssl-crt and --ssl-key arguments.
Otherwise, the insecure built-in certificate is fully featured, but you may need to authorise it in your browser.
If you want to generate your own certificate see SSL for internal usage.
In case you really want to use plain HTTP, use --without-ssl argument.
If you upgrade while having any instance running in the background, you will need to manually restart it using make restart or make restartall to start using the latest version.
Please run make reinstall to download the upgraded source and executable files.
Feel free anytime to check if there are new upgrades with make diff.
Once you decide that it is time to upgrade, execute make upgrade (or directly make reinstall to skip the validation of new commits).
If you only use git to pull the latest source files from the remote branch, you will still need to upgrade or recompile your executable files.
To not upgrade but instead recompile your own modified source files, use make lib K or just make (see Build notes).
Please note, an "instance" is in fact a *.sh config file; using a single machine with a single installation, you can run as many instances as *.sh files you have (limited by the available free RAM).
You can list the current running instances with make list.
If you haven't defined a config file, make start, make screen, make stop and make restart will use the default config file K.sh.
To run multiple instances using a collection of config files:
Create a new config file with cp etc/K.sh.dist X.sh && chmod +x X.sh (use X.sh or any name but keep .sh extension).
Edit the new config file vim X.sh
Run the new instance with ./X.sh or to run in the background, use K=X.sh make start. To attach to the new instance's screen, use K=X.sh make screen. To stop the new instance, use K=X.sh make stop and to restart it, use K=X.sh make restart. The environment variable K specifies the filename of the config file that yo
No open issues yet, or sync has not completed.