hzjken / crypto-arbitrage-framework

A cryptocurrency arbitrage framework implemented with ccxt and cplex. It can be used to monitor multiple exchanges, find a multi-lateral arbitrage path which maximizes rate of return, calculate the optimal trading amount for each pair in the path given flexible constraints, and execute trades with multi-threading implemenation.
548 stars 172 forks source link

Problem occurs when i start the bot #27

Open mrdjehknhc opened 1 year ago

mrdjehknhc commented 1 year ago

python3 main.py /home/elliot/Downloads/arbitrage/path_optimizer.py:284: RuntimeWarning: divide by zero encountered in log final_transit_matrix = np.log(self.transit_price_matrix (1 - self.commission_matrix) ( profit rate: 0.0, arbitrage path: [] profit rate: 0.0, arbitrage path: [] profit rate: 0.0, arbitrage path: [] profit rate: 0.0, arbitrage path: [] profit rate: 0.0018326130900521154, arbitrage path: [('kucoin_XRP', 'kucoin_TUSD'), ('kucoin_TUSD', 'kucoin_USDT'), ('kucoin_USDT', 'kucoin_LTC'), ('kucoin_LTC', 'kucoin_USDC'), ('kucoin_USDC', 'kucoin_XRP')] Traceback (most recent call last): File "/home/elliot/Downloads/arbitrage/main.py", line 43, in amt_optimizer.get_solution() File "/home/elliot/Downloads/arbitrage/amount_optimizer.py", line 52, in get_solution self._update_model() File "/home/elliot/Downloads/arbitrage/amount_optimizer.py", line 70, in _update_model self._set_constraints() File "/home/elliot/Downloads/arbitrage/amount_optimizer.py", line 105, in _set_constraints withdraw_fee = self.PathOptimizer.withdrawal_fee[trade[0]]['coin_fee'] KeyError: 'kucoin_XRP'

mrdjehknhc commented 1 year ago

I do not think that they will help me there, I am sure that the error is in the program code

mrdjehknhc commented 1 year ago

How that they can help im in this case ?

mrdjehknhc commented 1 year ago

I don't feel bad about them, really, I just think they can't help in my case because that's not exactly what they do

mrdjehknhc commented 1 year ago

any idea how to fix my problem?

mrdjehknhc commented 1 year ago

ok bro i will try this

mrdjehknhc commented 1 year ago

i messaged ltc support and they can't help me

AlwxDavydov commented 1 year ago

Hello bro, does you fixed it?

SBijpost commented 1 year ago

In path_optimizer.py, change new_name = '{}_{}'.format(exchange, currency)

to new_name = '{}_{}'.format(exchange, currency.split()[0]) in update_withdrawal_fee()

because there are spaces after the currency name

xenon1001 commented 4 months ago

In path_optimizer.py, change new_name = '{}_{}'.format(exchange, currency)

to new_name = '{}_{}'.format(exchange, currency.split()[0]) in update_withdrawal_fee()

because there are spaces after the currency name

Thanks man, I've been working on it for hours. Does the code actually perform its intended function? Is it profitable?