Skip to content
This repository was archived by the owner on Nov 19, 2021. It is now read-only.
This repository was archived by the owner on Nov 19, 2021. It is now read-only.

ValueError: math domain error #71

@reall0c

Description

@reall0c

Hi,
when do
`from peregrinearb import create_weighted_multi_exchange_digraph, bellman_ford_multi, print_profit_opportunity_for_path_multi

graph = create_weighted_multi_exchange_digraph(['hitbtc','exmo','bitfinex','poloniex','kraken', 'bittrex', 'binance'], log=True)
graph, paths = bellman_ford_multi(graph, 'BTC', unique_paths=True)
for path in paths:
print_profit_opportunity_for_path_multi(graph, path)`

its appear 6 times
Task exception was never retrieved future: <Task finished coro=<_add_market_to_multi_digraph() done, defined at /h/z/Documents/Arbitrage program/peregrine/peregrinearb/utils/multi_exchange.py:98> exception=ValueError('math domain error')> Traceback (most recent call last): File "/home/tech/Documents/Arbitrage program/peregrine/peregrinearb/utils/multi_exchange.py", line 135, in _add_market_to_multi_digraph weight=-math.log(fee_scalar*ticker_bid)) ValueError: math domain error
and finish with this:
Starting with 100 in BTC BTC to MEME at 3990000.000000001 = 399000000.0000001 on bittrex for MEME/BTC MEME to USDT at 195.37864091391904 = 77956077724.65372 on poloniex for MEME/USDT USDT to STX at 127.95389048991358 = 9974783432203.533 on hitbtc for STX/USDT STX to BNB at 0.008031959999999998 = 80117061536.12148 on binance for STX/BNB BNB to COCOS at 100909.09090909087 = 8084539845917709.0 on binance for COCOS/BNB COCOS to BTC at 1.6413570000000026e-08 = 132696160.67875974 on hitbtc for COCOS/BTC
Could you tell me why throw error with math domain error ?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions