maxme / bitcoin-arbitrage

Bitcoin arbitrage - opportunity detector
MIT License
2.47k stars 857 forks source link

KrakenEUR prices are incorrect (by 1500+ EUR) #68

Open jpretori opened 4 years ago

jpretori commented 4 years ago

When I run $ python -m arbitrage -d

I wait a few minutes, then it outputs, among other prices:

2020-10-14 19:40:23,848 [VERBOSE] ticker: KrakenEUR - {'ask': {'price': 11367.5375, 'amount': 0.098}, 'bid': {'price': 11364.9525, 'amount': 0.112}} 2020-10-14 19:40:23,849 [VERBOSE] ticker: KrakenUSD - {'ask': {'price': 11355.6, 'amount': 3.942}, 'bid': {'price': 11355.5, 'amount': 0.537}}

The ticker price of KrakenUSD is quite close to the actual value just now, which I can see on trade.kraken.com is about 11350. The ticker price of KrakenEUR however, is FAR away from what trade.kraken.com is reporting, which is closer to 9669... which seems to me to mean that bitcoin-arbitrage is misreporting the price.

Screenshot from 2020-10-14 19-47-51

jpretori commented 4 years ago

I intend to fix this myself and submit a pull request

jpretori commented 4 years ago

Turns out the fix is real simple - just make it clear that bitcoin-arbitrage converts all prices to USD before displaying them on the CLI. In fact, it seems it does this before doing pretty much anything at all.

In market.py: def ask_update_depth(self): try: self.update_depth() self.convert_to_usd() self.depth_updated = time.time()