spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.35k stars 3.06k forks source link

Add Blockchain.info historical exchange rates #5267

Open JeremyRand opened 5 years ago

JeremyRand commented 5 years ago

Blockchain.info provides historical exchange rates, e.g. https://blockchain.info/charts/market-price?timespan=all&daysAverageString=1&format=csv . It would be nice if Electrum supported Blockchain.info as a historical exchange rate provider. (h/t to https://github.com/robertwb/bitcoin-taxes )

ecdsa commented 5 years ago

please write a pull request for that

JeremyRand commented 5 years ago

please write a pull request for that

I intend to, if no one beats me to it. :) (Things are super busy here, and this isn't the highest priority for me, but I'll do it at some point.)

SomberNight commented 5 years ago

Note that there is only one data point per 3 days, as opposed to a daily price as with other providers. Is this fine for e.g. tax purposes? What does one supposed to do for intermediate days? Use previous data point? Use closest data point? Linearly interpolate?

EDIT: I guess that repo is using the previous (latest that is still older) https://github.com/robertwb/bitcoin-taxes/blob/9788edad8b11672ab607be9424ae85af8a6145bd/bitcoin_gains.py#L883-L888