diff --git a/autostart_hummingbot_compose/README.md b/autostart_hummingbot_compose/README.md deleted file mode 100644 index 5647a38..0000000 --- a/autostart_hummingbot_compose/README.md +++ /dev/null @@ -1,151 +0,0 @@ -# Auto-Start Hummingbot Instance - -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. - -## 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 - -Auto-starting a script/strategy lets you start a bot from the command line, skipping the Hummingbot UI. - -To enable this, you will do need a few things first: -- Install and configure the Hummingbot instance -- Set the password used to encrypt your keys (`CONFIG_PASSWORD`) -- Define your script or strategy config file that you want to auto-start (`CONFIG_FILE_NAME`) - -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/autostart_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 - ``` - -### 3. 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 -``` - - -### 4. Launch Hummingbot and set password - -Now, attach to the `hummingbot` instance: -``` -docker attach hummingbot -``` - -You should see the Hummingbot welcome screen: - -![welcome screen](../welcome.png) - -Set your Hummingbot [password](https://docs.hummingbot.org/operation/password/) and write it down. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file. - -Afterwards, run `exit` to exit Hummingbot. - - -### 4. Define script/strategy file - -You can auto-start either a Script or a Strategy: - -* [Scripts](https://docs.hummingbot.org/scripts/) are Python files that contain all strategy logic. If you define a `.py` file as `CONFIG_FILE_NAME`, Hummingbot assumes it's a script file and looks for the `.py` file in the `hummingbot_files/scripts` directory. See [`simple_pmm_example.py`](./hummingbot_files/scripts/simple_pmm_example.py) for an example. -* [Strategies](https://docs.hummingbot.org/strategies/) are configurable strategy templates. If you define a `.yml` file as `CONFIG_FILE_NAME`, Hummingbot assumes it's a strategy config file and looks for the `.yml` file in the `hummingbot_files/conf/strategies` directory. See [`conf_pure_mm_1.yml`](./hummingbot_files/conf/strategies/conf_pure_mm_1.yml) for an example. - -### 5. 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 - # environment: - # - CONFIG_PASSWORD=a - # - CONFIG_FILE_NAME=simple_pmm_example.py - # - CONFIG_FILE_NAME=conf_pure_mm_1.yml -``` - -Uncomment out: - * The `environment:` line - * The `CONFIG_PASSWORD` line: add the password you set earlier, - * One of `CONFIG_FILE_NAME` lines: add your script OR strategy config file - - The final `environment` section of the YAML file should look like this: -```yaml - environment: - - CONFIG_PASSWORD=a - - CONFIG_FILE_NAME=simple_pmm_example.py -``` - -Afterwards, save the file. - -### 6. Relaunch Hummingbot - -Restart the container using your new YAML file: -``` -docker stop hummingbot -docker start hummingbot -``` - -When you attach to it, the strategy or script should already be running: -``` -docker attach hummingbot -``` - -## 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. \ No newline at end of file diff --git a/autostart_hummingbot_compose/docker-compose.yml b/autostart_hummingbot_compose/docker-compose.yml deleted file mode 100644 index f17c139..0000000 --- a/autostart_hummingbot_compose/docker-compose.yml +++ /dev/null @@ -1,27 +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" - # environment: - # - CONFIG_PASSWORD=a - # - CONFIG_FILE_NAME=simple_pmm_example.py - # - CONFIG_FILE_NAME=conf_pure_mm_1.yml - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "5" - tty: true - stdin_open: true - network_mode: host diff --git a/autostart_hummingbot_compose/hummingbot_files/conf/strategies/conf_pure_mm_1.yml b/autostart_hummingbot_compose/hummingbot_files/conf/strategies/conf_pure_mm_1.yml deleted file mode 100644 index d3d7e3e..0000000 --- a/autostart_hummingbot_compose/hummingbot_files/conf/strategies/conf_pure_mm_1.yml +++ /dev/null @@ -1,150 +0,0 @@ -######################################################## -### Pure market making strategy config ### -######################################################## - -template_version: 24 -strategy: pure_market_making - -# Exchange and token parameters. -exchange: binance_paper_trade - -# Token trading pair for the exchange, e.g. BTC-USDT -market: ETH-USDT - -# How far away from mid price to place the bid order. -# Spread of 1 = 1% away from mid price at that time. -# Example if mid price is 100 and bid_spread is 1. -# Your bid is placed at 99. -bid_spread: 0.1 - -# How far away from mid price to place the ask order. -# Spread of 1 = 1% away from mid price at that time. -# Example if mid price is 100 and ask_spread is 1. -# Your bid is placed at 101. -ask_spread: 0.1 - -# Minimum Spread -# How far away from the mid price to cancel active orders -minimum_spread: -100.0 - -# Time in seconds before cancelling and placing new orders. -# If the value is 60, the bot cancels active orders and placing new ones after a minute. -order_refresh_time: 15.0 - -# Time in seconds before replacing existing order with new orders at the same price. -max_order_age: 1800.0 - -# The spread (from mid price) to defer order refresh process to the next cycle. -# (Enter 1 to indicate 1%), value below 0, e.g. -1, is to disable this feature - not recommended. -order_refresh_tolerance_pct: 0.0 - -# Size of your bid and ask order. -order_amount: 0.1 - -# Price band ceiling. -price_ceiling: -1.0 - -# Price band floor. -price_floor: -1.0 - -# enable moving price floor and ceiling. -moving_price_band_enabled: false - -# Price band ceiling pct. -price_ceiling_pct: 1.0 - -# Price band floor pct. -price_floor_pct: -1.0 - -# price_band_refresh_time. -price_band_refresh_time: 86400.0 - -# Whether to alternate between buys and sells (true/false). -ping_pong_enabled: false - -# Whether to enable Inventory skew feature (true/false). -inventory_skew_enabled: false - -# Target base asset inventory percentage target to be maintained (for Inventory skew feature). -inventory_target_base_pct: 50.0 - -# The range around the inventory target base percent to maintain, expressed in multiples of total order size (for -# inventory skew feature). -inventory_range_multiplier: 1.0 - -# Initial price of the base asset. Note: this setting is not affects anything, the price is kept in the database. -inventory_price: 1.0 - -# Number of levels of orders to place on each side of the order book. -order_levels: 1 - -# Increase or decrease size of consecutive orders after the first order (if order_levels > 1). -order_level_amount: 0.0 - -# Order price space between orders (if order_levels > 1). -order_level_spread: 1.0 - -# How long to wait before placing the next order in case your order gets filled. -filled_order_delay: 60.0 - -# Whether to stop cancellations of orders on the other side (of the order book), -# when one side is filled (hanging orders feature) (true/false). -hanging_orders_enabled: false - -# Spread (from mid price, in percentage) hanging orders will be canceled (Enter 1 to indicate 1%) -hanging_orders_cancel_pct: 10.0 - -# Whether to enable order optimization mode (true/false). -order_optimization_enabled: false - -# The depth in base asset amount to be used for finding top ask (for order optimization mode). -ask_order_optimization_depth: 0.0 - -# The depth in base asset amount to be used for finding top bid (for order optimization mode). -bid_order_optimization_depth: 0.0 - -# Whether to enable adding transaction costs to order price calculation (true/false). -add_transaction_costs: false - -# The price source (current_market/external_market/custom_api). -price_source: current_market - -# The price type (mid_price/last_price/last_own_trade_price/best_bid/best_ask/inventory_cost). -price_type: mid_price - -# An external exchange name (for external exchange pricing source). -price_source_exchange: - -# A trading pair for the external exchange, e.g. BTC-USDT (for external exchange pricing source). -price_source_market: - -# An external api that returns price (for custom_api pricing source). -price_source_custom_api: - -# An interval time in second to update the price from custom api (for custom_api pricing source). -custom_api_update_interval: 5.0 - -#Take order if they cross order book when external price source is enabled -take_if_crossed: - -# Use user provided orders to directly override the orders placed by order_amount and order_level_parameter -# This is an advanced feature and user is expected to directly edit this field in config file -# Below is an sample input, the format is a dictionary, the key is user-defined order name, the value is a list which includes buy/sell, order spread, and order amount -# order_override: -# order_1: [buy, 0.5, 100] -# order_2: [buy, 0.75, 200] -# order_3: [sell, 0.1, 500] -# Please make sure there is a space between : and [ -order_override: - -# Simpler override config for separate bid and order level spreads -split_order_levels_enabled: false -bid_order_level_spreads: -ask_order_level_spreads: -bid_order_level_amounts: -ask_order_level_amounts: -# If the strategy should wait to receive cancellations confirmation before creating new orders during refresh time -should_wait_order_cancel_confirmation: true - -# For more detailed information, see: -# https://docs.hummingbot.io/strategies/pure-market-making/#configuration-parameters diff --git a/autostart_hummingbot_compose/hummingbot_files/scripts/simple_pmm_example.py b/autostart_hummingbot_compose/hummingbot_files/scripts/simple_pmm_example.py deleted file mode 100644 index 8329fe1..0000000 --- a/autostart_hummingbot_compose/hummingbot_files/scripts/simple_pmm_example.py +++ /dev/null @@ -1,77 +0,0 @@ -import logging -from decimal import Decimal -from typing import List - -from hummingbot.core.data_type.common import OrderType, PriceType, TradeType -from hummingbot.core.data_type.order_candidate import OrderCandidate -from hummingbot.core.event.events import OrderFilledEvent -from hummingbot.strategy.script_strategy_base import ScriptStrategyBase - - -class SimplePMM(ScriptStrategyBase): - """ - BotCamp Cohort: Sept 2022 - Design Template: https://hummingbot-foundation.notion.site/Simple-PMM-63cc765486dd42228d3da0b32537fc92 - Video: - - Description: - The bot will place two orders around the price_source (mid price or last traded price) in a trading_pair on - exchange, with a distance defined by the ask_spread and bid_spread. Every order_refresh_time in seconds, - the bot will cancel and replace the orders. - """ - bid_spread = 0.001 - ask_spread = 0.001 - order_refresh_time = 15 - order_amount = 0.1 - create_timestamp = 0 - trading_pair = "ETH-USDT" - exchange = "kucoin_paper_trade" - # Here you can use for example the LastTrade price to use in your strategy - price_source = PriceType.MidPrice - - markets = {exchange: {trading_pair}} - - def on_tick(self): - if self.create_timestamp <= self.current_timestamp: - self.cancel_all_orders() - proposal: List[OrderCandidate] = self.create_proposal() - proposal_adjusted: List[OrderCandidate] = self.adjust_proposal_to_budget(proposal) - self.place_orders(proposal_adjusted) - self.create_timestamp = self.order_refresh_time + self.current_timestamp - - def create_proposal(self) -> List[OrderCandidate]: - ref_price = self.connectors[self.exchange].get_price_by_type(self.trading_pair, self.price_source) - buy_price = ref_price * Decimal(1 - self.bid_spread) - sell_price = ref_price * Decimal(1 + self.ask_spread) - - buy_order = OrderCandidate(trading_pair=self.trading_pair, is_maker=True, order_type=OrderType.LIMIT, - order_side=TradeType.BUY, amount=Decimal(self.order_amount), price=buy_price) - - sell_order = OrderCandidate(trading_pair=self.trading_pair, is_maker=True, order_type=OrderType.LIMIT, - order_side=TradeType.SELL, amount=Decimal(self.order_amount), price=sell_price) - - return [buy_order, sell_order] - - def adjust_proposal_to_budget(self, proposal: List[OrderCandidate]) -> List[OrderCandidate]: - proposal_adjusted = self.connectors[self.exchange].budget_checker.adjust_candidates(proposal, all_or_none=True) - return proposal_adjusted - - def place_orders(self, proposal: List[OrderCandidate]) -> None: - for order in proposal: - self.place_order(connector_name=self.exchange, order=order) - - def place_order(self, connector_name: str, order: OrderCandidate): - if order.order_side == TradeType.SELL: - self.sell(connector_name=connector_name, trading_pair=order.trading_pair, amount=order.amount, - order_type=order.order_type, price=order.price) - elif order.order_side == TradeType.BUY: - self.buy(connector_name=connector_name, trading_pair=order.trading_pair, amount=order.amount, - order_type=order.order_type, price=order.price) - - def cancel_all_orders(self): - for order in self.get_active_orders(connector_name=self.exchange): - self.cancel(self.exchange, order.trading_pair, order.client_order_id) - - def did_fill_order(self, event: OrderFilledEvent): - msg = (f"{event.trade_type.name} {round(event.amount, 2)} {event.trading_pair} {self.exchange} at {round(event.price, 2)}") - self.log_with_clock(logging.INFO, msg) - self.notify_hb_app_with_timestamp(msg) \ No newline at end of file diff --git a/hummingbot_gateway_broker_compose/README.md b/hummingbot_gateway_broker_compose/README.md deleted file mode 100644 index 0ccbf57..0000000 --- a/hummingbot_gateway_broker_compose/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# Deploy Hummingbot + Gateway + Broker Instances - -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). - -!!! 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. - -## 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 - -This configuration lets you orchestrate Hummingbot and Gateway instances using an EMQX broker. - -To enable this, you will do need a few things first: -- Install and configure the Hummingbot and Gateway instances -- Generate self-signed certificates in Hummingbot -- Give Gateway the passphrase used to generate the certificates (`GATEWAY_PASSPHRASE`) -- Configure the EMQX broker - -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/hummingbot_gateway_broker_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 4/4 - ⠿ Network hummingbot_gateway_broker_compose_default Created - ⠿ Container hummingbot Started - ⠿ Container gateway Started - ⠿ Container emqx Started -``` - -### 2. 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 -``` - - -### 3. Launch Hummingbot and generate certificates - -Now, attach to the `hummingbot` instance: -``` -docker attach hummingbot -``` - -You should see the Hummingbot welcome screen: - -![welcome screen](../welcome.png) - -Set your Hummingbot [password](https://docs.hummingbot.org/operation/password/) and write it down. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file. - -Run the following command to generate Gateway certificates: -``` -gateway generate-certs -``` - -Afterwards, run `exit` to exit Hummingbot. - -### 4. Remove network - -Once you're back in Bash/Terminal, run the following command to remove the Compose project: -``` -docker compose down -``` -You should see the following output: -``` -[+] Running 4/3 - ⠿ Container hummingbot Removed - ⠿ Container gateway Removed - ⠿ Container emqx Removed - ⠿ Network hummingbot_gateway_broker_compose_default Removed -``` - -### 5. 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. - -### 6. Recreate network - -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. - -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/) - -### 7. Configure EMQX Broker - -Attach to the EMQX Broker `emqx` instance: -``` -docker attach emqx -``` - -Navigate to the EMQX dashboard to configure authentication and available ports at http://localhost:18083/. - -The default credentials for connecting to the dashboards are `admin:public`. - -For connecting your bots via MQTT, just leave the `mqtt_username` and `mqtt_password` parameters of the bot empty. diff --git a/hummingbot_gateway_broker_compose/docker-compose.yml b/hummingbot_gateway_broker_compose/docker-compose.yml deleted file mode 100644 index 401f156..0000000 --- a/hummingbot_gateway_broker_compose/docker-compose.yml +++ /dev/null @@ -1,68 +0,0 @@ -version: "3.9" -services: - hummingbot: - container_name: "hummingbot" - image: hummingbot/hummingbot:latest - volumes: - - "./hummingbot_files/conf:/conf" - - "./hummingbot_files/conf/connectors:/conf/connectors" - - "./hummingbot_files/conf/strategies:/conf/strategies" - - "./hummingbot_files/conf/strategies:/conf/controllers" - - "./hummingbot_files/conf/scripts:/conf/scripts" - - "./hummingbot_files/logs:/logs" - - "./hummingbot_files/data:/data" - - "./hummingbot_files/scripts:/scripts" - - "./hummingbot_files/certs:/certs" - # environment: - # - CONFIG_PASSWORD=a - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "5" - tty: true - stdin_open: true - network_mode: host - - gateway: - container_name: "gateway" - image: hummingbot/gateway:latest - ports: - - "15888:15888" - - "8080:8080" - volumes: - - "./gateway_files/conf:/usr/src/app/conf" - - "./gateway_files/logs:/usr/src/app/logs" - - "./hummingbot_files/certs:/usr/src/app/certs" - # environment: - # - GATEWAY_PASSPHRASE=a - - 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: {} diff --git a/hummingbot_gateway_compose/README.md b/hummingbot_gateway_compose/README.md deleted file mode 100644 index 1adc37a..0000000 --- a/hummingbot_gateway_compose/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# Deploy Hummingbot and Gateway Instances - -This installs a [Hummingbot](https://github.com/hummingbot/hummingbot) instance linked to a [Hummingbot Gateway](https://github.com/hummingbot/gateway) instance. - -## 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 - -Installing Hummingbot alongside Gateway lets you access data and execute orders on DEX connectors. - -To enable this, you will do need a few things first: -- Install and configure the Hummingbot and Gateway instances -- Generate self-signed certificates in Hummingbot -- Give Gateway the passphrase used to generate the certificates (`GATEWAY_PASSPHRASE`) - -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/hummingbot_gateway_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 3/3 - ⠿ Network hummingbot_gateway_compose_default Created - ⠿ Container hummingbot Started - ⠿ Container gateway Started -``` - -### 2. 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 -``` - -You may run into read-only permission issues if you don't do this. - -### 3. Add scripts - -Populate Hummingbot scripts folder with example scripts from the Hummingbot image: -``` -docker cp hummingbot:/home/hummingbot/scripts-copy/. ./hummingbot_files/scripts/ -``` - -This step is needed to being able to run the script examples. You can also copy individual [script examples](https://github.com/hummingbot/hummingbot/tree/master/scripts) into the `hummingbot_files/scripts` folder to make them available to your instance. - - -### 4. Launch Hummingbot and generate certificates - -Now, attach to the `hummingbot` instance: -``` -docker attach hummingbot -``` - -You should see the Hummingbot welcome screen: - -![welcome screen](../welcome.png) - -Set your Hummingbot [password](https://docs.hummingbot.org/operation/password/) and write it down. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file. - -Run the following command to generate Gateway certificates: -``` -gateway generate-certs -``` -![generate certs](./generate-certs.png) - -You'll be prompted for a passphrase used to generate the certificates. This is the `GATEWAY_PASSPHRASE` environment variable in your `docker-compose.yml` file. - -Hummingbot will use the passphrase to generate the certificates and save them in the `hummingbot_files/certs` folder, which is mapped to the `/home/hummingbot/certs` in the image. This location is also mapped to `/home/gateway/certs`, where the Gateway instance will look for the certificates it needs. - -Afterwards, run `exit` to exit Hummingbot. - -### 5. Remove network - -Once you're back in Bash/Terminal, run the following command to remove the Compose project: -``` -docker compose down -``` - -You should see the following output: -``` -[+] Running 3/3 - ⠿ Container gateway Removed - ⠿ Container hummingbot Removed - ⠿ Network hummingbot_gateway_compose_default Removed -``` - -### 6. 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=[password] - gateway: - # environment: - # - GATEWAY_PASSPHRASE=[passphrase] -``` - -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 - hummingbot: - environment: - - CONFIG_PASSWORD=[password] - gateway: - environment: - - GATEWAY_PASSPHRASE=[passphrase] -``` - -Afterwards, save the file. - -### 7. Recreate network - -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` 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. - -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/) - -For Gateway, check out the following docs: - -* [Testing with Postman](https://docs.hummingbot.org/gateway/testing/) -* [Using Gateway with Hummingbot](https://docs.hummingbot.org/gateway/setup/) - -## 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 Hummingbot image** - - Once you have confirmed that no containers are running, proceed to pull the latest Hummingbot Docker image. Use the following command to accomplish this: - - ``` - docker pull hummingbot/hummingbot - ``` -3. **Fetch the latest Docker Gateway image** - - Next, we'll need to also pull the latest Docker Gateway image - - ``` - docker pull hummingbot/gateway - ``` - -4. **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 + Gateway to the latest version. \ No newline at end of file diff --git a/hummingbot_gateway_compose/docker-compose.yml b/hummingbot_gateway_compose/docker-compose.yml deleted file mode 100644 index e9215ec..0000000 --- a/hummingbot_gateway_compose/docker-compose.yml +++ /dev/null @@ -1,39 +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" - # environment: - # - CONFIG_PASSWORD=a - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "5" - tty: true - stdin_open: true - network_mode: host - - 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 diff --git a/hummingbot_gateway_compose/generate-certs.png b/hummingbot_gateway_compose/generate-certs.png deleted file mode 100644 index 87c36c0..0000000 Binary files a/hummingbot_gateway_compose/generate-certs.png and /dev/null differ diff --git a/hummingbot_with_dashboard/README.md b/hummingbot_with_dashboard/README.md deleted file mode 100644 index eda1fd8..0000000 --- a/hummingbot_with_dashboard/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# Deploy Hummingbot Instance - -This installs a single [Hummingbot](https://github.com/hummingbot/hummingbot) bot instance alongside a [Hummingbot Dashboard](https://github.com/hummingbot/dashboard) that can be used to control and analyze it. - -## 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/hummingbot_with_dashboard -``` - -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 3/3 - ⠿ Network hummingbot_with_dashboard_default Created - ⠿ Container hummingbot Started - ⠿ Container dashboard 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 -``` - -You may run into read-only permission issues if you don't do this. - -### 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/ -``` - -This step is needed to being able to run the script examples. You can also copy individual [script examples](https://github.com/hummingbot/hummingbot/tree/master/scripts) into the `hummingbot_files/scripts` folder to make them available to your instance. - -### 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/) - -### 5. Launch Dashboard - -Go to http://localhost:8501 in your browser to see the Dashboard. - -Dashboard is a new experimental visualization layer for Hummingbot instances. For more information, see: -* [Deploying Hummingbot + Dashboard on AWS](https://www.youtube.com/watch?v=xp_A8tZKKiA) -* [Kicking Off the Hummingbot Dashboard Community Project](https://blog.hummingbot.org/hummingbot-dashboard-community-project/) - - -## Updating to the Latest Version of Hummingbot + Dashboard - -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 Hummingbot image** - - Once you have confirmed that no containers are running, proceed to pull the latest Hummingbot Docker image. Use the following command to accomplish this: - - ``` - docker pull hummingbot/hummingbot - ``` -3. **Fetch the latest Docker Dashboard image** - - Next, we'll need to also pull the latest Docker Dashboard image - - ``` - docker pull hummingbot/dashboard - ``` - -4. **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 + Gateway to the latest version. \ No newline at end of file diff --git a/hummingbot_with_dashboard/docker-compose.yml b/hummingbot_with_dashboard/docker-compose.yml deleted file mode 100644 index ee7ddf3..0000000 --- a/hummingbot_with_dashboard/docker-compose.yml +++ /dev/null @@ -1,31 +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 - dashboard: - container_name: dashboard - image: hummingbot/dashboard:latest - volumes: - - ./hummingbot_files/data:/home/dashboard/data - - /var/run/docker.sock:/var/run/docker.sock - ports: - - "8501:8501" diff --git a/multiple_bots_setup_gateway_dashboard_broker/README.md b/multiple_bots_setup_gateway_dashboard_broker/README.md new file mode 100644 index 0000000..93a82bb --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/README.md @@ -0,0 +1,241 @@ +# 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. + + + + diff --git a/multiple_bots_setup_gateway_dashboard_broker/conf/controllers/conf_market_making.dman_maker_1.yml b/multiple_bots_setup_gateway_dashboard_broker/conf/controllers/conf_market_making.dman_maker_1.yml new file mode 100644 index 0000000..ec91b00 --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/conf/controllers/conf_market_making.dman_maker_1.yml @@ -0,0 +1,44 @@ +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] \ No newline at end of file diff --git a/multiple_bots_setup_gateway_dashboard_broker/conf/scripts/conf_v2_generic_with_controllers_1.yml b/multiple_bots_setup_gateway_dashboard_broker/conf/scripts/conf_v2_generic_with_controllers_1.yml new file mode 100644 index 0000000..6f0203f --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/conf/scripts/conf_v2_generic_with_controllers_1.yml @@ -0,0 +1,6 @@ +markets: {} +candles_config: [] +controllers_config: + - conf_market_making.dman_maker_1.yml +config_update_interval: 20 +script_file_name: v2_generic_with_controllers.py diff --git a/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/.password_verification b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/.password_verification new file mode 100644 index 0000000..203db10 --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/.password_verification @@ -0,0 +1 @@ +7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226464366438333638316237393537303131616464373238386139653237356662227d2c202263697068657274657874223a20226662656233303330396263386664653138383634222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223338613137396530616364626165633138663036363738643963313735313961227d2c20226d6163223a202236316534383435333338323535656533316439373061393961373832303063373065336637366565616665343961373334326162343630343931663236666434227d2c202276657273696f6e223a20332c2022616c696173223a2022227d \ No newline at end of file diff --git a/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_client.yml b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_client.yml new file mode 100644 index 0000000..856c1af --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_client.yml @@ -0,0 +1,194 @@ +#################################### +### 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 diff --git a/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_fee_overrides.yml b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_fee_overrides.yml new file mode 100644 index 0000000..3c88239 --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/conf_fee_overrides.yml @@ -0,0 +1,286 @@ +######################################## +### 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: diff --git a/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/connectors/okx_perpetual.yml b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/connectors/okx_perpetual.yml new file mode 100644 index 0000000..cdaa22f --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/connectors/okx_perpetual.yml @@ -0,0 +1,11 @@ +################################ +### okx_perpetual config ### +################################ + +connector: okx_perpetual + +okx_perpetual_api_key: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226162333738376338393761356639623163353535373537386439313834613164227d2c202263697068657274657874223a2022336266663830633462616463633530653965623534303762343739353739386637323961653835313963333133373861633732316366613166666562376336376263363835356333222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223332333236333731633632613866643465656265323236653038643234626431227d2c20226d6163223a202234316233336631313065623333386263663037316662386432356535333966366436366638383633383230613264323363656431383162353432306662616163227d2c202276657273696f6e223a20332c2022616c696173223a2022227d + +okx_perpetual_secret_key: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226338323462616366316663333765633235333335343633663030663935356564227d2c202263697068657274657874223a202236343833613137353365306332633937326663353133313737336464316333323261663761353431366231343664336262333531306465343365633861316632222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20226337333635363264303431633934363230316330346536356134343333383164227d2c20226d6163223a202232306536343466663966616462373863636530336662383565353764333439316337366538653339636665383965376466666535316161363764313536353964227d2c202276657273696f6e223a20332c2022616c696173223a2022227d + +okx_perpetual_passphrase: 7b2263727970746f223a207b22636970686572223a20226165732d3132382d637472222c2022636970686572706172616d73223a207b226976223a20226433623766353662353435623165636534653839393566393736643965393461227d2c202263697068657274657874223a202230393331623065363533306435306566666132633961623934636231222c20226b6466223a202270626b646632222c20226b6466706172616d73223a207b2263223a20313030303030302c2022646b6c656e223a2033322c2022707266223a2022686d61632d736861323536222c202273616c74223a20223262393837666361373162393833623331666461363238633063336439323938227d2c20226d6163223a202235626233356530343266306264323663396561373962376161613262636365363963333632633639383265383237336230613935373566623062343762633463227d2c202276657273696f6e223a20332c2022616c696173223a2022227d diff --git a/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/hummingbot_logs.yml b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/hummingbot_logs.yml new file mode 100755 index 0000000..8e65271 --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/credentials/master_account/hummingbot_logs.yml @@ -0,0 +1,83 @@ +--- +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 diff --git a/multiple_bots_setup_gateway_dashboard_broker/docker-compose.yml b/multiple_bots_setup_gateway_dashboard_broker/docker-compose.yml new file mode 100644 index 0000000..434e805 --- /dev/null +++ b/multiple_bots_setup_gateway_dashboard_broker/docker-compose.yml @@ -0,0 +1,97 @@ +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 + 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 + 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: {} \ No newline at end of file diff --git a/multiple_hummingbot_gateway_compose/README.md b/multiple_hummingbot_gateway_compose/README.md deleted file mode 100644 index 1583298..0000000 --- a/multiple_hummingbot_gateway_compose/README.md +++ /dev/null @@ -1,208 +0,0 @@ -# Deploy Multiple Hummingbot Instances Linked to Gateway - -This installs two [Hummingbot](https://github.com/hummingbot/hummingbot) instances, linked to a single [Hummingbot Gateway](https://github.com/hummingbot/gateway) instance. - -## 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 - -This configuration lets you deploy multiple Hummingbot instances that access data and execute orders on DEX connectors. - -To enable this, you will do need a few things first: -- Install and configure the Hummingbot and Gateway instances -- Generate self-signed certificates in Hummingbot -- Give Gateway the passphrase used to generate the certificates (`GATEWAY_PASSPHRASE`) - -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/multiple_hummingbot_gateway_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 4/4 - ⠿ Network multiple_hummingbot_gateway_compose_default Created - ⠿ Container hummingbot-1 Started - ⠿ Container hummingbot-2 Started - ⠿ Container gateway Started -``` - -### 2. 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 -``` - -### 3. Launch Hummingbot and generate certificates - -Now, attach to the `hummingbot-1` instance: -``` -docker attach hummingbot-1 -``` - -You should see the Hummingbot welcome screen: - -![welcome screen](../welcome.png) - -Set your [password](https://docs.hummingbot.org/operation/password/), which will be used to encrypt any keys you store with Hummingbot. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file. - -Run the following command to generate Gateway certificates: -``` -gateway generate-certs -``` - -You'll be prompted for a passphrase used to generate the certificates. This is the `GATEWAY_PASSPHRASE` environment variable in your `docker-compose.yml` file. - -Hummingbot will use the passphrase to generate the certificates and save them in the `hummingbot_files/certs` folder, where the Gateway instance will look for the certificates it needs. - -Afterwards, run `exit` to exit Hummingbot. - -### 4. Remove network - -Once you're back in Bash/Terminal, run the following command to remove the Compose project: -``` -docker compose down -``` - -You should see the following output: -``` -[+] Running 4/3 - ⠿ Container hummingbot-1 Removed - ⠿ Container hummingbot-2 Removed - ⠿ Container gateway Removed - ⠿ Network multiple_hummingbot_gateway_compose_default Removed -``` - -### 5. Modify YAML file - -Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file. - -We'll edit the section that defines the following environment variables: -```yaml - hummingbot-1: - # environment: - # - CONFIG_PASSWORD=a - hummingbot-2: - # 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 - hummingbot-1: - environment: - - CONFIG_PASSWORD=a - hummingbot-2: - environment: - - CONFIG_PASSWORD=a - gateway: - environment: - - GATEWAY_PASSPHRASE=a -``` - -Afterwards, save the file. - -### 6. Recreate network - -Now, recreate the Compose project: -``` -docker compose up -d -``` - -Attach to the `hummingbot-1` instance. If you have defined `CONFIG_PASSWORD` in the YAML file, you don't need to enter it again: -``` -docker attach hummingbot-1 -``` - -Similarly, you can attach to the `hummingbot-2` Hummingbot instance, which also uses `CONFIG_PASSWORD` -``` -docker attach hummingbot-2 -``` - -In both instances, you should now see `GATEWAY:ONLINE` in the upper-right hand corner. - -Open a new Terminal/Bash window. In it, attach to the 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. - -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 + Gateway - -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 Hummingbot image** - - Once you have confirmed that no containers are running, proceed to pull the latest Hummingbot Docker image. Use the following command to accomplish this: - - ``` - docker pull hummingbot/hummingbot - ``` -3. **Fetch the latest Docker Gateway image** - - Next, we'll need to also pull the latest Docker Gateway image - - ``` - docker pull hummingbot/gateway - ``` - -4. **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 + Gateway to the latest version. \ No newline at end of file diff --git a/multiple_hummingbot_gateway_compose/docker-compose.yml b/multiple_hummingbot_gateway_compose/docker-compose.yml deleted file mode 100644 index 2908dbf..0000000 --- a/multiple_hummingbot_gateway_compose/docker-compose.yml +++ /dev/null @@ -1,62 +0,0 @@ -version: "3.9" -services: - hummingbot-1: - container_name: hummingbot-1 - 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" - # environment: - # - CONFIG_PASSWORD=a - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "5" - tty: true - stdin_open: true - network_mode: host - - hummingbot-2: - container_name: hummingbot-2 - 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/logs:/home/hummingbot/logs" - - "./hummingbot_files/data:/home/hummingbot/data" - - "./hummingbot_files/scripts:/home/hummingbot/scripts" - - "./hummingbot_files/certs:/home/hummingbot/certs" - # environment: - # - CONFIG_PASSWORD=a - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "5" - tty: true - stdin_open: true - network_mode: host - - 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