(feat) refactor examples

This commit is contained in:
cardosofede
2024-03-29 12:19:42 -03:00
parent c7d35edcb4
commit 6de6ebc2be
22 changed files with 963 additions and 1321 deletions

View File

@@ -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.

View File

@@ -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]

View File

@@ -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

View File

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

View File

@@ -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

View File

@@ -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:

View File

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

View File

@@ -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

View File

@@ -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: {}