wardbradt / peregrine

Detects arbitrage opportunities across 131 cryptocurrency exchanges in 50 countries
MIT License
1.18k stars 339 forks source link

Duplicate outputs for multi exchange #53

Closed parthi2929 closed 4 years ago

parthi2929 commented 5 years ago

Hi

For below combination of exchanges, I am getting CBT/ETH pair, same message printed over multiple times (screen shot below shows only part of it due to space)

Code:

from peregrinearb import create_weighted_multi_exchange_digraph, bellman_ford_multi, print_profit_opportunity_for_path_multi

graph = create_weighted_multi_exchange_digraph(['bitfinex', 'huobiru', 'okex'], log=True, fees=True)
graph, paths = bellman_ford_multi(graph, 'ETH')
for path in paths:
    print_profit_opportunity_for_path_multi(graph, path)

Output:
image

wardbradt commented 4 years ago

I am now fixing several of the issues with the project as I have some free time this week. I will look into this one.

wardbradt commented 4 years ago

unique_paths defaulted to False, which caused this behavior. Fixed on the dev branch in https://github.com/wardbradt/peregrine/pull/61.