Merge pull request #42 from hummingbot/refactor/deploy-examples

refactor deploy-examples repo
This commit is contained in:
dardonacci
2024-04-23 19:25:50 -03:00
committed by GitHub
27 changed files with 207 additions and 2083 deletions

256
README.md
View File

@@ -1,83 +1,241 @@
# Deploying Hummingbot with Docker
# Deploy Multiple Hummingbot Instances with different profiles
## Intro
This guide explains how to install two [Hummingbot](https://github.com/hummingbot/hummingbot) instances. You can choose to configure the bots to use either a **master_account** or **sub_accounts** for credentials and API keys. This feature is particularly useful if you manage multiple API keys or have set up subaccounts on exchanges and wish for an easy method to switch between them.
This repository provides various examples of how to deploy Hummingbot using Docker Compose. [Hummingbot](https://github.com/hummingbot/hummingbot) is an open source framework that helps you build automated trading strategies, or bots that run on cryptocurrency exchanges, and [Docker Compose](https://docs.docker.com/compose/) is a tool for defining and running multi-container Docker applications
## Prerequisites
It also contains standalone bash scripts that assist you to setting up Hummingbot with Docker, but we recommend using Docker Compose instead.
This configuration requires [Docker Compose](https://docs.docker.com/compose/), a tool for defining and running multi-container Docker applications. The recommended way to get Docker Compose is to install [Docker Desktop](https://www.docker.com/products/docker-desktop/), which includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
See [Docker](./DOCKER.md) for more information about how to install and use Docker.
See [Docker](../DOCKER.md) for more information about how to install and use Docker Compose, as well as helpful commands.
## How do I use this repo?
## Getting Started
Each folder showcases a different deployment type using Docker Compose, such as:
* A single Hummingbot instance along with a dashboard that analyzes it
* A single Hummingbot instance that auto-starts a strategy or script
* Linked Hummingbot and Gateway instances
* Multiple instances of Hummingbot
Verify that Docker Compose is installed correctly by checking the version:
The important files in each folder are:
* `docker-compose.yml`: A sample configuration file for that deployment type.
* `README.md`: A detailed README file that guides users through the steps required to deploy Hummingbot using Docker, including how to build and run the containers, how to configure the bot, and how to monitor its performance.
```bash
docker compose version
```
The output should be: `Docker Compose version v2.17.2` or similar. Ensure that you are using Docker Compose V2, as V1 is deprecated.
## 1. Clone the **deploy-examples** repo
Clone the repository to your machine and navigate to the folder:
```
git clone https://github.com/hummingbot/deploy-examples.git
cd deploy-examples
```
## 2. Initial Configuration
### Create sub_account folder
By default, both bots will utilize the **master_account**. However, to configure the first bot with the **master_account** and the second bot with a **sub_account**—using a different Hummingbot password and API keys from the **master account**—follow the instructions below:
Create a new folder named **sub_account** under the **/credentials** folder, resulting in two folders:
```
deploy-examples/
├── credentials/
│ ├── master_account/
│ └── sub_account/
```
### Modify the Docker Compose file
Edit the Docker Compose file, updating the **bot_2** section to redirect the credentials folder to the newly created **sub_account** folder. Also, comment out the **environment** and **CONFIG_PASSWORD** fields for now, as we will be updating the password.
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
# environment:
# - CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Save your changes
### Launch Hummingbot
From the root folder, run the following command to download the image and start the instances:
After you have configured it properly, each deployment can be launched with the command:
```
docker compose up -d
```
## Deployment types using Docker Compose
Upon successful download, you should see an output similar to:
```
[+] Running 4/4
⠿ Network multiple_bots_setup Created
⠿ Container bot_1 Started
⠿ Container bot_2 Started
```
### [Hummingbot with Dashboard](./hummingbot_with_dashboard)
Both bots will be running but we will need to configure **bot_2** first so we will need to attach to it
⭐️⭐️⭐️ We recommend that new Hummingbot users follow this route ⭐️⭐️⭐️
```
docker attach bot_2
```
This installs a single [Hummingbot](https://github.com/hummingbot/hummingbot) instance with a companion [Hummingbot Dashboard](https://github.com/hummingbot/dashboard) running.
Set your preferred password for the **sub_account**, using **b** as an example. After setting the password, proceed to enter the API keys for your sub-accounts. Once completed, exit the Hummingbot client with:
### [Simple Hummingbot Compose](./simple_hummingbot_compose)
```
exit
```
This installs a single [Hummingbot](https://github.com/hummingbot/hummingbot) instance as a Docker container.
Then use **docker compose down** to exit out all the running instances
### [Autostart Hummingbot Compose](./autostart_hummingbot_compose)
This installs a single [Hummingbot](https://github.com/hummingbot/hummingbot) instance as a Docker container and automatically starts running a pre-configured script or strategy.
```
docker compose down
```
### [Hummingbot Gateway Compose](./hummingbot_gateway_compose)
### Update Docker Compose configuration
This installs a [Hummingbot](https://github.com/hummingbot/hummingbot) instance linked to a [Hummingbot Gateway](https://github.com/hummingbot/gateway) instance.
Edit the Docker Compose file again to enable auto-start with the new password. Uncomment the **environment** section and the **CONFIG_PASSWORD**, setting the password for **bot_2** as "**b**":
### [Multiple Hummingbot Gateway Compose](./multiple_hummingbot_gateway_compose)
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
This installs two [Hummingbot](https://github.com/hummingbot/hummingbot) instances, linked to a single [Hummingbot Gateway](https://github.com/hummingbot/gateway) instance.
```
### [Hummingbot Gateway Broker Compose](./hummingbot_gateway_broker_compose)
### Relaunch Hummingbot
This installs a [Hummingbot](https://github.com/hummingbot/hummingbot) instance linked to a [Hummingbot Gateway](https://github.com/hummingbot/gateway) instance, along with an EMQX [Broker](https://github.com/hummingbot/brokers).
After saving the updates to the Docker Compose file, restart the bots by running:
!!! note "Experimental deployment"
This deployment is still undergoing testing, so we recommend using the standalone deployments for message brokers from the [hummingbot/brokers](https://github.com/hummingbot/brokers) repository.
```
docker compose up -d
```
## [Bash scripts (older)](./bash_scripts)
These standalone bash scripts can also assist you to setting up Hummingbot and Gateway with Docker, but we recommend using Docker Compose instead.
To attach to any container use
The following operations are possible using the bash scripts:
```
docker attach [container name]
```
- Create a Hummingbot container
- Update the Hummingbot image version
- Start a stopped container of Hummingbot
- Create a Gateway container
- Copy the certificates to the corresponding gateway path
## Other Hummingbot Repos
### Adding more bots
Following this configuration, you can add more bots with different credentials by simply adjusting the **credentials** folder and **CONFIG_PASSWORD** field as needed. For instance, to add a third bot using **sub_account** credentials, append the Docker Compose file accordingly.
```bash hl_lines="1-2 5-6 12"
bot_3:
container_name: bot_3
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Here we added the name of the new bot to **bot_3**, made sure the credentials volume is mapped to the **sub_account** folder and set the autostart password for **sub_account** which is **b**
## Updating to the Latest Version of Hummingbot
Hummingbot and Hummingbot Gateway are updated on a monthly basis, with each new version marked by a code release on Github and DockerHub, accompanied by the publication of comprehensive release notes. To upgrade to the most recent version, you just need to pull the `latest` Docker images.
Follow the steps below to upgrade your Hummingbot system:
1. **Ensure no containers are running**
Before you initiate the update process, it is crucial to verify that no Docker containers are currently running. Use the following command to shut down any active containers:
```
docker compose down
```
2. **Fetch the latest Docker image**
Once you have confirmed that no containers are running, proceed to pull the latest Docker image. Use the following command to accomplish this:
```
docker pull hummingbot/hummingbot
```
3. **Start the updated containers**
Having pulled the latest Docker image, you can now start up your containers. They will be running the latest version of Hummingbot. Use the following command to start the containers:
```
docker compose up -d
```
With these steps, you will have successfully updated your Hummingbot to the latest version.
## Deleting unused Docker images
Use the below command to manually remove unused Docker images and free up space
```
docker rmi [image_name]
```
To remove all unused images, not just dangling ones, you can use:
```
docker image prune -a
```
This command removes all images without at least one container associated with them. Use it with caution, as it can remove images that you may wish to keep.
* [Hummingbot Docs](https://github.com/hummingbot/hummingbot-site): Official documentation for Hummingbot - we welcome contributions here too!
* [Awesome Hummingbot](https://github.com/hummingbot/awesome-hummingbot): All the Hummingbot links
* [Hummingbot StreamLit Apps](https://github.com/hummingbot/streamlit-apps): Hummingbot-related StreamLit data apps and dashboards
* [Community Tools](https://github.com/hummingbot/community-tools): Community contributed resources related to Hummingbot
* [Brokers](https://github.com/hummingbot/brokers): Different brokers that can be used to communicate with multiple instances of Hummingbot
* [Deploy Examples](https://github.com/hummingbot/deploy-examples): Deploy Hummingbot in various configurations with Docker
* [Remote Client](https://github.com/hummingbot/hbot-remote-client-py): A remote client for Hummingbot in Python
## Contributions
Hummingbot belongs to its community, so we welcome contributions! Users are encouraged to submit pull requests with their own examples and use cases for deploying Hummingbot with Docker.

View File

@@ -1,73 +0,0 @@
# Docker commands
## Setup
The followings scripts assume that [Docker](https://www.docker.com/) has already been installed.
They also assume that the user has Docker permissions without requiring `sudo`. If you do not have these permissions:
1. Enter the following command:
```
sudo usermod -a -G docker $USER
```
2. Run the following command to change the permissions of all files with the ".sh" extension in the current directory, making them executable for all users.:
```
chmod a+x *.sh
```
3. Log out and log back into your console to enable them.
## Hummingbot Client
### Create an instance of Hummingbot
The `hummingbot-create.sh` script will create the folders needed to run Hummingbot and then install Hummingbot.
```
./hummingbot-create.sh
```
### Start up / connect to an instance of Hummingbot
The `hummingbot-start.sh` script will connect to a running instance of Hummingbot.
```
./hummingbot-start.sh
```
### Updating Hummingbot version
The `hummingbot-update.sh` script will update your instance to the latest version of Hummingbot.
```
./hummingbot-update.sh
```
## Gateway
### Create Gateway Instance
The `gateway-create.sh` script helps you pull, configure, and run the Gateway Docker image.
```
./gateway-create.sh
```
### Copy Hummingbot Certs
If you didn't do this step during `gateway-create.sh`, the `gateway-copy-certs.sh` script helps you copy the SSL certificates generated by Hummingbot into your Gateway files `certs` folder. This lets your Hummingbot instance access Gateway securely.
```
./gateway-copy-certs.sh
```
### Useful Commands
These commands assume a Gateway container with the default instance name `gateway`:
* List all Gateway containers: `docker ps -a --filter ancestor=hummingbot/gateway`
* Start Gateway container and attach to it: `docker start gateway && docker attach gateway`
* Stop Gateway container: `docker stop gateway`
* Update Gateway container to latest version: `docker pull hummingbot/gateway:latest`
* Remove Gateway container: `docker rm gateway`

View File

@@ -1,89 +0,0 @@
#!/bin/bash
# init
# =============================================
echo
echo
echo "=============== COPY CERTS TO GATEWAY FOLDER ==============="
echo
echo " Press [ENTER] for default values:"
echo
# Ask for Gateway instance name
echo "List of all Gateway containers:"
docker ps -a --filter ancestor=hummingbot/gateway
echo
read -p "Enter Gateway container name (default = \"gateway\") >>> " INSTANCE_NAME
echo
if [ "$INSTANCE_NAME" == "" ]
then
INSTANCE_NAME="gateway"
fi
DEFAULT_FOLDER="${INSTANCE_NAME}_files/certs"
echo
echo "Stopping container: $INSTANCE_NAME"
docker stop $INSTANCE_NAME
# Ask for path to Hummingbot certs folder
read -p "Enter path to the Hummingbot certs folder >>> " CERTS_FROM_PATH
if [ ! -d "$CERTS_FROM_PATH" ]; then
echo "Error: $CERTS_FROM_PATH does not exist or is not a directory"
exit
fi
# Ask for path to Gateway files folder
read -p "Enter path to the Gateway certs folder (default = \"./gateway-files/certs/\") >>> " FOLDER
if [ "$FOLDER" == "" ]
then
FOLDER=$PWD/$DEFAULT_FOLDER
elif [[ ${FOLDER::1} != "/" ]]; then
FOLDER=$PWD/$FOLDER
fi
CERTS_TO_PATH="$FOLDER"
prompt_proceed () {
read -p "Do you want to proceed? [Y/N] >>> " PROCEED
if [ "$PROCEED" == "" ]
then
prompt_proceed
else
if [[ "$PROCEED" != "Y" && "$PROCEED" != "y" ]]
then
PROCEED="N"
fi
fi
}
copy_certs () {
# Copy all files in the source folder to the destination folder
cp -r $CERTS_FROM_PATH/* $CERTS_TO_PATH/
# Confirm that the files were copied
echo
if [ $? -eq 0 ]; then
echo "Files successfully copied from $CERTS_FROM_PATH to $CERTS_TO_PATH"
else
echo "Error copying files from $CERTS_FROM_PATH to $CERTS_TO_PATH"
exit
fi
echo "Starting container: $INSTANCE_NAME"
docker start $INSTANCE_NAME && docker attach $INSTANCE_NAME
echo
}
# Ask user to confirm and proceed
echo
echo " Confirm if this is correct:"
echo
printf "%30s %5s\n" "Copy certs FROM:" "$CERTS_FROM_PATH"
printf "%30s %5s\n" "Copy certs TO:" "$CERTS_TO_PATH"
echo
prompt_proceed
if [[ "$PROCEED" == "Y" || "$PROCEED" == "y" ]]
then
copy_certs
else
echo "Exiting..."
exit
fi

View File

@@ -1,186 +0,0 @@
#!/bin/bash
# init
echo
echo
echo "=============== CREATE A NEW GATEWAY INSTANCE ==============="
echo
echo
echo " Press [ENTER] for default values:"
echo
echo
read -p "Enter Gateway version you want to use [latest/latest-arm] (default = \"latest\") >>> " GATEWAY_TAG
if [ "$GATEWAY_TAG" == "" ]
then
GATEWAY_TAG="latest"
fi
# Ask the user for the name of the new Gateway instance
read -p "Enter a name for your new Gateway instance (default = \"gateway\") >>> " INSTANCE_NAME
if [ "$INSTANCE_NAME" == "" ]
then
INSTANCE_NAME="gateway"
DEFAULT_FOLDER="gateway_files"
else
DEFAULT_FOLDER="${INSTANCE_NAME}_files"
fi
# Ask the user for the folder location to save files
read -p "Enter the folder name where your Gateway files will be saved (default = \"$DEFAULT_FOLDER\") >>> " FOLDER
if [ "$FOLDER" == "" ]
then
FOLDER=$PWD/$DEFAULT_FOLDER
elif [[ ${FOLDER::1} != "/" ]]; then
FOLDER=$PWD/$FOLDER
fi
CONF_FOLDER="$FOLDER/conf"
LOGS_FOLDER="$FOLDER/logs"
DB_FOLDER="$FOLDER/db"
CERTS_FOLDER="$FOLDER/certs"
# Ask the user for the hummingbot certs passphrase
prompt_passphrase () {
echo
read -s -p "Enter the passphrase you used to generate certificates in Hummingbot >>> " PASSPHRASE
if [ "$PASSPHRASE" == "" ]
then
echo
echo
echo "!! Error: passphrase cannot be blank"
prompt_passphrase
fi
}
prompt_passphrase
# Get GMT offset from local system time
GMT_OFFSET=$(date +%z)
# Check available open port for Gateway
GATEWAY_PORT=15888
LIMIT=$((GATEWAY_PORT+1000))
while [[ $GATEWAY_PORT -le LIMIT ]]
do
if [[ $(netstat -nat | grep "$GATEWAY_PORT") ]]; then
# check another port
((GATEWAY_PORT = GATEWAY_PORT + 1))
else
break
fi
done
# Check available open port for Gateway docs
DOCS_PORT=8080
LIMIT=$((DOCS_PORT+1000))
while [[ $DOCS_PORT -le LIMIT ]]
do
if [[ $(netstat -nat | grep "$DOCS_PORT") ]]; then
# check another port
((DOCS_PORT = DOCS_PORT + 1))
else
break
fi
done
echo
echo " Confirm below if the instance and its folders are correct:"
echo
printf "%30s %5s\n" "Gateway instance name:" "$INSTANCE_NAME"
printf "%30s %5s\n" "Version:" "hummingbot/gateway:$GATEWAY_TAG"
echo
printf "%30s %5s\n" "Hummingbot instance ID:" "$HUMMINGBOT_INSTANCE_ID"
printf "%30s %5s\n" "Gateway conf path:" "$CONF_FOLDER"
printf "%30s %5s\n" "Gateway logs path:" "$LOGS_FOLDER"
printf "%30s %5s\n" "Gateway db path:" "$DB_FOLDER"
printf "%30s %5s\n" "Gateway certs path:" "$CERTS_FOLDER"
printf "%30s %5s\n" "Gateway port:" "$GATEWAY_PORT"
printf "%30s %5s\n" "Gateway docs port:" "$DOCS_PORT"
echo
prompt_existing_certs_path () {
echo
read -p "Enter the path to the folder where Hummingbot certificates are stored >>> " CERTS_PATH_TO_COPY
if [ "$CERTS_PATH_TO_COPY" == "" ]
then
echo
echo "After installation, set certificatePath in $CONF_FOLDER/server.yml and restart Gateway"
else
# Check if source folder exists
if [ ! -d "$CERTS_PATH_TO_COPY" ]; then
echo "Error: $CERTS_PATH_TO_COPY does not exist or is not a directory"
exit 1
fi
# Copy all files in the source folder to the destination folder
cp -r $CERTS_PATH_TO_COPY/* $CERTS_FOLDER/
# Confirm that the files were copied
if [ $? -eq 0 ]; then
echo "Files successfully copied from $CERTS_PATH_TO_COPY to $CERTS_FOLDER"
else
echo "Error copying files from $CERTS_PATH_TO_COPY to $CERTS_FOLDER"
exit 1
fi
fi
}
prompt_proceed () {
echo
read -p "Do you want to proceed with installation? [Y/N] >>> " PROCEED
if [ "$PROCEED" == "" ]
then
prompt_proceed
else
if [[ "$PROCEED" != "Y" && "$PROCEED" != "y" ]]
then
PROCEED="N"
fi
fi
}
prompt_copy_certs () {
echo
read -p "Do you want to generate certs from a Hummingbot instance? [Y/N] >>> " PROCEED
if [[ "$PROCEED" == "Y" || "$PROCEED" == "y" ]]
then
mkdir $CERTS_FOLDER
sudo chmod a+rw $CERTS_FOLDER
prompt_existing_certs_path
fi
}
# Execute docker commands
create_instance () {
echo
echo "Creating Gateway instance ... "
echo
# 1) Create main folder for your new instance
mkdir $FOLDER
# 2) Create subfolders for gateway files
mkdir $CONF_FOLDER
mkdir $LOGS_FOLDER
# 3) Set required permissions to save gateway passphrase the first time
sudo chmod a+rw $CONF_FOLDER
# 4) Prompt user whether to copy over the Hummingbot certs
prompt_copy_certs
# Launch a new instance of gateway
docker run -d \
--name $INSTANCE_NAME \
-p $GATEWAY_PORT:15888 \
-p $DOCS_PORT:8080 \
-v $CONF_FOLDER:/home/gateway/conf \
-v $LOGS_FOLDER:/home/gateway/logs \
-v $DB_FOLDER:/home/gateway/db \
-v $CERTS_FOLDER:/home/gateway/certs \
-e GATEWAY_PASSPHRASE="$PASSPHRASE" \
hummingbot/gateway:$GATEWAY_TAG
}
prompt_proceed
if [[ "$PROCEED" == "Y" || "$PROCEED" == "y" ]]
then
create_instance
else
echo "Aborted"
echo
fi

View File

@@ -1,107 +0,0 @@
#!/bin/bash
# init
echo
echo
echo "=============== CREATE A NEW HUMMINGBOT INSTANCE ==============="
echo
echo
echo " Press [ENTER] for default values:"
echo
# Specify hummingbot version
read -p " Enter Hummingbot version you want to use [latest/development] (default = \"latest\") >>> " TAG
if [ "$TAG" == "" ]
then
TAG="latest"
fi
# Ask the user for the name of the new instance
read -p " Enter a name for your new Hummingbot instance (default = \"hummingbot\") >>> " INSTANCE_NAME
if [ "$INSTANCE_NAME" == "" ]
then
INSTANCE_NAME="hummingbot"
DEFAULT_FOLDER="hummingbot_files"
else
DEFAULT_FOLDER="${INSTANCE_NAME}_files"
fi
# Ask the user for the folder location to save files
read -p " Enter a folder name where your Hummingbot files will be saved (default = \"$DEFAULT_FOLDER\") >>> " FOLDER
if [ "$FOLDER" == "" ]
then
FOLDER=$PWD/$DEFAULT_FOLDER
elif [[ ${FOLDER::1} != "/" ]]; then
FOLDER=$PWD/$FOLDER
fi
CONF_FOLDER="$FOLDER/conf"
LOGS_FOLDER="$FOLDER/logs"
DATA_FOLDER="$FOLDER/data"
PMM_SCRIPTS_FOLDER="$FOLDER/pmm-scripts"
SCRIPTS_FOLDER="$FOLDER/scripts"
CERTS_FOLDER="$FOLDER/certs"
echo
echo " Confirm below if the instance and its folders are correct:"
echo
printf "%30s %5s\n" "Instance name:" "$INSTANCE_NAME"
printf "%30s %5s\n" "Version:" "hummingbot/hummingbot:$TAG"
echo
printf "%30s %5s\n" "Main folder path:" "$FOLDER"
printf "%30s %5s\n" "Config files:" "├── $CONF_FOLDER"
printf "%30s %5s\n" "Log files:" "├── $LOGS_FOLDER"
printf "%30s %5s\n" "Trade and data files:" "├── $DATA_FOLDER"
printf "%30s %5s\n" "PMM scripts files:" "├── $PMM_SCRIPTS_FOLDER"
printf "%30s %5s\n" "Scripts files:" "├── $SCRIPTS_FOLDER"
printf "%30s %5s\n" "Cert files:" "├── $CERTS_FOLDER"
echo
prompt_proceed () {
read -p " Do you want to proceed? [Y/N] >>> " PROCEED
if [ "$PROCEED" == "" ]
then
PROCEED="Y"
fi
}
# Execute docker commands
create_instance () {
echo
echo "Creating Hummingbot instance ... Admin password may be required to set the required permissions ..."
echo
# 1) Create main folder for your new instance
mkdir $FOLDER
# 2) Create subfolders for hummingbot files
mkdir $CONF_FOLDER
mkdir $CONF_FOLDER/connectors
mkdir $CONF_FOLDER/strategies
mkdir $LOGS_FOLDER
mkdir $DATA_FOLDER
mkdir $PMM_SCRIPTS_FOLDER
mkdir $CERTS_FOLDER
mkdir $SCRIPTS_FOLDER
# 3) Set required permissions to save hummingbot password the first time
sudo chmod a+rw $CONF_FOLDER $CERTS_FOLDER
# 4) Launch a new instance of hummingbot
docker run -it --log-opt max-size=10m --log-opt max-file=5 \
--name $INSTANCE_NAME \
--network host \
-v $CONF_FOLDER:/home/hummingbot/conf \
-v $CONF_FOLDER/connectors:/home/hummingbot/conf/connectors \
-v $CONF_FOLDER/strategies:/home/hummingbot/conf/strategies \
-v $LOGS_FOLDER:/home/hummingbot/logs \
-v $DATA_FOLDER:/home/hummingbot/data \
-v $PMM_SCRIPTS_FOLDER:/home/hummingbot/pmm_scripts \
-v $SCRIPTS_FOLDER:/home/hummingbot/scripts \
-v $CERTS_FOLDER:/home/hummingbot/certs \
hummingbot/hummingbot:$TAG
}
prompt_proceed
if [[ "$PROCEED" == "Y" || "$PROCEED" == "y" ]]
then
create_instance
else
echo " Aborted"
echo
fi

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# init
# =============================================
# SCRIPT COMMANDS
echo
echo "=============== START HUMMINGBOT INSTANCE ==============="
echo
echo "List of all docker instances:"
echo
docker ps -a
echo
echo
read -p " Enter the NAME of the Hummingbot instance to start or connect to (default = \"hummingbot\") >>> " INSTANCE_NAME
if [ "$INSTANCE_NAME" == "" ]
then
INSTANCE_NAME="hummingbot"
fi
echo
# =============================================
# EXECUTE SCRIPT
docker start $INSTANCE_NAME && docker attach $INSTANCE_NAME

View File

@@ -1,150 +0,0 @@
#!/bin/bash
# init
# =============================================
# Specify hummingbot version
select_version () {
echo
echo
echo "=============== UPDATE HUMMINGBOT INSTANCE ==============="
echo
echo
echo " Press [ENTER] for default values:"
echo
read -p " Enter Hummingbot version to update [latest/development] (default = \"latest\") >>> " TAG
if [ "$TAG" == "" ]
then
TAG="latest"
fi
}
# List all docker instances using the same image
list_instances () {
echo
echo "List of all docker containers using the \"$TAG\" version:"
echo
docker ps -a --filter ancestor=hummingbot/hummingbot:$TAG
echo
echo "⚠️ WARNING: This will attempt to update all instances. Any containers not in Exited () STATUS will cause the update to fail."
echo
echo " TIP: Connect to a running instance using \"./start.sh\" command and \"exit\" from inside Hummingbot."
echo " TIP: You can also remove unused instances by running \"docker rm [NAME]\" in the terminal."
echo
read -p " Do you want to continue? [Y/N] >>> " CONTINUE
if [ "$CONTINUE" == "" ]
then
CONTINUE="Y"
fi
}
# List all directories in the current folder
list_dir () {
echo
echo " List of folders in your directory:"
echo
ls -d1 */ 2>&1 | sed 's/^/ 📁 /'
echo
}
# Ask the user for the folder location of each instance
prompt_folder () {
for instance in "${INSTANCES[@]}"
do
if [ "$instance" == "hummingbot-instance" ]
then
DEFAULT_FOLDER="hummingbot_files"
else
DEFAULT_FOLDER="${instance}_files"
fi
read -p " Enter the destination folder for $instance (default = \"$DEFAULT_FOLDER\") >>> " FOLDER
if [ "$FOLDER" == "" ]
then
FOLDER=$PWD/$DEFAULT_FOLDER
elif [[ ${FOLDER::1} != "/" ]]; then
FOLDER=$PWD/$FOLDER
fi
# Store folder names into an array
FOLDERS+=($FOLDER)
done
}
# Display instances and destination folders then prompt to proceed
confirm_update () {
echo
echo " Confirm below if the instances and their folders are correct:"
echo
num="0"
printf "%30s %5s %10s\n" "INSTANCE" " " "FOLDER"
for instance in "${INSTANCES[@]}"
do
printf "%30s %5s %10s\n" ${INSTANCES[$num]} " ----------> " ${FOLDERS[$num]}
num=$[$num+1]
done
echo
read -p " Proceed? [Y/N] >>> " PROCEED
if [ "$PROCEED" == "" ]
then
PROCEED="Y"
fi
}
# Execute docker commands
execute_docker () {
# 1) Delete instance and old hummingbot image
echo
echo "Removing docker containers first ..."
docker rm ${INSTANCES[@]}
echo
# 2) Delete old image
docker image rm hummingbot/hummingbot:$TAG
# 3) Re-create instances with the most recent hummingbot version
echo "Re-creating docker containers with updated image ..."
j="0"
for instance in "${INSTANCES[@]}"
do
docker run -itd --log-opt max-size=10m --log-opt max-file=5 \
--network host \
--name ${INSTANCES[$j]} \
-v ${FOLDERS[$j]}/conf:/home/hummingbot/conf \
-v ${FOLDERS[$j]}/conf/connectors:/home/hummingbot/conf/connectors \
-v ${FOLDERS[$j]}/conf/strategies:/home/hummingbot/conf/strategies \
-v ${FOLDERS[$j]}/logs:/home/hummingbot/logs \
-v ${FOLDERS[$j]}/data:/home/hummingbot/data \
-v ${FOLDERS[$j]}/pmm-scripts:/home/hummingbot/pmm-scripts \
-v ${FOLDERS[$j]}/scripts:/home/hummingbot/scripts \
-v ${FOLDERS[$j]}/certs:/home/hummingbot/certs \
hummingbot/hummingbot:$TAG
j=$[$j+1]
# Update file ownership
done
echo
echo "Update complete! All running docker instances:"
echo
docker ps
echo
echo " Run command \"./hummingbot-start.sh\" to connect to an instance."
echo
}
select_version
list_instances
if [ "$CONTINUE" == "Y" ]
then
# Store instance names in an array
declare -a INSTANCES
INSTANCES=( $(docker ps -a --filter ancestor=hummingbot/hummingbot:$TAG --format "{{.Names}}") )
list_dir
declare -a FOLDERS
prompt_folder
confirm_update
if [ "$PROCEED" == "Y" ]
then
execute_docker
else
echo " Update aborted"
echo
fi
else
echo " Update aborted"
echo
fi

View File

@@ -1,4 +1,3 @@
version: "3.9"
services:
bot_1:
container_name: bot_1

View File

@@ -1,241 +0,0 @@
# Deploy Multiple Hummingbot Instances with different profiles
This guide explains how to install two [Hummingbot](https://github.com/hummingbot/hummingbot) instances. You can choose to configure the bots to use either a **master_account** or **sub_accounts** for credentials and API keys. This feature is particularly useful if you manage multiple API keys or have set up subaccounts on exchanges and wish for an easy method to switch between them.
## Prerequisites
This configuration requires [Docker Compose](https://docs.docker.com/compose/), a tool for defining and running multi-container Docker applications. The recommended way to get Docker Compose is to install [Docker Desktop](https://www.docker.com/products/docker-desktop/), which includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
See [Docker](../DOCKER.md) for more information about how to install and use Docker Compose, as well as helpful commands.
## Getting Started
Verify that Docker Compose is installed correctly by checking the version:
```bash
docker compose version
```
The output should be: `Docker Compose version v2.17.2` or similar. Ensure that you are using Docker Compose V2, as V1 is deprecated.
## 1. Clone the **deploy-examples** repo
Clone the repository to your machine and navigate to the folder:
```
git clone https://github.com/hummingbot/deploy-examples.git
cd deploy-examples/multiple_bots_setup
```
## 2. Initial Configuration
### Create sub_account folder
By default, both bots will utilize the **master_account**. However, to configure the first bot with the **master_account** and the second bot with a **sub_account**—using a different Hummingbot password and API keys from the **master account**—follow the instructions below:
Create a new folder named **sub_account** under the **multiple_bots_setup/credentials** folder, resulting in two folders:
```
multiple_bots_setup/
├── credentials/
│ ├── master_account/
│ └── sub_account/
```
### Modify the Docker Compose file
Edit the Docker Compose file, updating the **bot_2** section to redirect the credentials folder to the newly created **sub_account** folder. Also, comment out the **environment** and **CONFIG_PASSWORD** fields for now, as we will be updating the password.
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
# environment:
# - CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Save your changes
### Launch Hummingbot
From the root folder, run the following command to download the image and start the instances:
```
docker compose up -d
```
Upon successful download, you should see an output similar to:
```
[+] Running 4/4
⠿ Network multiple_bots_setup Created
⠿ Container bot_1 Started
⠿ Container bot_2 Started
```
Both bots will be running but we will need to configure **bot_2** first so we will need to attach to it
```
docker attach bot_2
```
Set your preferred password for the **sub_account**, using **b** as an example. After setting the password, proceed to enter the API keys for your sub-accounts. Once completed, exit the Hummingbot client with:
```
exit
```
Then use **docker compose down** to exit out all the running instances
```
docker compose down
```
### Update Docker Compose configuration
Edit the Docker Compose file again to enable auto-start with the new password. Uncomment the **environment** section and the **CONFIG_PASSWORD**, setting the password for **bot_2** as "**b**":
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
### Relaunch Hummingbot
After saving the updates to the Docker Compose file, restart the bots by running:
```
docker compose up -d
```
To attach to any container use
```
docker attach [container name]
```
### Adding more bots
Following this configuration, you can add more bots with different credentials by simply adjusting the **credentials** folder and **CONFIG_PASSWORD** field as needed. For instance, to add a third bot using **sub_account** credentials, append the Docker Compose file accordingly.
```bash hl_lines="1-2 5-6 12"
bot_3:
container_name: bot_3
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Here we added the name of the new bot to **bot_3**, made sure the credentials volume is mapped to the **sub_account** folder and set the autostart password for **sub_account** which is **b**
## Updating to the Latest Version of Hummingbot
Hummingbot and Hummingbot Gateway are updated on a monthly basis, with each new version marked by a code release on Github and DockerHub, accompanied by the publication of comprehensive release notes. To upgrade to the most recent version, you just need to pull the `latest` Docker images.
Follow the steps below to upgrade your Hummingbot system:
1. **Ensure no containers are running**
Before you initiate the update process, it is crucial to verify that no Docker containers are currently running. Use the following command to shut down any active containers:
```
docker compose down
```
2. **Fetch the latest Docker image**
Once you have confirmed that no containers are running, proceed to pull the latest Docker image. Use the following command to accomplish this:
```
docker pull hummingbot/hummingbot
```
3. **Start the updated containers**
Having pulled the latest Docker image, you can now start up your containers. They will be running the latest version of Hummingbot. Use the following command to start the containers:
```
docker compose up -d
```
With these steps, you will have successfully updated your Hummingbot to the latest version.
## Deleting unused Docker images
Use the below command to manually remove unused Docker images and free up space
```
docker rmi [image_name]
```
To remove all unused images, not just dangling ones, you can use:
```
docker image prune -a
```
This command removes all images without at least one container associated with them. Use it with caution, as it can remove images that you may wish to keep.

View File

@@ -1,314 +0,0 @@
# Deploy Multiple Instances with Gateway and Dashboard
This guide explains how to install two [Hummingbot](https://github.com/hummingbot/hummingbot) instances. You can choose to configure the bots to use either a **master_account** or **sub_accounts** for credentials and API keys. This feature is particularly useful if you manage multiple API keys or have set up subaccounts on exchanges and wish for an easy method to switch between them.
## Prerequisites
This configuration requires [Docker Compose](https://docs.docker.com/compose/), a tool for defining and running multi-container Docker applications. The recommended way to get Docker Compose is to install [Docker Desktop](https://www.docker.com/products/docker-desktop/), which includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
See [Docker](../DOCKER.md) for more information about how to install and use Docker Compose, as well as helpful commands.
## Getting Started
Verify that Docker Compose is installed correctly by checking the version:
```bash
docker compose version
```
The output should be: `Docker Compose version v2.17.2` or similar. Ensure that you are using Docker Compose V2, as V1 is deprecated.
## 1. Clone the **deploy-examples** repo
Clone the repository to your machine and navigate to the folder:
```
git clone https://github.com/hummingbot/deploy-examples.git
cd deploy-examples/multiple_bots_setupp
```
## 2. Initial Configuration
### Create sub_account folder
By default, both bots will utilize the **master_account**. However, to configure the first bot with the **master_account** and the second bot with a **sub_account**—using a different Hummingbot password and API keys from the **master account**—follow the instructions below:
Create a new folder named **sub_account** under the **multiple_bots_setup/credentials** folder, resulting in two folders:
```
multiple_bots_setup/
├── credentials/
│ ├── master_account/
│ └── sub_account/
```
### Modify the Docker Compose file
Edit the Docker Compose file, updating the **bot_2** section to redirect the credentials folder to the newly created **sub_account** folder. Also, comment out the **environment** and **CONFIG_PASSWORD** fields for now, as we will be updating the password.
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
# environment:
# - CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Save your changes
### Launch Hummingbot
From the root folder, run the following command to download the image and start the instances:
```
docker compose up -d
```
Upon successful download, you should see an output similar to:
```
[+] Running 4/4
⠿ Network multiple_bots_setup Created
⠿ Container bot_1 Started
⠿ Container bot_2 Started
```
Both bots will be running but we will need to configure **bot_2** first so we will need to attach to it
```
docker attach bot_2
```
Set your preferred password for the **sub_account**, using **b** as an example. After setting the password, proceed to enter the API keys for your sub-accounts. Once completed, exit the Hummingbot client with:
```
exit
```
Then use **docker compose down** to exit out all the running instances
```
docker compose down
```
### Update Docker Compose configuration
Edit the Docker Compose file again to enable auto-start with the new password. Uncomment the **environment** section and the **CONFIG_PASSWORD**, setting the password for **bot_2** as "**b**":
```bash hl_lines="5-6 12"
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
### Relaunch Hummingbot
After saving the updates to the Docker Compose file, restart the bots by running:
```
docker compose up -d
```
To attach to any container use
```
docker attach [container name]
```
### Adding more bots
Following this configuration, you can add more bots with different credentials by simply adjusting the **credentials** folder and **CONFIG_PASSWORD** field as needed. For instance, to add a third bot using **sub_account** credentials, append the Docker Compose file accordingly.
```bash hl_lines="1-2 5-6 12"
bot_3:
container_name: bot_3
image: hummingbot/hummingbot:development
volumes:
- ./credentials/sub_account:/home/hummingbot/conf
- ./credentials/sub_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
environment:
- CONFIG_PASSWORD=b
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
```
Here we added the name of the new bot to **bot_3**, made sure the credentials volume is mapped to the **sub_account** folder and set the autostart password for **sub_account** which is **b**
## Running Gateway
### Set Permissions
Run this command from your root folder to grant read/write permission to the `hummingbot_files` and `gateway_files` sub-folders:
```
sudo chmod -R a+rw ./hummingbot_files ./gateway_files
```
### Start the instance
From the root folder, run the following command to pull the image and start the instance:
```
docker compose up -d
```
Run the following command to generate Gateway certificates:
```
gateway generate-certs
```
Afterwards, run `exit` to exit Hummingbot.
### Stop the running containers
```
docker compose down
```
### Modify YAML file
Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file.
Edit the section that defines the `CONFIG_PASSWORD` and `CONFIG_FILE_NAME` environment variables:
```yaml
hummingbot:
# environment:
# - CONFIG_PASSWORD=a
gateway:
# environment:
# - GATEWAY_PASSPHRASE=a
```
Uncomment out:
* The `environment:` lines
* The `CONFIG_PASSWORD` lines: add your Hummingbot password
* The `GATEWAY_PASSPHRASE` line: add the passphrase you used to generate the certificates
The final `environment` section of the YAML file should look like this:
```yaml
bot:
environment:
- CONFIG_PASSWORD=a
gateway:
environment:
- GATEWAY_PASSPHRASE=a
```
Afterwards, save the file.
### Restart and attach to containers
Now, recreate the Compose project:
```
docker compose up -d
```
Attach to the `hummingbot` instance. If you have defined `CONFIG_PASSWORD` in the YAML file, you don't need to enter it again:
```
docker attach hummingbot
```
After you enter your password, you should now see `GATEWAY:ONLINE` in the upper-right hand corner.
Open a new Terminal/Bash window. In it, attach to the Gateway `gateway` instance to see its logs:
```
docker attach gateway
```
See [Gateway](https://docs.hummingbot.org/gateway/) for more details on how to configure it for use with Hummingbot.
## Running Dashboard
Go to http://localhost:8501 in your browser to see the Dashboard.
## Updating to the Latest Version of Hummingbot
Hummingbot and Hummingbot Gateway are updated on a monthly basis, with each new version marked by a code release on Github and DockerHub, accompanied by the publication of comprehensive release notes. To upgrade to the most recent version, you just need to pull the `latest` Docker images.
Follow the steps below to upgrade your Hummingbot system:
1. **Ensure no containers are running**
Before you initiate the update process, it is crucial to verify that no Docker containers are currently running. Use the following command to shut down any active containers:
```
docker compose down
```
2. **Fetch the latest Docker image**
Once you have confirmed that no containers are running, proceed to pull the latest Docker image. Use the following command to accomplish this:
```
docker pull hummingbot/hummingbot
```
3. **Start the updated containers**
Having pulled the latest Docker image, you can now start up your containers. They will be running the latest version of Hummingbot. Use the following command to start the containers:
```
docker compose up -d
```
With these steps, you will have successfully updated your Hummingbot to the latest version.

View File

@@ -1,44 +0,0 @@
id: C9tpX3BQDVcUt3Ea7NhrgTMEXx96TZFjzjojj4eWfJnW
controller_name: dman_maker
controller_type: market_making
candles_config: []
connector_name: okx_perpetual
trading_pair: DOGE-USDT
total_amount_quote: 400.0
buy_spreads:
- 0.0002
- 0.02
- 0.05
- 0.08
sell_spreads:
- 0.0002
- 0.02
- 0.05
- 0.08
buy_amounts_pct:
- 1
- 1
- 1
- 1
sell_amounts_pct:
- 1
- 1
- 1
- 1
executor_refresh_time: 20
cooldown_time: 15
leverage: 20
position_mode: HEDGE
stop_loss: 0.1
take_profit: 0.05
time_limit: 604800
take_profit_order_type: 2
trailing_stop:
activation_price: 0.015
trailing_delta: 0.002
dca_amount_ratio_increase: 2.0
dca_levels: 3
top_order_start_spread: 0.00001
start_spread: 0.05
spread_ratio_increase: 2.0
executor_activation_bounds: [0.005]

View File

@@ -1,6 +0,0 @@
markets: {}
candles_config: []
controllers_config:
- conf_market_making.dman_maker_1.yml
config_update_interval: 20
script_file_name: v2_generic_with_controllers.py

View File

@@ -1 +0,0 @@
7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226464366438333638316237393537303131616464373238386139653237356662227d2c202263697068657274657874223a20226662656233303330396263386664653138383634222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223338613137396530616364626165633138663036363738643963313735313961227d2c20226d6163223a202236316534383435333338323535656533316439373061393961373832303063373065336637366565616665343961373334326162343630343931663236666434227d2c202276657273696f6e223a20332c2022616c696173223a2022227d

View File

@@ -1,194 +0,0 @@
####################################
### client_config_map config ###
####################################
instance_id: 19fbe60abcc144b1752c16a09d94ad4ce633ff3d
# Fetch trading pairs from all exchanges if True, otherwise fetch only from connected exchanges.
fetch_pairs_from_all_exchanges: false
log_level: INFO
debug_console: false
strategy_report_interval: 900.0
logger_override_whitelist:
- hummingbot.strategy.arbitrage
- hummingbot.strategy.cross_exchange_market_making
- conf
log_file_path: /home/hummingbot/logs
kill_switch_mode: {}
# What to auto-fill in the prompt after each import command (start/config)
autofill_import: disabled
telegram_mode: {}
# MQTT Bridge configuration.
mqtt_bridge:
mqtt_host: localhost
mqtt_port: 1883
mqtt_username: ''
mqtt_password: ''
mqtt_namespace: hbot
mqtt_ssl: false
mqtt_logger: true
mqtt_notifier: true
mqtt_commands: true
mqtt_events: true
mqtt_external_events: true
mqtt_autostart: false
# Error log sharing
send_error_logs: true
# Can store the previous strategy ran for quick retrieval.
previous_strategy: null
# Advanced database options, currently supports SQLAlchemy's included dialects
# Reference: https://docs.sqlalchemy.org/en/13/dialects/
# To use an instance of SQLite DB the required configuration is
# db_engine: sqlite
# To use a DBMS the required configuration is
# db_host: 127.0.0.1
# db_port: 3306
# db_username: username
# db_password: password
# db_name: dbname
db_mode:
db_engine: sqlite
pmm_script_mode: {}
# Balance Limit Configurations
# e.g. Setting USDT and BTC limits on Binance.
# balance_asset_limit:
# binance:
# BTC: 0.1
# USDT: 1000
balance_asset_limit:
kucoin: {}
polkadex: {}
coinbase_pro: {}
injective_v2: {}
bitmex: {}
binance: {}
bybit_testnet: {}
mexc: {}
kraken: {}
okx: {}
btc_markets: {}
woo_x_testnet: {}
bitmart: {}
vertex_testnet: {}
bitfinex: {}
ascend_ex: {}
ndax_testnet: {}
gate_io: {}
woo_x: {}
huobi: {}
hitbtc: {}
bitmex_testnet: {}
bybit: {}
binance_us: {}
vertex: {}
ndax: {}
foxbit: {}
# Fixed gas price (in Gwei) for Ethereum transactions
manual_gas_price: 50.0
# Gateway API Configurations
# default host to only use localhost
# Port need to match the final installation port for Gateway
gateway:
gateway_api_host: localhost
gateway_api_port: '15888'
certs_path: /home/hummingbot/certs
# Whether to enable aggregated order and trade data collection
anonymized_metrics_mode:
anonymized_metrics_interval_min: 15.0
# Command Shortcuts
# Define abbreviations for often used commands
# or batch grouped commands together
command_shortcuts:
- command: spreads
help: Set bid and ask spread
arguments:
- Bid Spread
- Ask Spread
output:
- config bid_spread $1
- config ask_spread $2
# A source for rate oracle, currently ascend_ex, binance, coin_gecko, coin_cap, kucoin, gate_io
rate_oracle_source:
name: binance
# A universal token which to display tokens values in, e.g. USD,EUR,BTC
global_token:
global_token_name: USDT
global_token_symbol: $
# Percentage of API rate limits (on any exchange and any end point) allocated to this bot instance.
# Enter 50 to indicate 50%. E.g. if the API rate limit is 100 calls per second, and you allocate
# 50% to this setting, the bot will have a maximum (limit) of 50 calls per second
rate_limits_share_pct: 100.0
commands_timeout:
create_command_timeout: 10.0
other_commands_timeout: 30.0
# Tabulate table format style (https://github.com/astanin/python-tabulate#table-format)
tables_format: psql
paper_trade:
paper_trade_exchanges:
- binance
- kucoin
- ascend_ex
- gate_io
- injective_v2
paper_trade_account_balance:
BTC: 1.0
USDT: 1000.0
ONE: 1000.0
USDQ: 1000.0
TUSD: 1000.0
ETH: 10.0
WETH: 10.0
USDC: 1000.0
DAI: 1000.0
color:
top_pane: '#000000'
bottom_pane: '#000000'
output_pane: '#262626'
input_pane: '#1C1C1C'
logs_pane: '#121212'
terminal_primary: '#5FFFD7'
primary_label: '#5FFFD7'
secondary_label: '#FFFFFF'
success_label: '#5FFFD7'
warning_label: '#FFFF00'
info_label: '#5FD7FF'
error_label: '#FF0000'
gold_label: '#FFD700'
silver_label: '#C0C0C0'
bronze_label: '#CD7F32'
# The tick size is the frequency with which the clock notifies the time iterators by calling the
# c_tick() method, that means for example that if the tick size is 1, the logic of the strategy
# will run every second.
tick_size: 1.0
market_data_collection:
market_data_collection_enabled: true
market_data_collection_interval: 60
market_data_collection_depth: 20

View File

@@ -1,286 +0,0 @@
########################################
### Fee overrides configurations ###
########################################
# For more detailed information: https://docs.hummingbot.io
template_version: 14
# Example of the fields that can be specified to override the `TradeFeeFactory` default settings.
# If the field is missing or the value is left blank, the default value will be used.
# The percentage values are specified as 0.1 for 0.1%.
#
# [exchange name]_percent_fee_token:
# [exchange name]_maker_percent_fee:
# [exchange name]_taker_percent_fee:
# [exchange name]_buy_percent_fee_deducted_from_returns: # if False, the buy fee is added to the order costs
# [exchange name]_maker_fixed_fees: # a list of lists of token-fee pairs (e.g. [["ETH", 1]])
# [exchange name]_taker_fixed_fees: # a list of lists of token-fee pairs (e.g. [["ETH", 1]])
binance_percent_fee_token: # BNB
binance_maker_percent_fee: # 0.75
binance_taker_percent_fee: # 0.75
binance_buy_percent_fee_deducted_from_returns: # True
# List of supported Exchanges for which the user's conf/conf_fee_override.yml
# will work. This file currently needs to be in sync with hummingbot list of
# supported exchanges
ascend_ex_buy_percent_fee_deducted_from_returns:
ascend_ex_maker_fixed_fees:
ascend_ex_maker_percent_fee:
ascend_ex_percent_fee_token:
ascend_ex_taker_fixed_fees:
ascend_ex_taker_percent_fee:
binance_maker_fixed_fees:
binance_perpetual_buy_percent_fee_deducted_from_returns:
binance_perpetual_maker_fixed_fees:
binance_perpetual_maker_percent_fee:
binance_perpetual_percent_fee_token:
binance_perpetual_taker_fixed_fees:
binance_perpetual_taker_percent_fee:
binance_perpetual_testnet_buy_percent_fee_deducted_from_returns:
binance_perpetual_testnet_maker_fixed_fees:
binance_perpetual_testnet_maker_percent_fee:
binance_perpetual_testnet_percent_fee_token:
binance_perpetual_testnet_taker_fixed_fees:
binance_perpetual_testnet_taker_percent_fee:
binance_taker_fixed_fees:
binance_us_buy_percent_fee_deducted_from_returns:
binance_us_maker_fixed_fees:
binance_us_maker_percent_fee:
binance_us_percent_fee_token:
binance_us_taker_fixed_fees:
binance_us_taker_percent_fee:
bitfinex_buy_percent_fee_deducted_from_returns:
bitfinex_maker_fixed_fees:
bitfinex_maker_percent_fee:
bitfinex_percent_fee_token:
bitfinex_taker_fixed_fees:
bitfinex_taker_percent_fee:
bitmart_buy_percent_fee_deducted_from_returns:
bitmart_maker_fixed_fees:
bitmart_maker_percent_fee:
bitmart_percent_fee_token:
bitmart_taker_fixed_fees:
bitmart_taker_percent_fee:
btc_markets_percent_fee_token:
btc_markets_maker_percent_fee:
btc_markets_taker_percent_fee:
btc_markets_buy_percent_fee_deducted_from_returns:
bybit_perpetual_buy_percent_fee_deducted_from_returns:
bybit_perpetual_maker_fixed_fees:
bybit_perpetual_maker_percent_fee:
bybit_perpetual_percent_fee_token:
bybit_perpetual_taker_fixed_fees:
bybit_perpetual_taker_percent_fee:
bybit_perpetual_testnet_buy_percent_fee_deducted_from_returns:
bybit_perpetual_testnet_maker_fixed_fees:
bybit_perpetual_testnet_maker_percent_fee:
bybit_perpetual_testnet_percent_fee_token:
bybit_perpetual_testnet_taker_fixed_fees:
bybit_perpetual_testnet_taker_percent_fee:
coinbase_pro_buy_percent_fee_deducted_from_returns:
coinbase_pro_maker_fixed_fees:
coinbase_pro_maker_percent_fee:
coinbase_pro_percent_fee_token:
coinbase_pro_taker_fixed_fees:
coinbase_pro_taker_percent_fee:
dydx_perpetual_buy_percent_fee_deducted_from_returns:
dydx_perpetual_maker_fixed_fees:
dydx_perpetual_maker_percent_fee:
dydx_perpetual_percent_fee_token:
dydx_perpetual_taker_fixed_fees:
dydx_perpetual_taker_percent_fee:
gate_io_buy_percent_fee_deducted_from_returns:
gate_io_maker_fixed_fees:
gate_io_maker_percent_fee:
gate_io_percent_fee_token:
gate_io_taker_fixed_fees:
gate_io_taker_percent_fee:
hitbtc_buy_percent_fee_deducted_from_returns:
hitbtc_maker_fixed_fees:
hitbtc_maker_percent_fee:
hitbtc_percent_fee_token:
hitbtc_taker_fixed_fees:
hitbtc_taker_percent_fee:
huobi_buy_percent_fee_deducted_from_returns:
huobi_maker_fixed_fees:
huobi_maker_percent_fee:
huobi_percent_fee_token:
huobi_taker_fixed_fees:
huobi_taker_percent_fee:
kraken_buy_percent_fee_deducted_from_returns:
kraken_maker_fixed_fees:
kraken_maker_percent_fee:
kraken_percent_fee_token:
kraken_taker_fixed_fees:
kraken_taker_percent_fee:
kucoin_buy_percent_fee_deducted_from_returns:
kucoin_maker_fixed_fees:
kucoin_maker_percent_fee:
kucoin_percent_fee_token:
kucoin_taker_fixed_fees:
kucoin_taker_percent_fee:
mexc_buy_percent_fee_deducted_from_returns:
mexc_maker_fixed_fees:
mexc_maker_percent_fee:
mexc_percent_fee_token:
mexc_taker_fixed_fees:
mexc_taker_percent_fee:
ndax_buy_percent_fee_deducted_from_returns:
ndax_maker_fixed_fees:
ndax_maker_percent_fee:
ndax_percent_fee_token:
ndax_taker_fixed_fees:
ndax_taker_percent_fee:
ndax_testnet_buy_percent_fee_deducted_from_returns:
ndax_testnet_maker_fixed_fees:
ndax_testnet_maker_percent_fee:
ndax_testnet_percent_fee_token:
ndax_testnet_taker_fixed_fees:
ndax_testnet_taker_percent_fee:
okx_buy_percent_fee_deducted_from_returns:
okx_maker_fixed_fees:
okx_maker_percent_fee:
okx_percent_fee_token:
okx_taker_fixed_fees:
okx_taker_percent_fee:
btc_markets_maker_fixed_fees:
btc_markets_taker_fixed_fees:
bitmex_percent_fee_token:
bitmex_maker_percent_fee:
bitmex_taker_percent_fee:
bitmex_buy_percent_fee_deducted_from_returns:
bitmex_maker_fixed_fees:
bitmex_taker_fixed_fees:
bitmex_testnet_percent_fee_token:
bitmex_testnet_maker_percent_fee:
bitmex_testnet_taker_percent_fee:
bitmex_testnet_buy_percent_fee_deducted_from_returns:
bitmex_testnet_maker_fixed_fees:
bitmex_testnet_taker_fixed_fees:
woo_x_percent_fee_token:
woo_x_maker_percent_fee:
woo_x_taker_percent_fee:
woo_x_buy_percent_fee_deducted_from_returns:
woo_x_maker_fixed_fees:
woo_x_taker_fixed_fees:
woo_x_testnet_percent_fee_token:
woo_x_testnet_maker_percent_fee:
woo_x_testnet_taker_percent_fee:
woo_x_testnet_buy_percent_fee_deducted_from_returns:
woo_x_testnet_maker_fixed_fees:
woo_x_testnet_taker_fixed_fees:
bybit_percent_fee_token:
bybit_maker_percent_fee:
bybit_taker_percent_fee:
bybit_buy_percent_fee_deducted_from_returns:
bybit_maker_fixed_fees:
bybit_taker_fixed_fees:
bybit_testnet_percent_fee_token:
bybit_testnet_maker_percent_fee:
bybit_testnet_taker_percent_fee:
bybit_testnet_buy_percent_fee_deducted_from_returns:
bybit_testnet_maker_fixed_fees:
bybit_testnet_taker_fixed_fees:
vertex_percent_fee_token:
vertex_maker_percent_fee:
vertex_taker_percent_fee:
vertex_buy_percent_fee_deducted_from_returns:
vertex_maker_fixed_fees:
vertex_taker_fixed_fees:
vertex_testnet_percent_fee_token:
vertex_testnet_maker_percent_fee:
vertex_testnet_taker_percent_fee:
vertex_testnet_buy_percent_fee_deducted_from_returns:
vertex_testnet_maker_fixed_fees:
vertex_testnet_taker_fixed_fees:
injective_v2_percent_fee_token:
injective_v2_maker_percent_fee:
injective_v2_taker_percent_fee:
injective_v2_buy_percent_fee_deducted_from_returns:
injective_v2_maker_fixed_fees:
injective_v2_taker_fixed_fees:
polkadex_percent_fee_token:
polkadex_maker_percent_fee:
polkadex_taker_percent_fee:
polkadex_buy_percent_fee_deducted_from_returns:
polkadex_maker_fixed_fees:
polkadex_taker_fixed_fees:
foxbit_percent_fee_token:
foxbit_maker_percent_fee:
foxbit_taker_percent_fee:
foxbit_buy_percent_fee_deducted_from_returns:
foxbit_maker_fixed_fees:
foxbit_taker_fixed_fees:
hyperliquid_perpetual_percent_fee_token:
hyperliquid_perpetual_maker_percent_fee:
hyperliquid_perpetual_taker_percent_fee:
hyperliquid_perpetual_buy_percent_fee_deducted_from_returns:
hyperliquid_perpetual_maker_fixed_fees:
hyperliquid_perpetual_taker_fixed_fees:
hyperliquid_perpetual_testnet_percent_fee_token:
hyperliquid_perpetual_testnet_maker_percent_fee:
hyperliquid_perpetual_testnet_taker_percent_fee:
hyperliquid_perpetual_testnet_buy_percent_fee_deducted_from_returns:
hyperliquid_perpetual_testnet_maker_fixed_fees:
hyperliquid_perpetual_testnet_taker_fixed_fees:
bitmex_perpetual_percent_fee_token:
bitmex_perpetual_maker_percent_fee:
bitmex_perpetual_taker_percent_fee:
bitmex_perpetual_buy_percent_fee_deducted_from_returns:
bitmex_perpetual_maker_fixed_fees:
bitmex_perpetual_taker_fixed_fees:
bitmex_perpetual_testnet_percent_fee_token:
bitmex_perpetual_testnet_maker_percent_fee:
bitmex_perpetual_testnet_taker_percent_fee:
bitmex_perpetual_testnet_buy_percent_fee_deducted_from_returns:
bitmex_perpetual_testnet_maker_fixed_fees:
bitmex_perpetual_testnet_taker_fixed_fees:
kucoin_perpetual_percent_fee_token:
kucoin_perpetual_maker_percent_fee:
kucoin_perpetual_taker_percent_fee:
kucoin_perpetual_buy_percent_fee_deducted_from_returns:
kucoin_perpetual_maker_fixed_fees:
kucoin_perpetual_taker_fixed_fees:
phemex_perpetual_percent_fee_token:
phemex_perpetual_maker_percent_fee:
phemex_perpetual_taker_percent_fee:
phemex_perpetual_buy_percent_fee_deducted_from_returns:
phemex_perpetual_maker_fixed_fees:
phemex_perpetual_taker_fixed_fees:
phemex_perpetual_testnet_percent_fee_token:
phemex_perpetual_testnet_maker_percent_fee:
phemex_perpetual_testnet_taker_percent_fee:
phemex_perpetual_testnet_buy_percent_fee_deducted_from_returns:
phemex_perpetual_testnet_maker_fixed_fees:
phemex_perpetual_testnet_taker_fixed_fees:
bit_com_perpetual_percent_fee_token:
bit_com_perpetual_maker_percent_fee:
bit_com_perpetual_taker_percent_fee:
bit_com_perpetual_buy_percent_fee_deducted_from_returns:
bit_com_perpetual_maker_fixed_fees:
bit_com_perpetual_taker_fixed_fees:
bit_com_perpetual_testnet_percent_fee_token:
bit_com_perpetual_testnet_maker_percent_fee:
bit_com_perpetual_testnet_taker_percent_fee:
bit_com_perpetual_testnet_buy_percent_fee_deducted_from_returns:
bit_com_perpetual_testnet_maker_fixed_fees:
bit_com_perpetual_testnet_taker_fixed_fees:
gate_io_perpetual_percent_fee_token:
gate_io_perpetual_maker_percent_fee:
gate_io_perpetual_taker_percent_fee:
gate_io_perpetual_buy_percent_fee_deducted_from_returns:
gate_io_perpetual_maker_fixed_fees:
gate_io_perpetual_taker_fixed_fees:
bitget_perpetual_percent_fee_token:
bitget_perpetual_maker_percent_fee:
bitget_perpetual_taker_percent_fee:
bitget_perpetual_buy_percent_fee_deducted_from_returns:
bitget_perpetual_maker_fixed_fees:
bitget_perpetual_taker_fixed_fees:
injective_v2_perpetual_percent_fee_token:
injective_v2_perpetual_maker_percent_fee:
injective_v2_perpetual_taker_percent_fee:
injective_v2_perpetual_buy_percent_fee_deducted_from_returns:
injective_v2_perpetual_maker_fixed_fees:
injective_v2_perpetual_taker_fixed_fees:

View File

@@ -1,11 +0,0 @@
################################
### okx_perpetual config ###
################################
connector: okx_perpetual
okx_perpetual_api_key: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226162333738376338393761356639623163353535373537386439313834613164227d2c202263697068657274657874223a2022336266663830633462616463633530653965623534303762343739353739386637323961653835313963333133373861633732316366613166666562376336376263363835356333222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223332333236333731633632613866643465656265323236653038643234626431227d2c20226d6163223a202234316233336631313065623333386263663037316662386432356535333966366436366638383633383230613264323363656431383162353432306662616163227d2c202276657273696f6e223a20332c2022616c696173223a2022227d
okx_perpetual_secret_key: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226338323462616366316663333765633235333335343633663030663935356564227d2c202263697068657274657874223a202236343833613137353365306332633937326663353133313737336464316333323261663761353431366231343664336262333531306465343365633861316632222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20226337333635363264303431633934363230316330346536356134343333383164227d2c20226d6163223a202232306536343466663966616462373863636530336662383565353764333439316337366538653339636665383965376466666535316161363764313536353964227d2c202276657273696f6e223a20332c2022616c696173223a2022227d
okx_perpetual_passphrase: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226433623766353662353435623165636534653839393566393736643965393461227d2c202263697068657274657874223a202230393331623065363533306435306566666132633961623934636231222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223262393837666361373162393833623331666461363238633063336439323938227d2c20226d6163223a202235626233356530343266306264323663396561373962376161613262636365363963333632633639383265383237336230613935373566623062343762633463227d2c202276657273696f6e223a20332c2022616c696173223a2022227d

View File

@@ -1,83 +0,0 @@
---
version: 1
template_version: 12
formatters:
simple:
format: "%(asctime)s - %(process)d - %(name)s - %(levelname)s - %(message)s"
handlers:
console:
class: hummingbot.logger.cli_handler.CLIHandler
level: DEBUG
formatter: simple
stream: ext://sys.stdout
console_warning:
class: hummingbot.logger.cli_handler.CLIHandler
level: WARNING
formatter: simple
stream: ext://sys.stdout
console_info:
class: hummingbot.logger.cli_handler.CLIHandler
level: INFO
formatter: simple
stream: ext://sys.stdout
file_handler:
class: logging.handlers.TimedRotatingFileHandler
level: DEBUG
formatter: simple
filename: $PROJECT_DIR/logs/logs_$STRATEGY_FILE_PATH.log
encoding: utf8
when: "D"
interval: 1
backupCount: 7
"null":
class: logging.NullHandler
level: DEBUG
loggers:
hummingbot.core.utils.eth_gas_station_lookup:
level: NETWORK
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.logger.log_server_client:
level: WARNING
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.logger.reporting_proxy_handler:
level: WARNING
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.strategy:
level: NETWORK
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.connector:
level: NETWORK
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.client:
level: NETWORK
propagate: false
handlers: [console, file_handler]
mqtt: true
hummingbot.core.event.event_reporter:
level: EVENT_LOG
propagate: false
handlers: [file_handler]
mqtt: false
conf:
level: NETWORK
handlers: ["null"]
propagate: false
mqtt: false
root:
level: INFO
handlers: [console, file_handler]
mqtt: true

View File

@@ -1,99 +0,0 @@
version: "3.9"
services:
bot_1:
container_name: bot_1
image: hummingbot/hummingbot:development
volumes:
- ./credentials/master_account:/home/hummingbot/conf
- ./credentials/master_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_1/logs:/home/hummingbot/logs
- ./instances/bot_1/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
- ./hummingbot_files/certs:/home/hummingbot/certs
environment:
- CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_controllers_1.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
bot_2:
container_name: bot_2
image: hummingbot/hummingbot:development
volumes:
- ./credentials/master_account:/home/hummingbot/conf
- ./credentials/master_account/connectors:/home/hummingbot/conf/connectors
- ./instances/bot_2/logs:/home/hummingbot/logs
- ./instances/bot_2/data:/home/hummingbot/data
- ./conf/scripts:/home/hummingbot/conf/scripts
- ./conf/controllers:/home/hummingbot/conf/controllers
- ./hummingbot_files/certs:/home/hummingbot/certs
environment:
- CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=v2_generic_with_controllers.py
# - SCRIPT_CONFIG=conf_v2_generic_with_contorllers_2.yml
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
gateway:
container_name: gateway
image: hummingbot/gateway:latest
ports:
- "15888:15888"
- "8080:8080"
volumes:
- "./gateway_files/conf:/home/gateway/conf"
- "./gateway_files/logs:/home/gateway/logs"
- "./gateway_files/db:/home/gateway/db"
- "./hummingbot_files/certs:/home/gateway/certs"
# environment:
# - GATEWAY_PASSPHRASE=a
dashboard:
container_name: dashboard
image: hummingbot/dashboard:latest
volumes:
- ./instances/bot_1/data:/home/dashboard/data
- ./instances/bot_2/data:/home/dashboard/data
ports:
- "8501:8501"
emqx:
container_name: "emqx"
image: emqx:5
restart: unless-stopped
environment:
- EMQX_NAME=emqx
- EMQX_LOADED_PLUGINS="emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
volumes:
- emqx-data:/opt/emqx/data
- emqx-log:/opt/emqx/log
- emqx-etc:/opt/emqx/etc
ports:
- "1883:1883" # mqtt:tcp
- "8883:8883" # mqtt:tcp:ssl
- "8083:8083" # mqtt:ws
- "8084:8084" # mqtt:ws:ssl
- "8081:8081" # http:management
- "18083:18083" # http:dashboard
- "61613:61613" # web-stomp gateway
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
volumes:
emqx-data: {}
emqx-log: {}
emqx-etc: {}

View File

@@ -1,105 +0,0 @@
# Deploy Hummingbot Instance
This installs a single [Hummingbot](https://github.com/hummingbot/hummingbot) instance as a Docker container.
## Prerequisites
This configuration requires [Docker Compose](https://docs.docker.com/compose/), a tool for defining and running multi-container Docker applications. The recommended way to get Docker Compose is to install [Docker Desktop](https://www.docker.com/products/docker-desktop/), which includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
See [Docker](../DOCKER.md) for more information about how to install and use Docker Compose, as well as helpful commands.
## Getting Started
Verify that Docker Compose is installed correctly by checking the version:
```bash
docker compose version
```
The output should be: `Docker Compose version v2.17.2` or similar. Ensure that you are using Docker Compose V2, as V1 is deprecated.
### 1. Launch network
Clone this repo to your machine and go to the folder:
```
git clone https://github.com/hummingbot/deploy-examples.git
cd deploy-examples/simple_hummingbot_compose
```
Alternatively, copy the `docker-compose.yml` file to a directory on your machine where you want to store your Hummingbot files.
This is the "root folder" where your encrypted keys, scripts, trades, configs, logs, and other files related to your bots will be saved.
From the root folder, run the following command to pull the image and start the instance:
```
docker compose up -d
```
After the images have been downloaded, you should see the following output:
```
[+] Running 1/1
⠿ Container hummingbot Started
```
### 2. Set permissions
Run this command from your root folder to grant read/write permission to the `hummingbot_files` sub-folder:
```
sudo chmod -R a+rw ./hummingbot_files
```
### 3. Populate scripts folder with example scripts
Run this command to copy the sample scripts into the `scripts` folder. Any new scripts you add here will also be available to your `hummingbot` instance.
```
docker cp hummingbot:/home/hummingbot/scripts-copy/. ./hummingbot_files/scripts/
```
### 4. Launch Hummingbot
Attach to the `hummingbot` instance:
```
docker attach hummingbot
```
You should see the Hummingbot welcome screen:
![welcome screen](../welcome.png)
To get started with Hummingbot, check out the following docs:
* [Basic Features](https://docs.hummingbot.org/operation/)
* [Quickstart Guide](https://docs.hummingbot.org/quickstart/)
* [Hummingbot FAQ](https://docs.hummingbot.org/faq/)
## Updating to the Latest Version of Hummingbot
Hummingbot and Hummingbot Gateway are updated on a monthly basis, with each new version marked by a code release on Github and DockerHub, accompanied by the publication of comprehensive release notes. To upgrade to the most recent version, you just need to pull the `latest` Docker images.
Follow the steps below to upgrade your Hummingbot system:
1. **Ensure no containers are running**
Before you initiate the update process, it is crucial to verify that no Docker containers are currently running. Use the following command to shut down any active containers:
```
docker compose down
```
2. **Fetch the latest Docker image**
Once you have confirmed that no containers are running, proceed to pull the latest Docker image. Use the following command to accomplish this:
```
docker pull hummingbot/hummingbot
```
3. **Start the updated containers**
Having pulled the latest Docker image, you can now start up your containers. They will be running the latest version of Hummingbot. Use the following command to start the containers:
```
docker compose up -d
```
With these steps, you will have successfully updated your Hummingbot to the latest version.

View File

@@ -1,23 +0,0 @@
version: "3.9"
services:
hummingbot:
container_name: hummingbot
image: hummingbot/hummingbot:latest
volumes:
- "./hummingbot_files/conf:/home/hummingbot/conf"
- "./hummingbot_files/conf/connectors:/home/hummingbot/conf/connectors"
- "./hummingbot_files/conf/strategies:/home/hummingbot/conf/strategies"
- "./hummingbot_files/conf/strategies:/home/hummingbot/conf/controllers"
- "./hummingbot_files/conf/scripts:/home/hummingbot/conf/scripts"
- "./hummingbot_files/logs:/home/hummingbot/logs"
- "./hummingbot_files/data:/home/hummingbot/data"
- "./hummingbot_files/scripts:/home/hummingbot/scripts"
- "./hummingbot_files/certs:/home/hummingbot/certs"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
tty: true
stdin_open: true
network_mode: host

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB