Is there any reference or authoritative resource, or book on Bitcoin programming?

Bitcoin is dubbed "programmable money" but there is no obvious resource for how to do that aside from trudging through subsections of hack-prone forums.

Altcoins many times are simply finding and replacing the word "bitcoin" in the code base and clients, so it seems even in that case their programmers have a thin understanding of various bitcoin programming paradigms.

I'm sure a "book" would be outdated by the time it was published, but regardless it would be helpful to have everything in one place for a potential target audience that doesn't want to reverse engineer commit history just to see whats going on.

  • My 7 year old question lol. This was asked in 2013. In 2020, the answer is "yes". I've launched several lucrative businesses using this knowledge in that decade. – CQM Oct 14 '20 at 16:38

I was asked by Hasan Hasan, a junior developer, which of the following three books I'd recommend. Personally I think all three books are fantastic (I would recommend them all) but they do approach the topic from very different angles.

Mastering Bitcoin (2nd edition, Andreas Antonopoulos) was the first technical Bitcoin book to be published. The 2nd edition was published in 2017 so there may be some outdated details but the vast majority should still be accurate today. It does have some chapters on concepts but not as comprehensively as Grokking Bitcoin (see later). It will provide instructions for configuring a Bitcoin Core build from the command line and contains a lot of Python code examples. It is especially strong at explaining Bitcoin scripting. For an example of Antonopoulos teaching Bitcoin Script see his 2017 presentation at SF Bitcoin Devs (video, transcript).

Programming Bitcoin (Jimmy Song) is also a technical Bitcoin book but covers different topics in depth than Mastering Bitcoin. Mastering Bitcoin mostly avoids cryptography but Programming Bitcoin has three detailed chapters on finite fields, elliptic curves and elliptic curve cryptography. If you like math or want to understand how public keys and signatures are generated in detail this is the book for you. There are also more Python code examples in Programming Bitcoin than Mastering Bitcoin. There are some conceptual explanations but generally I would say it assumes you understand most concepts covered in Mastering Bitcoin and Grokking Bitcoin (or that you best learn those concepts through code rather than written explanations.) For an example of Jimmy Song teaching ECDSA and transactions see this presentation at Bitcoin Edge Dev++ in 2017 (video).

Grokking Bitcoin (Kalle Rosenbaum) contains minimal code, instead it focuses on the various challenging concepts that you need to understand to get to grips with Bitcoin. For example, Kalle Rosenbaum presented how SegWit works at London Bitcoin Devs in 2020 using the content from Grokking Bitcoin (video, transcript). If you are having trouble understanding a concept I'd recommend that book as some of the diagrams, explanations and exercises are really useful. It is easy to discount this book as being the less technical of the three but if you are already a junior developer you may have more trouble with concepts than command line and code. It is a technical yet accessible book.

They are all open source so you can try before you buy. Mastering Bitcoin is here, Programming Bitcoin is here and Grokking Bitcoin is here with a special build of the book including diagrams here.

If you like them and can afford to buy them I encourage you to support the authors and publishers by purchasing them. Whether the authors publish future editions of the book or continue to produce these kind of educational resources depends on how successful the books are. In Grokking Bitcoin's case you can buy directly from the Manning publisher here but all are available from Amazon or your usual book seller.

  • Amazing answer, thank you. – luben Jan 26 at 21:46

It is in the works. Mastering Bitcoin by Andreas M. Antonopoulos



The best sources that I found for free:

  1. Mastering Bitcoin
  2. Developer Documentation

I didn't check this out Bitcoin Programming by Mostafa Farghaly but looks like a good wisdom source.


I'm writing a blog series for beginners called "Basic Blockchain Programming" that might suit your needs. It starts from scratch until building the first raw transaction:


It's still a work in progress, though (4 or 5 posts left).


As far as I know a book about bitcoin programming doesn't exists.

The best resource you will find is the bitcoin wiki that is describing the bitcoin protocols very well.

July 2014 Edit

Now there is a book called Mastering Bitcoin that is available in early release.

I believe that this book match to what you are looking.

You can buy here on Here


Bitcoin Programming Book

Bitcoin Programming Book by Mostafa Farghaly

PDF https://gumroad.com/l/Bitcoin-Programming-book

Paperback http://www.amazon.com/Bitcoin-Programming-Mostafa-Farghaly/dp/1500176826/


I would post this as a comment to another answer, but I don't have enough reputation.

I haven't read Basic Blockchain Programming, but have read at least parts of all the other books mentioned here. The one I found most useful was Bitcoin Programming by Mostafa Farghaly. Be warned that the English is poor (but totally understandable), and there are some typos in the code. That being said, it will point you in the right direction. It has some basic code examples in JavaScript, Python, PHP, and Ruby. Most of the examples are in Python. If you're new to programming, I would recommend checking out Think Python first.


Programming Bitcon by Jimmy Song

Programming Bitcoin by Jimmy Song

ISBN: 9781492031482


I find this wonderful software a very interesting style of programming bitcoin and you can consider it as a book with this title "Asynchronous C++ Bitcoin programming". The name of the software is

libbitcoin - Asynchronous C++ Bitcoin library

Mainly it used the famous boost library ASIO. It provides developers with an asynchronous I/O model using a modern C++ approach.

The libbitcoin library took advantage of the algorithmic aspect of recent C++ 11/14 (lambdas heavily used in the coding, also an understanding of the new introduced pointers, variadic functions, bind function, promise & future is a must).

Your Answer

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

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