It seems like the code has the following bug when I ran it:
File "C:\Users\RAZEER\Documents\Triangular-Arbitrage\triangular_arbitrage\detector.py", line 73, in get_best_opportunity
if len(cycle) > max_cycle:
^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'int' and 'NoneType'
After investigation, it seems like despite setting the max_cycle to a default value of 10 in the following function:
def get_best_opportunity(tickers: List[ShortTicker], max_cycle: int = 10) -> Tuple[List[ShortTicker], float]:
This was usurped by the following function instead, which set the max_cycle=None if nothing is set by the user.
async def run_detection(exchange_name, ignored_symbols=None, whitelisted_symbols=None, max_cycle=None):
last_prices = await get_exchange_last_prices(exchange_name, ignored_symbols or [], whitelisted_symbols)
# default is the best opportunity for all cycles
best_opportunity, best_profit = get_best_opportunity(last_prices, max_cycle=max_cycle)
return best_opportunity, best_profit
I am checking for more issues while running the benchmarks, and will submit a pull request to both the benchmarks branch and the main branch (if needed) at some point later.
It seems like the code has the following bug when I ran it:
After investigation, it seems like despite setting the max_cycle to a default value of 10 in the following function:
This was usurped by the following function instead, which set the max_cycle=None if nothing is set by the user.
I am checking for more issues while running the benchmarks, and will submit a pull request to both the benchmarks branch and the main branch (if needed) at some point later.