654 / 691BK38

Programming Bitcoin

Jimmy Song’s hands-on book for learning Bitcoin internals by building a Python library.

Programming Bitcoin, published by O’Reilly in 2019, teaches finite fields, elliptic-curve signatures, transaction parsing, Script, blocks and peer-to-peer messages through executable Python 3 exercises.

The book is a technical course, not a price or investment guide. It begins with the mathematical primitives used by secp256k1 and moves toward complete transactions, blocks and network communication.

Readers implement and test components rather than only reading descriptions. The public companion repository contains chapter code, exercises and answers, which makes claims reproducible and exposes mistakes to inspection.

The publisher’s table of contents and the author’s repository establish the scope. Exercises cover key serialization, addresses, transaction validation, Script evaluation, proof of work, Merkle trees and network messages.

Educational code is not automatically production-safe wallet software. The book reflects the protocol and common practices at publication time; later policy, Taproot and library changes require current specifications and Bitcoin Core documentation.

It is most useful when code is run, tests are changed and results are compared with real transactions. Pair it with the whitepaper, BIPs and Bitcoin Core source instead of treating one author as protocol authority.

For the clearest picture, read this entry together with Transaction, Full Node, Bitcoin Script, Block. The reverse links also lead from Jimmy Song.

DOC · 001O’Reilly — Programming BitcoinPublisherDOC · 002Free legal edition — Programming BitcoinFree legal editionDOC · 003Bookshop search — Programming BitcoinBookshop
Reviewed 1 August 2026Source-first · No investment advice