alexbelgium / hassio-addons-test

MIT License
1 stars 1 forks source link

Looking for it #1

Closed jonathanicq closed 3 years ago

jonathanicq commented 3 years ago

Hi Alex, Nice to see that you are working on such project. I'm counting down the days to put your bot on test. Let me know if you need beta tester.

Regards

alexbelgium commented 3 years ago

Hi Jonathan ! I had started looking at that but honestly I'm not so convinced that bots are the way to go... If I compare my crypto money, I lost more when trying to trade compared to holding specific values. So for the moment the project is a bit on hold. The biggest issue with bots is that they only seem to work if the market goes up... If it crashes down as we have seen recently, the bots don't seem to do a good job either preventing losses or avoiding the missed opportunity if the price bounces back up again... Have you already tried bots?

jonathanicq commented 3 years ago

In fact, I've been working to define my own strategy and later take some bot to just replace the guidelines.

I believe that what we are needing most, is not the whole pack, but a nice interface where we can add/build our own strategy with low or no code.

Have you thought about it ?

alexbelgium commented 3 years ago

I fully agree... I looked around what exists and it seems either we need to pay (around 100 per year seems to be the average), or it is command line bots from github such as here : https://github.com/edeng23/binance-trade-bot

This one has an UI but seems less robust and customizable : https://github.com/chrisleekr/binance-trading-bot

So I do agree with you but for the moment it seems that paying for an app is the only way to have customizable bots with an easy UI without coding... I tried to use Binance Limit trading to sell if go down and buy if go up but it requires to go daily to do it efficiently.

Let me know if you find any free tool for Binance that could be easily transferred to docker...

alexbelgium commented 3 years ago

Ah, I remember why I stopped trying on this addon! It was just too resource intensive and crashed my rpi3+ on building. You could try it though, it should work if only it can build!

jonathanicq commented 3 years ago

@alexbelgium I'll play with it I'm running over Rasp 4 (4Gb) it should be sufficient.

Can you detail a little bit the parameters? I saw that i can use a custom strategy, but is not clear how do i built it.

Cheers

alexbelgium commented 3 years ago

Hi, all infos are here : https://github.com/edeng23/binance-trade-bot

I linked the addon options to the environment variable that could be accepted by the bots

BTW : no UI... but people seemed enthusiastic on github as I see the number of stars so I was thinking it was perhaps worth to try it ;)

jonathanicq commented 3 years ago

@alexbelgium Unfortunately It does not start

Building wheel for zope.interface (setup.py): started Building wheel for zope.interface (setup.py): finished with status 'done' Created wheel for zope.interface: filename=zope.interface-5.4.0-cp39-cp39-linux_aarch64.whl size=210258 sha256=f03b6baaff9c02feb66a69b6633b38ed32ded13cec32da1eb2ce314cdb2ac2aa Stored in directory: /root/.cache/pip/wheels/d8/ed/86/a6eaafa489d679f58d58a488b372b1518a30755f21121806ac Building wheel for ujson (PEP 517): started Building wheel for ujson (PEP 517): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpfyz76srj cwd: /tmp/pip-install-l3jh6vke/ujson_3af80f62904d4b13ab81b703563717e9 Complete output (15 lines): running bdist_wheel running build running build_ext building 'ujson' extension creating build creating build/temp.linux-aarch64-3.9 creating build/temp.linux-aarch64-3.9/deps creating build/temp.linux-aarch64-3.9/deps/double-conversion creating build/temp.linux-aarch64-3.9/deps/double-conversion/double-conversion creating build/temp.linux-aarch64-3.9/lib creating build/temp.linux-aarch64-3.9/python gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./python -I./lib -I./deps/double-conversion/double-conversion -I/usr/local/include/python3.9 -c ./deps/double-conversion/double-conversion/bignum-dtoa.cc -o build/temp.linux-aarch64-3.9/./deps/double-conversion/double-conversion/bignum-dtoa.o -D_GNU_SOURCE gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1

ERROR: Failed building wheel for ujson

Successfully built sqlalchemy sqlitedict MarkupSafe cryptography regex PyYAML zope.interface Failed to build greenlet ujson ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

Removing intermediate container 94c21f870ce3

21-05-17 09:38:13 ERROR (MainThread) [asyncio] Task exception was never retrieved future: <Task finished name='Task-275208' coro=<AddonManager.rebuild() done, defined at /usr/src/supervisor/supervisor/jobs/decorator.py:70> exception=AddonsError()> Traceback (most recent call last): File "/usr/src/supervisor/supervisor/docker/addon.py", line 520, in _build image, log = self.sys_docker.images.build( File "/usr/local/lib/python3.8/site-packages/docker/models/images.py", line 287, in build raise BuildError(chunk['error'], result_stream) docker.errors.BuildError: The command '/bin/ash -o pipefail -c apk add --no-cache git moreutils gcc musl-dev python3-dev libffi-dev openssl-dev cargo && pip install --upgrade pip && pip install -U pip && git clone https://github.com/edeng23/binance-trade-bot && cd /binance-trade-bot && python3 -m pip install -r requirements.txt' returned a non-zero code: 1 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/supervisor/supervisor/addons/init.py", line 330, in rebuild await addon.instance.install(addon.version) File "/usr/src/supervisor/supervisor/utils/init.py", line 33, in wrap_api return await method(api, *args, kwargs) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, *self.kwargs) File "/usr/src/supervisor/supervisor/docker/addon.py", line 504, in _install self._build(version) File "/usr/src/supervisor/supervisor/docker/addon.py", line 540, in _build raise DockerError() from err supervisor.exceptions.DockerError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper raise err File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper return await self._method(args, kwargs) File "/usr/src/supervisor/supervisor/addons/init.py", line 332, in rebuild raise AddonsError() from err supervisor.exceptions.AddonsError 21-05-17 09:38:26 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token 21-05-17 09:56:06 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.check] System checks complete 21-05-17 09:57:04 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING 21-05-17 09:57:06 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete 21-05-17 09:57:06 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING 21-05-17 09:57:06 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete

Do you want to invest time on it ? The addons has no log only supervisor

alexbelgium commented 3 years ago

Thanks for testing! I've modified the dockerfile to add gcc if you want to try to build again.

Sincerely I'm not convinced that it's worth it... Especially since I again lost 25% of my crypto money in 2 days with Elon musks 's latest tweets ;)

jonathanicq commented 3 years ago

I'm updating it right now, keep you posted. where should I define the coins that I want to play ?

SUPPORTED_COIN_LIST: "XLM TRX ICX EOS IOTA ONT QTUM ETC ADA XMR DASH NEO ATOM DOGE VET BAT OMG BTT"

Is not in the config

alexbelgium commented 3 years ago

Usually I don't update versions when I test it myself I just refresh the repo then rebuild ;-) I've bumped the version to 1.1 to allow you to install it more transparently :-)

Btw : installing too many builds manually causes a bug in HA where they accumulate and take a lot of place. You need to run in terminal "docker image prune - a - f" to remove those

alexbelgium commented 3 years ago

Ah, the list of supported coins is manually encoded as an environmental variable. Tell me if you want to delete some and I'll do it - currently the whole list is present

jonathanicq commented 3 years ago

@alexbelgium

No lucky yet

Building wheel for PyYAML (PEP 517): finished with status 'done' Created wheel for PyYAML: filename=PyYAML-5.4.1-cp39-cp39-linux_aarch64.whl size=45642 sha256=f55f30d2259a4af67ea6d3b03f9134ce8208ea5faa5960b59e0b4e3c3a049518 Stored in directory: /root/.cache/pip/wheels/b7/a5/c4/504d913c2a55bb09c607541578ec5f844d1ff33467abe93ba5 Building wheel for zope.interface (setup.py): started Building wheel for zope.interface (setup.py): finished with status 'done' Created wheel for zope.interface: filename=zope.interface-5.4.0-cp39-cp39-linux_aarch64.whl size=210258 sha256=66b8a0e2c126e4af0fa7421af99c22f2205cc3ad3e38348d0b1e507a5153842a Stored in directory: /root/.cache/pip/wheels/d8/ed/86/a6eaafa489d679f58d58a488b372b1518a30755f21121806ac Building wheel for ujson (PEP 517): started Building wheel for ujson (PEP 517): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmphl56kq72 cwd: /tmp/pip-install-1d9f_4io/ujson_4694254da73647da802ce524a7675785 Complete output (15 lines): running bdist_wheel running build running build_ext building 'ujson' extension creating build creating build/temp.linux-aarch64-3.9 creating build/temp.linux-aarch64-3.9/deps creating build/temp.linux-aarch64-3.9/deps/double-conversion creating build/temp.linux-aarch64-3.9/deps/double-conversion/double-conversion creating build/temp.linux-aarch64-3.9/lib creating build/temp.linux-aarch64-3.9/python gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./python -I./lib -I./deps/double-conversion/double-conversion -I/usr/local/include/python3.9 -c ./deps/double-conversion/double-conversion/bignum-dtoa.cc -o build/temp.linux-aarch64-3.9/./deps/double-conversion/double-conversion/bignum-dtoa.o -D_GNU_SOURCE gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1

