a ping pong and maker/taker order bot for trading cryptocurrency on Waves Exchange, Poloniex, Bittrex, and Binance
Trader is a bot that makes manual orders for the user, and/or makes automatic ping-pong orders. Trader can execute one-time, fill-or-kill, and maker/taker orders, and simulates these modes on exchanges without direct support. Trader also respects exchange limits like maximum number of orders, minimum price, maximum price, minimum lot size, price ticksize, etc.
Trader is released under the terms of the MIT license.
Trader requires Qt 5.10 or later, built with the core, network, and websockets modules. To build:
sudo apt build-dep qt5-default
- sudo apt install libgmp-dev
cd ~/src
. If it doesn't exist, run mkdir ~/src
first.wget https://download.qt.io/archive/qt/5.13/5.13.1/single/qt-everywhere-src-5.13.1.tar.xz
tar xf qt-everywhere-src-5.13.1.tar.xz
cd qt-everywhere-src-5.13.1
username
with your username. (Choose only one)
- Click here to configure a dynamic build, to run Trader on your machine
- Click here to configure a static build, to copy Trader to another machine with the same OS
make -j
(if low on RAM or single CPU, you can skip the -j
)make install
qmake -v
prefixed with your install path (type the whole thing): ~/localqt/Qt-5.13.1-minimal/bin/qmake -v
~~~
QMake version 3.1
Using Qt version 5.13.1 in /home/username/localqt/Qt-5.13.1-minimal/lib
~~~
If you are having problems with step 9 and interfering Qt versions, invoke qmake using qtchooser instead.
cd ~/src
git clone https://github.com/tryphe/trader
cd trader
daemon/keydefs.h
(choose only one):
- Run python generate_keys.py
- or: Copy the example keydefs file: cp daemon/keydefs.h.example daemon/keydefs.h
then paste your keys in with your favorite editor.
- or: (non-hardcoded keys): Create keydefs.h
using the example file above, but leave the keys blank or as-is during compile. Then, each time you run the binary, modify the bulk input file <config-directory>/in.txt
, adding this line: setkeyandsecret <key> <secret>
.~/localqt/Qt-5.13.1-minimal/bin/qmake
make -j
, or make -jn
where n
is the number of simultaneous makes.Run git pull
to pull the latest code, then repeat step 6 from the Compiling section. You should do this frequently - minor bugfixes are common.
Sessionize traderd so it stays running: setsid ./traderd
~/.config/trader
Running the daemons and relying terminal output is suboptimal if the terminal closes. It's enabled by default, but can be disabled in daemon/build-config.h
. All output is also routed to the logfiles. There's a color log, and a noncolor log. To tail, run:
tail -f --lines=200 ~/.config/trader/log.<timestamp>_color.txt
.
Check out the list of commands. (warning: most of these commands are now deprecated)
What the bot is NOT
The bot doesn't use common chart indicators, like momentum indicators or standard deviation formulas. Instead, it relies on user-generated ping-pong, and automatic ping-pong based on a cross-market tit-for-tat strategy (coming soon).
What about supporting xyz exchange?
It's fairly easily to integrate the bot with any API, as long as it can read its current orders and get ticker prices. Currently, it would take roughly 1000 lines to add another exchange. If you know of a good exchange, let me know.