It hasn't been long since I studied Blockchain.

I only need header data, not all block data, for study purposes.

As far as I know, the SPV node stores only the block's header information.

Can i get all block header data in python?

  • You can run a node (bitcoincore.org) and use the getblockheader RPC command.
    – darosior
    Jun 19 '20 at 10:47
  • Can't I download it with python code? Jun 19 '20 at 10:52
  • You can use a wrapper against it RPC API, such as github.com/petertodd/python-bitcoinlib. Note that you'll have to wait for bitcoind to sync (can take anywhere from some hours to a week depending on your hardware).
    – darosior
    Jun 19 '20 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.