guldo111 / triangular-arbitrage-bot-multi-exchange

Triangular Arbitrage Bot automates profitable cryptocurrency trading by scanning for price discrepancies across exchanges and executing trades to exploit arbitrage opportunities on popular cryptocurrency exchanges such as Binance, Kucoin, OKEx, and Huobi.
MIT License
10 stars 7 forks source link

Error while running bot #2

Open block98ct opened 4 months ago

block98ct commented 4 months ago

How many USDT do you want to trade? | Only numbers are accepted (in the form 1, 10, 20.1) USDT amount: 2

Finding arbitrage opportunities... An error occurred: No columns to parse from file Traceback (most recent call last): File "/home/palash/BOT_PY/bot_dex.py", line 464, in main await asyncio.gather( File "/home/palash/BOT_PY/bot_dex.py", line 205, in find_triangular_arbitrage_opportunities df = pd.read_csv(csv_file) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1024, in read_csv return _read(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 618, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1618, in init self._engine = self._make_engine(f, self.engine) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1896, in _make_engine return mapping[engine](f, self.options) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in init self._reader = parsers.TextReader(src, **kwds) File "parsers.pyx", line 581, in pandas._libs.parsers.TextReader.cinit

pandas.errors.EmptyDataError: No columns to parse from file An error occurred: No columns to parse from file Traceback (most recent call last): File "/home/palash/BOT_PY/bot_dex.py", line 464, in main await asyncio.gather( File "/home/palash/BOT_PY/bot_dex.py", line 205, in find_triangular_arbitrage_opportunities df = pd.read_csv(csv_file) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1024, in read_csv return _read(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 618, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1618, in init self._engine = self._make_engine(f, self.engine) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1896, in _make_engine return mapping[engine](f, self.options) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in init self._reader = parsers.TextReader(src, **kwds) File "parsers.pyx", line 581, in pandas._libs.parsers.TextReader.cinit

TestGithub2024m commented 3 months ago

How many USDT do you want to trade? | Only numbers are accepted (in the form 1, 10, 20.1) USDT amount: 2

Finding arbitrage opportunities... An error occurred: No columns to parse from file Traceback (most recent call last): File "/home/palash/BOT_PY/bot_dex.py", line 464, in main await asyncio.gather( File "/home/palash/BOT_PY/bot_dex.py", line 205, in find_triangular_arbitrage_opportunities df = pd.read_csv(csv_file) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1024, in read_csv return _read(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 618, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1618, in init self._engine = self._make_engine(f, self.engine) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1896, in _make_engine return mapping[engine](f, self.options) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in init self._reader = parsers.TextReader(src, kwds) File "parsers.pyx", line 581, in pandas._libs.parsers.TextReader.cinit**

pandas.errors.EmptyDataError: No columns to parse from file An error occurred: No columns to parse from file Traceback (most recent call last): File "/home/palash/BOT_PY/bot_dex.py", line 464, in main await asyncio.gather( File "/home/palash/BOT_PY/bot_dex.py", line 205, in find_triangular_arbitrage_opportunities df = pd.read_csv(csv_file) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1024, in read_csv return _read(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 618, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1618, in init self._engine = self._make_engine(f, self.engine) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1896, in _make_engine return mapping[engine](f, self.options) File "/home/palash/.local/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in init self._reader = parsers.TextReader(src, kwds) File "parsers.pyx", line 581, in pandas._libs.parsers.TextReader.cinit**

edit the main script and this function find_triangular_arbitrage_opportunities with this code below:

async def find_triangular_arbitrage_opportunities(exchange, markets, tickers, exchange_name, fee, initial_amount): logging.info('Finding arbitrage opportunities.')

csv_file = 'tri_arb_opportunities.csv'

try: if os.path.exists(csv_file) and os.path.getsize(csv_file) > 0: df = pd.read_csv(csv_file) tri_arb_opportunities = df.to_dict('records') else: tri_arb_opportunities = [] except pd.errors.EmptyDataError: logging.warning('CSV file is empty. No arbitrage opportunities.') tri_arb_opportunities = [] last_trade_time = {}