wardbradt / peregrine

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

Syntax error in running the first example #33

Closed sompalarya1 closed 6 years ago

sompalarya1 commented 6 years ago

File "/home/a/PycharmProjects/untitled4/xdfg.py", line 1, in from peregrinearb import get_opportunity_for_market File "/usr/local/lib/python3.5/dist-packages/peregrinearb/init.py", line 1, in from .async_find_opportunities import OpportunityFinder, get_opportunity_for_market File "/usr/local/lib/python3.5/dist-packages/peregrinearb/async_find_opportunities.py", line 54 [await self._test_bid_and_ask(exchange_name) for exchange_name in self.exchange_list] ^ SyntaxError: 'await' expressions in comprehensions are not supported

wardbradt commented 6 years ago

If you are talking about this example:

from peregrinearb import get_opportunity_for_market
import asyncio
opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD"))
print(opportunity)

I just looked at it. I did not get the error you did. However, I did run into some similar problems which I have just fixed here.

Let me know if you continue to still have this problem.