ERROR: Failed building wheel for ujson

Successfully built sqlalchemy sqlitedict MarkupSafe cryptography regex PyYAML zope.interface Failed to build greenlet ujson ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

Removing intermediate container fe50ea5584a7

21-05-17 11:57:19 WARNING (MainThread) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Samba NAS 21-05-17 11:57:19 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of RPi MySensor Gateway 21-05-17 11:57:19 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of RPi MySensor Gateway 21-05-17 11:57:19 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'devices' use a deprecated format, the new format uses a list of paths only. Please report this to the maintainer of RPi MySensor Gateway 21-05-17 11:57:19 WARNING (MainThread) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of RPi MySensor Gateway 21-05-17 11:57:20 WARNING (MainThread) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Emby beta NAS 21-05-17 11:57:22 INFO (MainThread) [supervisor.store] Loading add-ons from store: 101 all - 0 new - 0 remove 21-05-17 11:57:22 INFO (MainThread) [supervisor.store] Loading add-ons from store: 101 all - 0 new - 0 remove 21-05-17 11:57:22 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete 21-05-17 11:57:22 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING 21-05-17 11:57:22 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete 21-05-17 11:57:22 ERROR (MainThread) [asyncio] Task exception was never retrieved future: <Task finished name='Task-300284' coro=<AddonManager.rebuild() done, defined at /usr/src/supervisor/supervisor/jobs/decorator.py:70> exception=AddonsError()> Traceback (most recent call last): File "/usr/src/supervisor/supervisor/docker/addon.py", line 520, in _build image, log = self.sys_docker.images.build( File "/usr/local/lib/python3.8/site-packages/docker/models/images.py", line 287, in build raise BuildError(chunk['error'], result_stream) docker.errors.BuildError: The command '/bin/ash -o pipefail -c apk add --no-cache git moreutils gcc musl-dev python3-dev libffi-dev openssl-dev cargo && pip install --upgrade pip && pip install -U pip && git clone https://github.com/edeng23/binance-trade-bot && cd /binance-trade-bot && python3 -m pip install -r requirements.txt' returned a non-zero code: 1 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/supervisor/supervisor/addons/init.py", line 330, in rebuild await addon.instance.install(addon.version) File "/usr/src/supervisor/supervisor/utils/init.py", line 33, in wrap_api return await method(api, *args, kwargs) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, *self.kwargs) File "/usr/src/supervisor/supervisor/docker/addon.py", line 504, in _install self._build(version) File "/usr/src/supervisor/supervisor/docker/addon.py", line 540, in _build raise DockerError() from err supervisor.exceptions.DockerError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper raise err File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper return await self._method(args, kwargs) File "/usr/src/supervisor/supervisor/addons/init.py", line 332, in rebuild raise AddonsError() from err supervisor.exceptions.AddonsError 21-05-17 12:03:19 INFO (MainThread) [supervisor.host.apparmor] Adding/updating AppArmor profile: 6c45555e_binance_bot 21-05-17 12:03:19 INFO (MainThread) [supervisor.host.services] Reloading local service hassos-apparmor.service 21-05-17 12:03:20 INFO (SyncWorker_3) [supervisor.docker.addon] Starting build for 6c45555e/aarch64-addon-binance_bot:1.1

jonathanicq commented 3 years ago

@alexbelgium 21-05-17 12:33:11 INFO (SyncWorker_3) [supervisor.docker.addon] Build 6c45555e/aarch64-addon-binance_bot:1.1 done 21-05-17 12:33:11 INFO (MainThread) [supervisor.addons] Add-on '6c45555e_binance_bot' successfully installed 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'CURRENT_COIN_SYMBOL' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'SUPPORTED_COIN_LIST' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'BRIDGE_SYMBOL' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'API_KEY' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'API_SECRET_KEY' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'SCOUT_MULTIPLIER' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'SCOUT_SLEEP_TIME' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'TLD' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'BUY_TIMEOUT' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:40:58 WARNING (MainThread) [supervisor.addons.options] Option 'SELL_TIMEOUT' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'CURRENT_COIN_SYMBOL' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'BRIDGE_SYMBOL' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'API_KEY' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'API_SECRET_KEY' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'SCOUT_MULTIPLIER' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'SCOUT_SLEEP_TIME' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'TLD' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'BUY_TIMEOUT' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:09 WARNING (MainThread) [supervisor.addons.options] Option 'SELL_TIMEOUT' does not exist in the schema for Binance Trader Bot (6c45555e_binance_bot) 21-05-17 12:41:51 INFO (SyncWorker_1) [supervisor.docker.interface] Cleaning addon_6c45555e_binance_bot application 21-05-17 12:41:53 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker add-on 6c45555e/aarch64-addon-binance_bot with version 1.1 21-05-17 12:44:00 INFO (MainThread) [supervisor.snapshots] Found 9 snapshot files 21-05-17 12:44:09 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning addon_6c45555e_binance_bot application 21-05-17 12:44:11 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on 6c45555e/aarch64-addon-binance_bot with version 1.1

alexbelgium commented 3 years ago

well at least it starts now :-)

