This open source project comes from the need to run several Passivbot "A fully automated trading bot" on same server, with multiple exchanges with infinite trading accounts & APIs.
A Multi-tenancy architecture allows you to have your friends and family running their own crypto trading bots without any knowledge of Shell or Programming Skills because everything its database driven & managed trough a website.
At same time, this application its able to monitor and interact with the Python crypto bots and comes with exchange scrapper thats able to pull your trades historic data and give you full control over your assets, incomes & bot performance.
The application its developed using the TALL stack, uses Tailwind, Alpine.js, Laravel, and Livewire to achieve a Reactive full-stack solution.
Important notes:
- It's a Beta version.
- It's under
heavydevelopment. - You need a knowledge installing Laravel + Installing Python applications and environments.
New features can be easily achieve with little effort, being based on a full stack for fast development. Many features can be implemented but the main ones right now are the following:
- Bybit exchange scrapper.
- Binance exchange scrapper.
- Bitget exchange scrapper.
- OKX exchange scrapper.
- Dockerize application.
- Chart for the exchange information.
- Panic mode (stoping bots and all orders, if necessary).
- Grid editor with live visualisation in a chart.
- Export trading records for financial books.
- Bot routines with WebHooks.
- Update app using UI.
- UI settings area.
- What2Trade + Direcctional Scalper.
Follow Passivbot installation guide, its better if you try to run a bot as indicated before linking into Antbot.
...
Setup instructions:
git clone git@github.com:kikoseijo/antbot.git
cd antbot
cp .env.example .env
sed -i 's#^APP_KEY=.*$#APP_KEY=base64:'`openssl rand -base64 32`'#g' .env
ln -s ../storage/app/public public/storage
docker-compose up -d
Update image with new code (including database migration):
docker-compose up -d --build
The data of mysql
and redis
is saved in those paths respectively:
antbot/docker/mysql/volume
antbot/docker/redis/volume
Antbot its a PHP + MYSQL application, can be run on any webserve, vps, etc. Use this guide as an example for remote deployment, adjust accord.
You can use this piece of script as an example of what steps are needed for installing Antbot.
ssh user@yourserver
cd ~
git clone git@github.com:kikoseijo/antbot.git
cd antbot
composer install --no-dev
cp .env.example .env
php artisan key:generate
php artisan storage:link
Docker equivalent:
git clone git@github.com:kikoseijo/antbot.git
cd antbot
cp .env.example .env
sed -i 's#^APP_KEY=.*$#APP_KEY=base64:'`openssl rand -base64 32`'#g' .env
ln -s ../storage/app/public public/storage
docker-compose up -d
The .env
file created in previous step needs your information for database, email and paths for bots to work.
Email configuration its important, application should be able to send emails at certain moments.
DB_DATABASE=antbot
DB_USERNAME=root
DB_PASSWORD=yorupassword
...
PYTHON_PATH="python3"
PASSIVBOT_PATH="/path/to/passivbot"
PASSIVBOT_LOGS_PATH="/path/to/logs_folder"
...
MAIL_USERNAME=null
MAIL_PASSWORD=null
Run the following command: for changes to be effective.
php artisan config:clear
Please note the root of your webserver should be a folder called public
inside Antbot installation folder.
cd ~
rm -rf public_html
ln -s ~/antbot/public ~/public_html
echo "App should be now live."
You are now ready to go, navigate to your new application url and register the first user (First user will be created as Admin).
Exchange scrapper needs a CronJob to run every minute, this will maintaine bots running even after reboots and keep exchanges up to date.
* * * * * cd /path/to/antbot && /opt/remi/php81/root/usr/bin/php artisan schedule:run >> /dev/null 2>&1
Passivbot comes with 3 run modes, its best starting point for someone new to Passivbot. You can leave this settings as default, just make sure the files linked are available inside Passivbot installation. You will also be able to create and edit your own grids directly from the control panel.
'grid_configs' => [
'recursive' => 'configs/live/recursive_grid_mode.example.json',
'neat' => 'configs/live/neat_grid_mode.example.json',
'static' => 'configs/live/static_grid_mode.example.json',
],
For updating antbot you can follow this steps, its not a zero downtime deployment, but we dont need such advance feature because bots are run separately from the application.
cd ~/antbot
php artisan down --render="errors::503" --refresh=10
git fetch --all
git reset --hard origin/master
git pull origin master
composer install --no-dev --prefer-dist --optimize-autoloader --ignore-platform-reqs
php artisan migrate --force
php artisan config:clear
php artisan config:cache
php artisan view:clear
php artisan view:cache
php artisan up
If you need help installing the application I'm able to provide you with my professional services, just give me a shout. I'll be pleased to do the job for you, choose the right VPS/Cloud Server or hosting provider around the world.
Debian user who wants to run locally with no webserver can achieve just following this steps.
- Install PHP
- Install Composer
- Install MySQL and created a db, and user.
- Git clone "antbot"
- Modify .env with sql infos from step 3
- cd to antbot folder
- composer install
- php artisan key:generate
- php artisan migrate:fresh --seed
- php artisan storage:link
- php artisan serve
Thank you for considering contributing to the Antbot system! The contribution guide its not jet released, but you can always push a new commit with what you can think of new functionality or fixing bugs.
If you discover a security vulnerability, please send an e-mail to Kiko Seijo via kikopc@gmail.com. All security vulnerabilities will be promptly addressed.
The Antbot is an open-sourced software licensed under the MIT license.
- Kiko Seijo Sunnyface.com
Sunnyface.com, is a software development company from Málaga, Spain. We provide quality software based on the cloud for local & international companies, providing technology solutions with the latest programming languages.
Special thanks: to supporters and clients that allows us contributing back to the WWW community.
DevOps Web development