Open carlaKC opened 4 years ago
It would also be great to create a Proxy option, like --server.proxy
in loopd, to tunnel all price requests over Tor. This has obvious privacy benefits.
@zkSNACKs offer a Tor v3 HS under which you can request prices at http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion/api/v3/btc/Offchain/exchange-rates
.
I was having a go at adding the --server.proxy
option that @nixbitcoin suggested. However, it seems to me that CoinCap does not allow requests over Tor. When I curl the API directly I get json back but when I curl the API through the Tor proxy then I get a webpage back that requires a captcha to be completed. The same does not go for other APIs such as coindesk which makes me think that CoinCap is not allowing Tor requests (i am a Tor noob though so there may be a way to get around this that I am unaware of).
As is, the fiat package only uses CoinCap's API for price information. The package is designed to allow different price sources without affecting our price calculation logic.
Steps to completion
fiat/GetPrices
to allow users to choose a backend