fixes/additional infos

This commit is contained in:
olli 2024-12-18 12:03:31 +01:00
parent 3cd119dda1
commit 3415280a33

View File

@ -126,7 +126,7 @@ Originally this project was supposed to be a simple script to monitor prices of
Finally, it's a hobby project and I have to see how and when I can find time for it, because there also has to be time for family, friends, work and other hobbies. Finally, it's a hobby project and I have to see how and when I can find time for it, because there also has to be time for family, friends, work and other hobbies.
If there is someone who would like to rewrite this bot in e.g. Python, I would be happy to support them as best I can with this task. Just let me know. If there is someone who would like to rewrite this bot in e.g. Python, I would be happy to support them as best I can with this task. Just let me know.
## How to use/install (basic Linux knowledge required!) ## How to install (basic Linux knowledge required!)
Should run on every system with docker. Should run on every system with docker.
@ -135,7 +135,7 @@ Tested and running with Debian 12 (Bookworm).
https://www.debian.org/download https://www.debian.org/download
https://www.raspberrypi.com/software/operating-systems/ https://www.raspberrypi.com/software/operating-systems/
### 2: Run Ansible Playbooks ### 2: Way 1: Istall via anssible playbooks
On a fresh Debian 12 system you can run my Ansible Playbooks to use the same environment the bot is developed and running. On a fresh Debian 12 system you can run my Ansible Playbooks to use the same environment the bot is developed and running.
Please have a look what exactly the playbooks are doing if you are unsure. Please have a look what exactly the playbooks are doing if you are unsure.
@ -183,21 +183,30 @@ If you run this as user and not as root, the script will install sudo and enable
``` ```
bash install.sh bash install.sh
``` ```
### Download
### 3. Manual installation without ansible playbooks
Not necessary if you use the dabo Playbook
#### Install docker
See: https://docs.docker.com/engine/install/debian/
You can also use other containerizations like podman or kubernetes. But here I stick with docker
#### Download
Not necessary if you use the dabo Playbook Not necessary if you use the dabo Playbook
``` ```
git clone https://github.com/egabosh/dabo.git git clone https://github.com/egabosh/dabo.git
cd dabo cd dabo
``` ```
### Build container #### Build container
Not necessary if you use the dabo Playbook Not necessary if you use the dabo Playbook
``` ```
docker -l warn compose --ansi never build --progress=plain --pull --no-cache --force-rm docker -l warn compose --ansi never build --progress=plain --pull --no-cache --force-rm
``` ```
### 3. Configuration ### 3. Make Webinterface available
Not necessary if you use the dabo Playbook Not necessary if you use the dabo Playbook with traefik and letsencrypt
Edit docker-compose.yml or create docker-compose.override.yml to fit yout needs e.g. domain and network settings or basic auth, e.g. for traefik and letsencrypt: Edit docker-compose.yml or create docker-compose.override.yml to fit yout needs e.g. domain and network settings or basic auth, e.g. for traefik and letsencrypt:
``` ```
@ -239,6 +248,15 @@ networks:
' >docker-compose.override.yml ' >docker-compose.override.yml
``` ```
If you use the ansible Playbook but don't want to use traefik/letsencrypt or availability over the internet you can add the following to `docker-compose.override.yml` below "# END ANSIBLE MANAGED BLOCK".
ATTENTION: ACCESS IS UNENCRYPTED!!!
```
ports:
- 8080:80
```
You have to restart the container(s) to apply changes. See operational commands.
### 4. Optional: Matrix connection ### 4. Optional: Matrix connection
Optional: If you use matrix/matrix-commander (https://github.com/egabosh/linux-setups/tree/main/debian/matrix.server) and want do receive Matrix-Messages from the bot you can create an SSH-Key to allow sending Matrix-Messages e.g.: Optional: If you use matrix/matrix-commander (https://github.com/egabosh/linux-setups/tree/main/debian/matrix.server) and want do receive Matrix-Messages from the bot you can create an SSH-Key to allow sending Matrix-Messages e.g.:
@ -255,10 +273,8 @@ and add Key on your matrix-Server to the authorized_keys of the matrix-User
Create Secrets file for your API Key(s) Create Secrets file for your API Key(s)
- file: dabo/.CCXT-ID-secrets - file: dabo/.CCXT-ID-secrets
CCXI-ID see: https://github.com/ccxt/ccxt CCXI-ID see: https://github.com/ccxt/ccxt
Examples: Examples:
``` ```
# for Phemex # for Phemex
@ -280,6 +296,7 @@ vim dabo-bot.conf
``` ```
Defaults in dabo/dabo-bot.conf Defaults in dabo/dabo-bot.conf
## How to use
### Operational commands ### Operational commands
Run/Restart: Run/Restart:
@ -316,7 +333,7 @@ docker compose down
docker compose up -d docker compose up -d
``` ```
## Strategies ### Strategies
IMPORTANT!!! IMPORTANT!!!
@ -331,7 +348,7 @@ Strategies are located in die stretegies subdir.
You can put your own code into the strategies it will be sourced by the bot. You can put your own code into the strategies it will be sourced by the bot.
If you want, you can also use other programming languages or binary code as a strategy and simply start it using your own strategy. If you want, you can also use other programming languages or binary code as a strategy and simply start it using your own strategy.
### Example strategies #### Example strategies
There are examples for strategy files (deactivated by "return 0" in the beginning): There are examples for strategy files (deactivated by "return 0" in the beginning):
``` ```
cat strategies/example.strategy.sh cat strategies/example.strategy.sh
@ -348,7 +365,7 @@ cp -p strategies/example.strategy.sh strategies/my-own-trading
cp -p strategies/example_manage_positions.strategy.sh strategies/my-own-position.strategy.sh cp -p strategies/example_manage_positions.strategy.sh strategies/my-own-position.strategy.sh
``` ```
### Own strategies #### Own strategies
Aditional strategies can be created with naming convention *.strategy.sh Aditional strategies can be created with naming convention *.strategy.sh
``` ```
strategies/my-new.strategy.sh strategies/my-new.strategy.sh
@ -361,12 +378,12 @@ chown -R 10000:10000 strategies
chmod -R 640 strategies chmod -R 640 strategies
``` ```
### Variables during runtime of the strategies #### Variables during runtime of the strategies
You can use available variables/arrays during runtime to read (and set) values. You can use available variables/arrays during runtime to read (and set) values.
This arrays are available to runtime in the strategies This arrays are available to runtime in the strategies
#### Large associative arrays v and vr (reverse) ##### Large associative arrays v and vr (reverse)
${v[SYMBOL_TIMEFRAME_ITEM_NUMBER]} ${v[SYMBOL_TIMEFRAME_ITEM_NUMBER]}
@ -388,7 +405,7 @@ ${v[$[ETHUSDT_levels_1w_next_down]}
You can find a complete list of available values in the file `data/botdata/values` which is created in the runtime of the bot. You can find a complete list of available values in the file `data/botdata/values` which is created in the runtime of the bot.
An long example list you can find in example-values. https://github.com/egabosh/dabo/blob/main/example-values An long example list you can find in example-values. https://github.com/egabosh/dabo/blob/main/example-values
#### Current price from exchange ##### Current price from exchange
${f_tickers_array[SYMBOL]} ${f_tickers_array[SYMBOL]}
``` ```
@ -396,7 +413,7 @@ ${f_tickers_array[SOLUSDT]}
${f_tickers_array[ETH${CURRENCY}]} ${f_tickers_array[ETH${CURRENCY}]}
``` ```
#### Open Orders ##### Open Orders
``` ```
${o[ETHUSDT_present]}=sl_close_long tp_close_long ${o[ETHUSDT_present]}=sl_close_long tp_close_long
@ -421,7 +438,7 @@ ${o[ETHUSDT_tp_close_long_type]}=MarketIfTouched
You can find a complete list of available values in the file `data/botdata/values-orders` which is created in the runtime of the bot. You can find a complete list of available values in the file `data/botdata/values-orders` which is created in the runtime of the bot.
#### Open Positions ##### Open Positions
``` ```
${p[ETHUSDT_currency_amount]}=9509.25 ${p[ETHUSDT_currency_amount]}=9509.25