Closed guldam closed 6 years ago
Could you try running the following code?
from peregrinearb import get_opportunity_for_market
import asyncio
opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", exchanges=['bittrex', 'binance', 'gdax', 'cex']))
Optionally, replace exchanges with any list of exchanges you would like.
It works. Thanks
got the same error:
/usr/local/bin/python3.6 /Users/Edge-Rider/peregrine/test.py Task exception was never retrieved future: <Task finished coro=<OpportunityFinder._test_bid_and_ask() done, defined at /Users/Edge-Rider/peregrine/peregrinearb/async_find_opportunities.py:31> exception=ValueError('exchange is not a ccxt Exchange instance.',)> Traceback (most recent call last): File "/Users/Edge-Rider/peregrine/peregrinearb/async_find_opportunities.py", line 38, in _test_bid_and_ask raise ValueError("exchange is not a ccxt Exchange instance.") ValueError: exchange is not a ccxt Exchange instance. Task exception was never retrieved future: <Task finished coro=<OpportunityFinder._test_bid_and_ask() done, defined at /Users/Edge-Rider/peregrine/peregrinearb/async_find_opportunities.py:31> exception=ValueError('exchange is not a ccxt Exchange instance.',)> Traceback (most recent call last): File "/Users/Edge-Rider/peregrine/peregrinearb/async_find_opportunities.py", line 38, in _test_bid_and_ask raise ValueError("exchange is not a ccxt Exchange instance.") ValueError: exchange is not a ccxt Exchange instance. {'highest_bid': {'exchange': None, 'price': -1}, 'lowest_ask': {'exchange': None, 'price': 9999999}}
Process finished with exit code 0
same error with suggested code :
from peregrinearb import get_opportunity_for_market import asyncio opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", exchanges=['bittrex', 'binance', 'gdax', 'cex']))
Python 3.6.5 (default, Apr 25 2018, 14:23:58) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.
I got the above error. What can I do?