m2049r / xmrwallet

monerujo: An Android Monero Wallet
https://www.monerujo.io/
Apache License 2.0
619 stars 274 forks source link

Feature: Configure exchange price source #122

Open jenniferberger opened 7 years ago

jenniferberger commented 7 years ago

As user i want to use a different exchange to reliably have a recent conversion price.

Add a setting dialog that allows to select the conversion exchange. Add implementation for different exchanges.

The idea is not to make this app a ticker-app with as many exchanges as possible, but a alternative for one service is down would be nice.

layout/AsyncExchangeRate.java uses the kraken API hardcoded with the 'c' field. c = last trade closed array Kraken does not work well through Tor as they use a cloudflare configuration.

Other exchanges are: https://poloniex.com/support/api/

https://api.bitfinex.com/v1/ticker/xmrusd (also cloudscare protected, no eur)

from cryptocompare (works through Tor): https://www.cryptocompare.com/api/#-api-data-price- https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=USD,EUR

m2049r commented 7 years ago

what if we simply replace kraken with one of the other options you list? probably cryptocompare? maybe even the source xmr.to uses - whatever that is.

jenniferberger commented 7 years ago

Settings, selectbox This would put the url/exchangename into a res file and needs the httpGET/JSON parse code to be abstracted. I only stumbled over this because i read the code and found a hardcoded url...

m2049r commented 7 years ago

since the parsecode is service-specific & thus hardcoded, the url is also hardcoded. yes, we could implement multiple exchanges . and select them somewhere. until now we have managed to not have a settings screen ... will think about it.

jonathancross commented 6 years ago

My 2 cents: Although multiple exchange rates for fiat would be nice, I don't see how Poloniex would help much as it is crypto only. Given that Bitfinex is USD only, it seems inferior to Kraken. Cryptocompare looks good. :-)