pujaltedavid / binance-crypto-trading-bot

A cryptocurrency trading bot that automates long and short trades. It uses fractals combined with Alligator indicators, both from Bill Williams.
33 stars 8 forks source link

help #1

Closed duchuAz closed 2 years ago

duchuAz commented 2 years ago

image

duchuAz commented 2 years ago

how to import binance api into bot ? thx

pujaltedavid commented 2 years ago

Hi, thanks for reporting the issue. I have updated the section https://github.com/pujaltedavid/binance-crypto-trading-bot#create-telegram-bot-token of the readme file. It explains more clear how to set up the user ID.

Now, the Access denegated message also gives your user ID. You have to copy that user ID and put it in the USER constant at the top of telegram_bot.py file. This makes sure that only you can interact with your bot, and not other users.

duchuAz commented 2 years ago

Error submitting job "check_log (trigger: interval[0:00:10], next run at: 2022-09-07 14:05:40 UTC)" to executor "default" Traceback (most recent call last): File "C:\Users\ad\anaconda3\lib\site-packages\apscheduler\schedulers\base.py", line 974, in _process_jobs executor.submit_job(job, run_times) File "C:\Users\ad\anaconda3\lib\site-packages\apscheduler\executors\base.py", line 71, in submit_job self._do_submit_job(job, run_times) File "C:\Users\ad\anaconda3\lib\site-packages\apscheduler\executors\pool.py", line 22, in _do_submit_job f = self._pool.submit(run_job, job, job._jobstore_alias, run_times, self._logger.name) File "C:\Users\ad\anaconda3\lib\concurrent\futures\thread.py", line 163, in submit raise RuntimeError('cannot schedule new futures after ' RuntimeError: cannot schedule new futures after interpreter shutdown

duchuAz commented 2 years ago

I don't know what this error is

pujaltedavid commented 2 years ago

I think it is due to mismatch versions of python and/or telegram bot library.

I added a line at the end of telegram_bot.py to set the bot to idle after start polling, as suggested at https://stackoverflow.com/questions/70673175/runtimeerror-cannot-schedule-new-futures-after-interpreter-shutdown

Let me know if there are more issues.

duchuAz commented 2 years ago

Where does the Binance API fill in, I haven't seen it yet. thx u

pujaltedavid commented 2 years ago

The bot uses the public binance api to get market data endpoints in real-time (prices). It actually does not use the user API key for making real spot or magin trades. It's not that is hard to implement or anything, I don't want people to put their binance account and potentially loose money. I just know that the bot is not profitable after all, and it has to be severely improved in order to connect to a real binance account and put real money. You can check the examples folder and see how not all the trades are positive.

duchuAz commented 2 years ago

thank you

duchuAz commented 2 years ago

I think it is due to mismatch versions of python and/or telegram bot library.

I added a line at the end of telegram_bot.py to set the bot to idle after start polling, as suggested at https://stackoverflow.com/questions/70673175/runtimeerror-cannot-schedule-new-futures-after-interpreter-shutdown

Let me know if there are more issues.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\ad\anaconda3\lib\site-packages\telegram\ext\updater.py", line 646, in _network_loop_retry if not action_cb(): File "C:\Users\ad\anaconda3\lib\site-packages\telegram\ext\updater.py", line 597, in polling_action_cb updates = self.bot.get_updates( File "C:\Users\ad\anaconda3\lib\site-packages\telegram\ext\extbot.py", line 226, in get_updates updates = super().get_updates( File "C:\Users\ad\anaconda3\lib\site-packages\telegram\bot.py", line 133, in decorator result = func(*args, **kwargs) File "C:\Users\ad\anaconda3\lib\site-packages\telegram\bot.py", line 3057, in get_updates self._post( File "C:\Users\ad\anaconda3\lib\site-packages\telegram\bot.py", line 298, in _post return self.request.post( File "C:\Users\ad\anaconda3\lib\site-packages\telegram\utils\request.py", line 361, in post result = self._request_wrapper( File "C:\Users\ad\anaconda3\lib\site-packages\telegram\utils\request.py", line 265, in _request_wrapper raise NetworkError(f'urllib3 HTTPError {error}') from error telegram.error.NetworkError: urllib3 HTTPError ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))