tpmmthomas / binance-copy-trade-bot Goto Github PK
View Code? Open in Web Editor NEWA telegram copy trading bot that follows cryptocurrency derivatives trade on the binance leaderboard.
Home Page: https://forms.gle/98SpxWP7BgjCbxe47
A telegram copy trading bot that follows cryptocurrency derivatives trade on the binance leaderboard.
Home Page: https://forms.gle/98SpxWP7BgjCbxe47
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
after 10-14h running i get this one and already tried:
Anyone has this problem too and know what to do to solve it?
Hey there,
Thanks for your work on it bot.
I have tried successfully the follow/alert part, and I am now trying out the copy trading feature.
I have a question regarding the "proportion" parameter which is a bit unclear to me on how it works to define de size of the position, it would be great if you could provide an example.
Also, the commands to update this parameter (/updateall and /updateproportion) doesn't seem to be implemented in the code of the bot, so I'm not sure how to make it work?
Thanks for you help!
hi bro
I have an error while doing the step 4 Run python -m app.ct_main
I dont know how to Fill in the required fields in app/data/credentials.py such as
auth_code = "" # set it yourself where do i have the authentification code?
admin_code = "" # set it yourself where do i have the admin code?
ip = "" where do i have the ip?
C:\Users\SIDIBE\Desktop\BOT\binance-copy-trade-bot>python -m app.ct_main
2024-03-02 16:54:04,164 - app.copy_trade_backend.ct_globals - INFO - mongodb://Admin:123456@localhost:27017/
db path is mongodb://Admin:123456@localhost:27017/
2024-03-02 16:54:04,183 - main - INFO - The copy trade program has started running.
Exception in thread pymongo_server_monitor_thread:
Traceback (most recent call last):
File "C:\Users\SIDIBE\miniconda3\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\SIDIBE\miniconda3\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\periodic_executor.py", line 133, in _run
if not self._target():
^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\monitor.py", line 61, in target
monitor._run() # type:ignore[attr-defined]
^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\monitor.py", line 213, in _run
self._start_rtt_monitor()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\monitor.py", line 167, in _start_rtt_monitor
self._rtt_monitor.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\monitor.py", line 87, in open
self._executor.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\periodic_executor.py", line 95, in open
thread.start()
File "C:\Users\SIDIBE\miniconda3\Lib\threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\SIDIBE\miniconda3\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\SIDIBE\Desktop\BOT\binance-copy-trade-bot\app\copy_trade_backend\ct_position.py", line 521, in run
urls = self.userdb.retrieve_traders()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\Desktop\BOT\binance-copy-trade-bot\app\copy_trade_backend\ct_db.py", line 101, in retrieve_traders
for x in self.tradertable.find():
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\cursor.py", line 1264, in next
if len(self.__data) or self._refresh():
^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\cursor.py", line 1181, in _refresh
self.__send_message(q)
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\cursor.py", line 1060, in __send_message
response = client._run_operation(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo_csot.py", line 107, in csot_wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 1394, in _run_operation
return self._retryable_read(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 1492, in _retryable_read
return self._retry_internal(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo_csot.py", line 107, in csot_wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 1462, in _retry_internal
).run()
^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 2315, in run
return self._read() if self._is_read else self._write()
^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 2437, in _read
self._server = self._get_server()
^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 2400, in _get_server
return self._client._select_server(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 1292, in _select_server
topology = self._get_topology()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\mongo_client.py", line 1238, in _get_topology
self._topology.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\topology.py", line 201, in open
self._ensure_opened()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\topology.py", line 652, in _ensure_opened
server.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\server.py", line 70, in open
self._monitor.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\monitor.py", line 87, in open
self._executor.open()
File "C:\Users\SIDIBE\miniconda3\Lib\site-packages\pymongo\periodic_executor.py", line 95, in open
thread.start()
File "C:\Users\SIDIBE\miniconda3\Lib\threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown
thank you
Hello excuse me to disturb you, I am new to this field and I have been trying to set up this robot for 2 days now. Unfortunately I am stuck on these data to enter:
auth_code = "" # set it yourself
admin_code = "" # set it yourself
Where can I find this?
Like the name suggests, made a channel to chat with people and bounce off ideas https://discord.gg/mmTBy5H649
Hi Thomas !
First of all, thank you for your great work. Is there already a way to set a percentage of user balance to use for trades instead of /setallproportions ?
Setallproportions seems to be like a percentage of the original trade, for example 1% of proportion means 0.01 ETH to trade is the original trader trades 1 ETH ?
Thank you for your answer and have a nice day
I tried to understand why one trade that should have been placed didn't, and I found this error in my syslog:
ERROR - The number of contracts exceeds maximum limit allowed: too large (ErrCode: 130006)
Pretty self explanatory, but I wonder if the script could be adjusted to split the order into sub-orders taking into account the maximum contracts limit?
Or at least take the maximum contract limit for the number of contracts for the trade.
Thanks!
Hello,
Thank you for your work and for sharing it.
Could you consider changing the shape of a trader's positions.
I find that the table lacks clarity, for example on my capture, we do not know what the trader's new position is.
Maybe we could orient ourselves on the model of the other screenshot
Thanks
Can i get the systemctl .service file please ?
Hello, thank you for your previous answer! I successfully launched the bot.
The configuration with the Bybit APIs and the trader is going well. On the other hand I would like to add an additional Binance trader to my list but I have not succeeded so far and some commands do not work.
Small question regarding the /view command: the bot shows the trader's current position and then shows the time of the last position update. The last update was yesterday according to the bot but when you go to the trader's profile the position and the earnings are different.
bot_token = "I understand this part"
auth_code = "" # set it yourself
admin_code = "" # set it yourself
ip = ""
db_user = ""
db_pw = ""
I installed mongo and everything set up but what exactly I am putting here ?
Really amazing project btw - would be great if anyone could help with what the safe_ratio actually does (I would like to control the position sizes) and if possible to follow multiple traders from one account and if not if possible to just make multiple telegram bots?
If anyone wants to join a discord can make a group for all who use this bot.
Hello, I am new to programming. I would like to be able to run your script easily. Is it possible or do I need to have better knowledge? I see several files and I don't know which one to run for copy trading. Are they all nested together? When I go to Visual Sutdio Code and run a random file they tell me that the "app" module is missing. I already have my Bybit API keys but I don't know where to enter them. I installed all required extensions. Thank you in advance for a possible comprehensive answer :)
I tried everything but I am facing this error
(trading) soumyadebnath16@Soumyas-MacBook-Air Bybit % python -m app.tgb_main
Traceback (most recent call last):
File "/Users/soumyadebnath16/Developer/anaconda3/envs/trading/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/soumyadebnath16/Developer/anaconda3/envs/trading/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/soumyadebnath16/binance-copy-trade-bot/Bybit/app/tgb_main.py", line 2, in
from app.telegram_frontend.tgb_db import dbOperations
File "/Users/soumyadebnath16/binance-copy-trade-bot/Bybit/app/telegram_frontend/tgb_db.py", line 5, in
from pybit.usdt_perpetual import HTTP
ModuleNotFoundError: No module named 'pybit.usdt_perpetual'
(trading) soumyadebnath16@Soumyas-MacBook-Air Bybit %
Hello,
thank you for your work on this project. Is it possible to connect to Bybit testnet API ? I see some commented line with test in your code, but I guess it will not work. When I change my API URL to https://api-testnet.bybit.com it's not working. Or is there any other way how to backtest/test it first?
Thanks.
conda create -n trading python=3.9 -y
conda activate trading
git clone https://github.com/tpmmthomas/binance-copy-trade-bot.git
cd binance-copy-trade-bot
pip install -r requirements.txt
I have a bot a problem to start a bot on windows.
If you can help me please you can contact me on discord : Vilkins#5491
In the credential file, in "ip" field what i put ?
Hey, I'm not a very good programmer as I'm fairly new to Python. Could someone help me set up this bot so I could get it running. I don't know what to do lol. Please contact me via discord: sombody#1319
thanks!
Hello,
Thanks again for your work.
Can you explain to me what the safety ratio means?
Does it block the transaction when the initial amount of the transaction is greater than the determined ratio of the balance (Example with a ratio of 0.5 if I have $10000 and the order is 5001 it will block?
Thanks
I would like to contribute to this project by implementing the Binance Futures API (available in my country). This would allow other users to benefit from it.
If you agree, can you give me a way to contact you in case of questions?
Looking forward to hearing from you before I start!
What ever trader i use i get
2023-04-14 16:25:56,513 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
2023-04-14 16:25:57,014 - app.copy_trade_backend.ct_position - ERROR - TreeOfAlpha1 cannot fetch url
2023-04-14 16:25:57,526 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
2023-04-14 16:25:58,019 - app.copy_trade_backend.ct_position - ERROR - TreeOfAlpha1 cannot fetch url
2023-04-14 16:25:58,527 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
2023-04-14 16:25:59,019 - app.copy_trade_backend.ct_position - ERROR - TreeOfAlpha1 cannot fetch url
2023-04-14 16:25:59,513 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
2023-04-14 16:26:00,011 - app.copy_trade_backend.ct_position - ERROR - TreeOfAlpha1 cannot fetch url
2023-04-14 16:26:00,503 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
2023-04-14 16:26:01,000 - app.copy_trade_backend.ct_position - ERROR - TreeOfAlpha1 cannot fetch url
2023-04-14 16:26:01,501 - app.copy_trade_backend.ct_position - ERROR - yugoviking cannot fetch url
Newest version.Bybit
I compared your old and new code from your repo.
I see you where having binance in. Then you removed, and refactored the code.
Do you know what would be the easiest way to use this bot on binance? Use the old as it or integrate binance in the new?
I made the whole selenium and telegram part myself in a week from scratch, then I was wandering for the binance api and I saw your code which is EXACTLY what I need.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.