wardbradt / peregrine

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

Error #34

Closed ssithuxz closed 6 years ago

ssithuxz commented 6 years ago
  File "C:\Users\Admin\Desktop\bittrex-getmarketsalert-master\test.py", line 6, in <module>
    for path in paths:
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\peregrinearb\bellman_multi_graph.py", line 16, in bellman_ford
    self._first_iteration()
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\peregrinearb\bellman_multi_graph.py", line 43, in _first_iteration
    [self._process_edge_bunch(edge_bunch) for edge_bunch in self.graph.edge_bunches(data=True)]
AttributeError: 'MultiDiGraph' object has no attribute 'edge_bunches'

I get the error above when running the following code. why is that?

from peregrinearb import create_weighted_multi_exchange_digraph, bellman_ford_multi, print_profit_opportunity_for_path_multi

graph = create_weighted_multi_exchange_digraph(['bittrex', 'binance', 'huobi', 'kucoin'], log=True)
graph, paths = bellman_ford_multi(graph, 'BTC')
for path in paths:
    print_profit_opportunity_for_path_multi(graph, path)
wardbradt commented 6 years ago

This is because you are using the wrong fork of networkx. You should use mine, the one listed in setup.py.