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.
572 stars 174 forks source link

Some issues 1.Non-tuple sequence and 2.NonType object has no attribute get_values #13

Open Freiburg-AI-Research opened 3 years ago

Freiburg-AI-Research commented 3 years ago

Z:\Downloads\crypto-arbitrage-framework-master\crypto\path_optimizer.py:241: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. self.commission_matrix[np.meshgrid(indexes, indexes, indexing='ij', sparse=True)] = self.trading_fee[ Z:\Downloads\crypto-arbitrage-framework-master\crypto\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.23583462992170445, arbitrage path: [('kucoin_BTC', 'kucoin_XRP'), ('kucoin_XRP', 'binance_XRP'), ('binance_XRP', 'binance_USDT'), ('binance_USDT', 'binance_AION'), ('binance_AION', 'kucoin_AION'), ('kucoin_AION', 'kucoin_BTC')] Traceback (most recent call last): File "Z:/Downloads/crypto-arbitrage-framework-master/crypto/main.py", line 36, in amt_optimizer.get_solution() File "Z:\Downloads\crypto-arbitrage-framework-master\crypto\amount_optimizer.py", line 53, in get_solution self._get_solution() File "Z:\Downloads\crypto-arbitrage-framework-master\crypto\amount_optimizer.py", line 159, in _get_solution xs = np.array(ms.get_values(self.int_var)).reshape(self.path_n, self.orderbook_n) AttributeError: 'NoneType' object has no attribute 'get_values'

Process finished with exit code 1


I am getting the above errors when running the code.

  1. Can someone help my getting this running? This tuple FutureWarning at the beginning seem to not affect the result. How can i avoid this error in the code?
  2. why do get 'NoneType' object has no attribute 'get_values'?

Would appreciate any help to get this running. Thank you

charan-vendra commented 3 years ago

Me and others facing same issue, really need help.

hesller commented 3 years ago

I am getting this issue as well