Finding the purchase values of all currently held bitcoin Since the full Bitcoin transaction history is public, is it possible to calculate the values that all currently held Bitcoins were acquired at (in USD). For example, if a Bitcoin has been held since Jan 11, 2011, then it was acquired when the exchange rate was $0.32. But if a bitcoin was acquired today, then its acquisition price was ~$7000 (today is a bad example because it was so volatile).

If so, I was wondering if anyone could point me in the right direction? I know I would need to parse the full transaction log, but I'm not sure:

1) Are there timestamps on the individual transactions? If not, what is the best way to infer the transaction date? Just using the block number?

2) Is it easy to identify transactions for the various exchanges (Coinbase, etc)? How would I do this?

3) I am assuming I can find the historical exchange rates somewhere, but if anyone can point me to this, it would also be helpful!

Any other advice? Thanks! I am new to Bitcoin, but very interested in learning more.
You cannot do this for a number of reasons.


Bitcoin is mined - There are many bitcoin around that have never passed through an exchange (all of Satoshi's, for instance). Since they've never been traded, you can't find any trade data for them
Exchanges operate offchain - You cannot link an onchain transaction to an offchain trade and its price easily. Many people only withdraw when moving between exchanges, or to cold storage. This could mean that they traded BTC months/years ago, but an onchain transaction only appeared yesterday
Onchain transactions don't have to be from exchanges - Transactions could simply be moving money between the user's own wallets, or exchanging for other goods/coins. Once again, you can't look at a transaction and know what it's for.


Exchange wallets are usually identifiable for most major exchanges. However, it's going to be nearly impossible to link individual transactions on the chain to individual trades without extensive raw data from the exchanges itself. Even after that, you will be missing data on OTC and other non-exchange trades.