Use docker/podman to start banbot:
git clone https://github.com/banbox/runbanbot.gitTo access the Binance API, you need to set a VPN proxy. You can enter the runbanbot directory and edit the .env file, changing the value of BANBOT_PROXY to your local VPN proxy, for example: http://host.docker.internal:7897
The
host.docker.internalabove is the address used by a Docker container to access the host machine. You may also runipconfigto check your LAN IP and replace it.
Note that you also need to enable "allow connections from the LAN" (or similar) in your VPN/proxy software.
Then execute the following command to start:
cd runbanbot
docker compose up -dThen open localhost:8000 in your browser to access it.
The
BanDataDirandBanStratDirenvironment variables are already configured within the container, so you do not need to configure them again when executing commands related to the documentation. The database uses the built-in QuestDB, no need to start a separate database service.
Banbot: From Beginner to Advanced
- Backtest existing strategies: Documentation
- Add new strategies: Documentation
- Live trading: Documentation
- Advanced customization: If you want to perform more advanced research, such as using banbot to obtain K-lines of multiple assets during the same period and calculate their correlation, you can download the banbot source code, open it in an AI IDE, attach doc/help.md as a knowledge base, and let AI help you write the required code.
Method 1: Upgrade by updating strats code:
git pull origin main
go mod tidy
go build -o bot
docker compose up -d banbotMethod 2: Upgrade by updating go.mod:
go get -u github.com/banbox/banbot
go mod tidy
go build -o bot
docker compose up -d banbotDocker is not installed on your machine. You may install either docker or podman:
After installing podman, you need to configure registries.conf to use Docker Hub by default; otherwise, image pulling will fail. Docker installation includes
docker compose; if you use podman, you need to installdocker-compose-v2separately. You may ask AI: How to use docker compose based on podman socket?
Your computer's CPU architecture is ARM. You need to modify docker-compose.yml and uncomment line 30, specifying platform: linux/amd64.