Giter Site home page Giter Site logo

tpmmthomas / binance-copy-trade-bot Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 39.0 81 KB

A telegram copy trading bot that follows cryptocurrency derivatives trade on the binance leaderboard.

Home Page: https://forms.gle/98SpxWP7BgjCbxe47

Python 100.00%
binance bybit copy-trade cryptocurrency derivatives python telegram-bot trading

binance-copy-trade-bot's Introduction

  • 👋 Hi, I’m @tpmmthomas
  • 👀 I’m interested in Machine Learning, Blockchain technologies and all sorts of interesting programming projects.
  • 🌱 I’m currently a PhD student in the University of Edinburgh, studying Valuation Protocols for Collaborative AI Marketplaces over Blockchains.

binance-copy-trade-bot's People

Contributors

diiak avatar tpmmthomas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binance-copy-trade-bot's Issues

what is ip?

In the credential file, in "ip" field what i put ?

could someone help me set up this bad boy?

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!

ERROR - The number of contracts exceeds maximum limit allowed: too large (ErrCode: 130006)

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!

What should I exactly fill out in credentials

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 ?

Bybit Testnet

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.

How to easily perform copy trading for a beginner?

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

Binance API

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.

I am facing a error

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 %

Operation of the safety ratio

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

Rendering of trader position list

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.

Capture d’écran 2022-11-17 à 16 26 12

Maybe we could orient ourselves on the model of the other screenshot

Capture d’écran 2022-11-16 à 22 55 20

Thanks

Issue with the proportion parameter

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!

Percentage of user balance ?

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

Porject progress here

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!

Can you help me ?

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?

ConnectionResetError in RUN inside ct_positions

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

after 10-14h running i get this one and already tried:

  • do headers to post < FAIL
  • do a random pagination inside post method to prevent cache < FAIL (with this one it runs for 2 days before kick me out with 10054)

Anyone has this problem too and know what to do to solve it?

cannot fetch url after some minutes running

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

code problem with mongodb

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

Mis en route avec succès !

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.