Crypto currency trading bot written in TypeScript for NodeJS
AGPL-3.0 License
This is the source of the Crypto currency trading bot running on: https://wolfbot.org
It is written in TypeScript for NodeJS + MongoDB.
Screenshots of the Trading UI:
A more detailed list of all features: https://wolfbot.org/features/
The list of supported exchanges: https://wolfbot.org/features/exchanges/
Additionally WolfBot supports over 130 exchanges using CCXT Library (no WebSockets, no margin trading).
The full strategy documentation: https://wolfbot.org/strategy-docs/
NodeJS >= 12 && <= 14
MongoDB >= 4.0
TypeScript >= 3.5
yarn >= 1.9.4 (npm should work too, but no support given if you run into errors)
Webpack >= 4 (only for UI modifications)
git clone https://github.com/Ekliptor/WolfBot
yarn install
You can use the --production
flag if you only want to run the bot and not make any code changes.
Rename the configLocal-sample.ts
file in the project root directory to configLocal.ts
and add at least mongoUrl
(plus some exchange API keys if you want to trade).
After running TypeScript (automatically in your IDE or run the tsc
command in the project root dir) you will see a file:
build/app.js
tsc
will show you some errors (due to shared code with missing types between server and client side, I will refactor this later). Just ignore these errors and make sure noEmitOnError
is not set (the default) and that you have a build/
dir in the project root as well as for all packages under node_modules/@ekliptor
which contain a tsconfig.json
file. Use the build
directory as the working directory and run:
node app.js --debug --config=Noop --trader=RealTimeTrader --noUpdate --noBrowser
The config
parameter must be a JSON file from the config
directory. For a list of all parameters look at the top of the app.ts
file.
To you can install WolfBot with all its dependencies using Docker:
docker-compose up
There is documentation available here: https://forum.wolfbot.org/forums/strategy-development.17/
Look into the /src/Strategies
folder for more examples.
Incoming trades flow diagram Outgoing trades flow diagram
In the project root directory, run:
yarn watch
You should also run the bot with the --uiDev
flag so that changes to HTML template files are reloaded from disk.
The UI uses a single persistent WebSocket connection. UI related code is in the following directories:
├ project root
├─── public <- all code shipped to the browser
├────── js <- all TypeScript code to be compiled with WebPack
├─── src
├────── WebSocket <- all server-side logic to push updates to the browser
├─── views <- all HTML templates
If you want to connect WolfBot to your trading terminal, please take a look at the API docs.
This let's you:
Follow me on Twitter and Memo.
No donations, I actually make money trading;)