chrislennon/Crypto-Touchbar-App

Crypto Touch Bar Wrong price/ Not Updating

Cryptotrader10 opened this issue · 4 comments

2/26/2019 Price on the touch bar isn't the correct price Not updating.

Thank You

@Cryptotrader10 thanks for raising the issue. I will investigate soon. Some question below which may help me pinpoint the issue.

To be clear:

  • is the price failing to update? is this fixed by restarting BetterTouchTool?
  • is the price just plain incorrect, but updates?
  • Which version of BetterTouchTool are you using (mainly if stable or alpha)

The price for BNB is off, current price is $15.27 but it shows $20. It does update just wrong data. Im using Alpha. Thank You

@Cryptotrader10 I see! I believe this issue occurs in the way that the currency API works for this tool. Under the hood I implement the API from cryptocompare - since not all coins are listed on every exchange, they implement an average or preference for all the prices they see.

In the example of BNB you can see the exchanges (and their price) for each - at the time of writing $18.65, $18.60 & $15.09.
https://www.cryptocompare.com/coins/bnb/markets/USD

I hope this explains why you may see a variance in price.

I currently don't support a selection of exchange as would add quite a bit of complexity to the tool however if you are feeling adventurous I can suggest a fix for supplying a specific exchange.

  • Pick a desired exchange from the list
  • Open the code view of the widget within better touch tool
  • Go to the line that says url = "https://min-api.cryptocompare.com/data/pricemultifull?fsyms={}&tsyms={}".format(coin_ticker, fiat_ticker)
  • Add &e=EXHANGENAME to the end of the URL
    • For example url = "https://min-api.cryptocompare.com/data/pricemultifull?fsyms={}&tsyms={}&e=exrates".format(coin_ticker, fiat_ticker)
  • Save the widget

Let me know if that helps & if the issue can be closed

Yes it worked, Thank You so much.