I want to have the Bitcoin Network UTXOs only for a data analysis project and the purpose is visualization of the time series of 1>BTC wallets . how can I do it using python ? ( or is there any easier and convenient way to reach to such data ? )

  • 1
    If you want to also do historical data, the UTXO set will not be sufficient since it only has the current UTXOs. You would need to parse the entire blockchain and record every time when a transaction creates or spends an output greater than 1 ₿. Could you clarify whether that’s what you’re trying to do?
    – Murch
    Aug 1, 2023 at 12:47
  • I want to have a historical time series Data set of +1 BTC balance addresses ,, for example suppose that we have two columns named : Date and NumberOFAddresses ,, then for each we have for example : 8/1/2015 120 , 8/2/2016 123 , ..... 8/1/2023 10000...
    – user143828
    Aug 1, 2023 at 15:20
  • In your example is 120 the number of outputs created on/before 8/1/2015 that remain unspent today? Or is it the number of UTXOs in the UTXO set on 8/1/2015? Or something else? Aug 1, 2023 at 21:41
  • I mean for example in 8/1/2015 we had 120 addresses that had +1BTC balance in 8/1/2023 we have 10000 addresses ( for example ) that has +1BTC .. I want this Time Serie @RedGrittyBrick like this link : lookintobitcoin.com/charts/addresses-greater-than-1-btc
    – user143828
    Aug 2, 2023 at 4:57

1 Answer 1


As Murch suggested in a comment, you will have to process the entire blockchain, maintaining a UTXO set throughout and at each time interval, calculate address or equivalent for each UTXO, aggregate by address then output the block date and value for each address.

Block dates are not accurate and are not always in ascending order even if you manage to sort blocks by height and get them in chronological order, so you may have to apply some suitable averaging or heuristics.

Addresses are not defined for many types of locking scripts, so you may have to invent your own definition and method for many types.

There is no way, or no simple way, to determine if two addresses belong to the same wallet. Even if there were, you can't assume people only have one wallet each. So you need to be careful how you interpret and present results.

You may want to exclude provably unspendable outputs.

I would tackle this by using Bitcoin core to obtain the data, then write a program to fetch the data, either by API or by parsing the blk*.dat files. YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.