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.
579
stars
174
forks
source link
Some issues 1.Non-tuple sequence and 2.NonType object has no attribute get_values #13
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.
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?
why do get 'NoneType' object has no attribute 'get_values'?
Would appreciate any help to get this running. Thank you
Z:\Downloads\crypto-arbitrage-framework-master\crypto\path_optimizer.py:241: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use
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'
arr[tuple(seq)]
instead ofarr[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, inProcess finished with exit code 1
I am getting the above errors when running the code.
Would appreciate any help to get this running. Thank you