For your errors, did you encode the options manually in the addon options? You need to use the pre-existing format (not in yaml) or else it won't work

I've mapped them to the ones that you are using : api_key=APIKEY api_secret_key=APISECRET current_coin=CURRENTCOIN bridge=BRIDGE tld=DOMAIN hourToKeepScoutHistory=HISTORY scout_multiplier=SCOUTMULTI scout_sleep_time=SCOUTSLEEP strategy=STRATEGY buy_timeout=BUYTIMEOUT sell_timeout=SELLTIMEOUT

alexbelgium commented 3 years ago

error on run.sh location, I'll correct that

jonathanicq commented 3 years ago

@alexbelgium I'm using all the test data from edeng23

Don't worry about the key's they are not my real one :)

image

alexbelgium commented 3 years ago

ah ah ;-) it was my first reaction I was a bit worried ;-) although with the keys I don't believe we can take the money out of Binance - only trade it from one crypto to another

It's building fine on mine system too now and I'm just patching a few thing

alexbelgium commented 3 years ago

Latest version starts but has another type of bug

alexbelgium commented 3 years ago

Actually perhaps it works and its only because I don't use a binance key that it exists while saying that history is empty

jonathanicq commented 3 years ago

@alexbelgium

After my HA Restart this is what happen 21-05-17 19:53:47 ERROR (SyncWorker_0) [supervisor.docker] Image 6c45555e/aarch64-addon-binance_bot not exists for addon_6c45555e_binance_bot 21-05-17 19:53:47 INFO (SyncWorker_0) [supervisor.resolution.module] Create new issue IssueType.MISSING_IMAGE - ContextType.ADDON / 6c45555e_binance_bot 21-05-17 19:53:47 INFO (SyncWorker_0) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_REPAIR - ContextType.ADDON / 6c45555e_binance_bot 21-05-17 19:53:47 ERROR (MainThread) [asyncio] Task exception was never retrieved future: <Task finished name='Task-1212' coro=<HomeAssistantWebSocket.async_send_command() done, defined at /usr/src/supervisor/supervisor/homeassistant/websocket.py:106> exception=TypeError('Received message 257:None is not str')> Traceback (most recent call last): File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 134, in async_send_command return await self._client.async_send_command(message) File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 46, in async_send_command response = await self.client.receive_json() File "/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py", line 291, in receive_json data = await self.receive_str(timeout=timeout) File "/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py", line 276, in receive_str raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str") TypeError: Received message 257:None is not str 21-05-17 19:53:56 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize 21-05-17 19:53:56 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered 21-05-17 19:53:56 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running

Then I click over Rebuild and when I click to start

21-05-17 19:57:09 ERROR (MainThread) [supervisor.utils] Can't execute run while a task is in progress

it should that it's on but no log in the addon tab

jonathanicq commented 3 years ago

I expect that when I start it shows something in the supervisor and/or in the log of the addon. like the the v1.1 So I think there is something triggering twice

jonathanicq commented 3 years ago

@alexbelgium It finally enriched some log line It Seems that is missing a file

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. sed: /user.cfg: No such file or directory [cmd] /binance-trade-bot/run.sh exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

alexbelgium commented 3 years ago

Hi, have you updated to v0.1? It should solve this issue :) thanks :)

jonathanicq commented 3 years ago

@alexbelgium Indeed the new version its better

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done.

Add-on: Binance Trader Bot Automated binance cryptocurrency trading bot

Add-on version: 0.1 You are running the latest version of this add-on. System: Home Assistant OS 5.13 (aarch64 / raspberrypi4-64) Home Assistant Core: 2021.5.4 Home Assistant Supervisor: 2021.04.3

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

2021-05-18 08:31:51,643 - crypto_trading_logger - INFO - Starting Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/binance-trade-bot/binance_trade_bot/main.py", line 5, in main() File "/binance-trade-bot/binance_trade_bot/crypto_trading.py", line 16, in main config = Config() File "/binance-trade-bot/binance_trade_bot/config.py", line 36, in init self.SCOUT_HISTORY_PRUNE_TIME = float( ValueError: could not convert string to float: '$HISTORY' [cmd] /binance-trade-bot/run.sh exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

jonathanicq commented 3 years ago

Do you think that the service it stoped due the fake key ? Can you add a nife error feedback (Connection fail or something like that?)

jonathanicq commented 3 years ago

@alexbelgium I've tested with my real key and i got the same result, so It's really a problem.

alexbelgium commented 3 years ago

Thanks! It was a coding error... Should be solved I'll try again :)

alexbelgium commented 3 years ago

Oh it seems to work! The only error I have is invalid api key now @jonathanicq

jonathanicq commented 3 years ago

@alexbelgium

Indeed it moved a lot forward but I got stuck on that log 2021-05-18 20:58:26,967 - crypto_trading_logger - INFO - Initializing vs 2021-05-18 20:58:26,968 - crypto_trading_logger - INFO - Initializing vs 2021-05-18 20:58:26,971 - crypto_trading_logger - INFO - Initializing vs 2021-05-18 20:58:27,178 - crypto_trading_logger - INFO - Setting initial coin to ATOM 2021-05-18 20:58:27,281 - crypto_trading_logger - INFO - Purchasing to begin trading 2021-05-18 20:58:29,715 - crypto_trading_logger - INFO - BUY QTY 1.561 of 2021-05-18 20:58:29,975 - crypto_trading_logger - INFO - {'symbol': 'ATOMUSDT', 'orderId': 518513877, 'orderListId': -1, 'clientOrderId': 'KzcXHiKui0nBeal3s7kc1s', 'transactTime': 1621367909847, 'price': '22.53600000', 'origQty': '1.56100000', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'BUY', 'fills': []} 2021-05-18 20:58:30,286 - crypto_trading_logger - INFO - APIError(code=-2013): Order does not exist. 2021-05-18 20:58:31,558 - crypto_trading_logger - INFO - {'symbol': 'ATOMUSDT', 'orderId': 518513877, 'orderListId': -1, 'clientOrderId': 'KzcXHiKui0nBeal3s7kc1s', 'price': '22.53600000', 'origQty': '1.56100000', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'BUY', 'stopPrice': '0.00000000', 'icebergQty': '0.00000000', 'time': 1621367909847, 'updateTime': 1621367909847, 'isWorking': True, 'origQuoteOrderQty': '0.00000000'}

alexbelgium commented 3 years ago

Would anything should be otherwise? Isn't it a sign that it is working?

alexbelgium commented 3 years ago

Mmh I see several mention of this error 9n the upstream image repo https://github.com/edeng23/binance-trade-bot/issues?q=Order+does+not+exist. But no clear solution...

jonathanicq commented 3 years ago

@alexbelgium I've facing also this error "invalid quantity"

2021-05-19 16:24:48,184 - crypto_trading_logger - INFO - Initializing vs 2021-05-19 16:24:48,279 - crypto_trading_logger - INFO - Setting initial coin to DOGE 2021-05-19 16:24:48,353 - crypto_trading_logger - INFO - Purchasing to begin trading 2021-05-19 16:24:50,811 - crypto_trading_logger - INFO - BUY QTY 0.0 of 2021-05-19 16:24:51,082 - crypto_trading_logger - INFO - APIError(code=-1013): Invalid quantity. 2021-05-19 16:24:52,349 - crypto_trading_logger - INFO - APIError(code=-1013): Invalid quantity. 2021-05-19 16:24:53,614 - crypto_trading_logger - INFO - APIError(code=-1013): Invalid quantity. 2021-05-19 16:24:54,880 - crypto_trading_logger - INFO - APIError(code=-1013): Invalid quantity.

alexbelgium commented 3 years ago

Hi Jonathan, I had no time recently to work on it, but I saw that another trading bot exists! https://github.com/miouzikal/hassio-addons/tree/master/binance-trade-bot-for-hassio

Perhaps it would interest you ;)

jonathanicq commented 3 years ago

@alexbelgium Thanks man, I'll give a look for sure.

jonathanicq commented 3 years ago

@alexbelgium I saw your msg by e-mail, but I was off and now I can't find where you wrote me. But... No, the Bot is not making profit I need to dig more on it, but I saw that missed several good opportunities.

Anyways, I'll keep you posted

alexbelgium commented 3 years ago

Thanks... It is hard to make money I find with bitcoin for the moment. Good luck!

alexbelgium commented 3 years ago

Closing issue as another comparable addon exists