<p>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.</p>
<p><strong>Mastering Bitcoin</strong> (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 (<a href="https://www.youtube.com/watch?v=yU3Sr07Qnxg" rel="noreferrer">video</a>, <a href="https://diyhpl.us/wiki/transcripts/sf-bitcoin-meetup/2017-04-03-andreas-antonopoulos-bitcoin-scripting/" rel="noreferrer">transcript</a>).</p>
<p><strong>Programming Bitcoin</strong> (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 (<a href="https://www.youtube.com/watch?v=e6voIwB-An4" rel="noreferrer">video</a>).</p>
<p><strong>Grokking Bitcoin</strong> (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 (<a href="https://www.youtube.com/watch?v=6tHnYyaw0qw" rel="noreferrer">video</a>, <a href="https://diyhpl.us/wiki/transcripts/london-bitcoin-devs/2020-04-29-kalle-rosenbaum-grokking-bitcoin/" rel="noreferrer">transcript</a>). 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.</p>
<p>They are all open source so you can try before you buy. Mastering Bitcoin is <a href="https://github.com/bitcoinbook/bitcoinbook" rel="noreferrer">here</a>, Programming Bitcoin is <a href="https://github.com/jimmysong/programmingbitcoin" rel="noreferrer">here</a> and Grokking Bitcoin is <a href="https://github.com/kallerosenbaum/grokkingbitcoin" rel="noreferrer">here</a> with a special build of the book including diagrams <a href="http://rosenbaum.se/book/" rel="noreferrer">here</a>.</p>
<p>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 <a href="https://www.manning.com/books/grokking-bitcoin" rel="noreferrer">here</a> but all are available from Amazon or your usual book seller.</p>

CC BY-SA 4.0
2021-06-23T21:50:59.663Z
// , michaelfolkson++ on the Mastering Bitcoin. Re-reading it and getting my mind re-blown.
Nathan Basanese
CC BY-SA 4.0
2020-10-14T11:09:35.427Z
2020-10-14T17:54:55.083Z
2020-10-14T17:54:55.083Z
Michael Folkson
<p>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:</p>

<p><a href="http://davidederosa.com/basic-blockchain-programming/" rel="nofollow">http://davidederosa.com/basic-blockchain-programming/</a></p>

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

CC BY-SA 3.0
2015-05-19T12:44:33.700Z
2015-05-25T11:27:03.343Z
2015-05-25T11:27:03.343Z
keeshux
<p>It is in the works. <em>Mastering Bitcoin</em> by Andreas M. Antonopoulos</p>

<p><a href="http://bitcoinbook.info/">http://bitcoinbook.info/</a></p>

CC BY-SA 3.0
2014-12-16T09:08:39.300Z
Here you have http://chimera.labs.oreilly.com/books/1234000001802/index.html
Whole book online
Sebastian Xawery Wiśniowiecki
CC BY-SA 3.0
2014-10-26T12:29:20.807Z
How can I read it right now? On the website I cannot buy nor ebook neither paper version yet. I found https://github.com/aantonop/bitcoinbook but I cannot compile the asciidoc properly. Please help me with this question if you can: http://ebooks.stackexchange.com/questions/2535/how-to-render-asciidoc-with-latexmath-macros
Aleksei Petrenko
CC BY-SA 3.0
2014-03-12T15:15:00.570Z
2014-03-12T15:15:00.570Z
RentFree
<p>The best sources that I found for free:</p>

<ol>
<li><a href="http://chimera.labs.oreilly.com/books/1234000001802/index.html" rel="nofollow">Mastering Bitcoin</a></li>
<li><a href="https://bitcoin.org/en/developer-documentation" rel="nofollow">Developer Documentation</a></li>
</ol>

<p>I didn't check this out <a href="http://rads.stackoverflow.com/amzn/click/1500176826" rel="nofollow">Bitcoin Programming by Mostafa Farghaly</a>
but looks like a good wisdom source.</p>

CC BY-SA 3.0
2014-12-15T21:20:24.777Z
2014-12-15T22:35:43.660Z
2014-12-15T22:35:43.660Z
Sebastian Xawery Wiśniowiecki
<p>Bitcoin Programming Book</p>

<p><img src="https://i.sstatic.net/n1vMK.jpg" alt="Bitcoin Programming Book by Mostafa Farghaly"></p>

<p>PDF <a href="https://gumroad.com/l/Bitcoin-Programming-book" rel="nofollow noreferrer">https://gumroad.com/l/Bitcoin-Programming-book</a></p>

<p>Paperback <a href="http://rads.stackoverflow.com/amzn/click/1500176826" rel="nofollow noreferrer">http://www.amazon.com/Bitcoin-Programming-Mostafa-Farghaly/dp/1500176826/</a></p>

CC BY-SA 3.0
2014-06-12T21:33:05.320Z
2014-08-22T21:33:33.227Z
2014-08-22T21:33:33.227Z
Farghaly
<p>As far as I know a book about bitcoin programming doesn't exists.</p>

<p>The best resource you will find is the <a href="https://en.bitcoin.it/wiki/Main_Page" rel="nofollow">bitcoin wiki</a> that is describing the bitcoin protocols very well.</p>

<blockquote>
  <p><strong>July 2014 Edit</strong></p>
  
  <p>Now there is a book called <a href="http://shop.oreilly.com/product/0636920032281.do" rel="nofollow">Mastering
  Bitcoin</a> that is
  available in early release.</p>
  
  <p>I believe that this book match to what you are looking.</p>
  
  <p>You can buy here on
  <a href="http://shop.oreilly.com/product/0636920032281.do" rel="nofollow">Here</a></p>
</blockquote>

CC BY-SA 3.0
2013-12-11T14:09:12.487Z
2014-07-25T13:05:33.773Z
2014-07-25T13:05:33.773Z
Jan Moritz
<p><a href="https://www.oreilly.com/library/view/programming-bitcoin/9781492031482/" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cHhbU.jpg" alt="Programming Bitcon by Jimmy Song"></a></p>

<p><strong>Programming Bitcoin</strong> by Jimmy Song</p>

<p><strong>ISBN</strong>: 9781492031482</p>

CC BY-SA 4.0
2019-04-15T19:21:22.060Z
2019-04-15T19:21:22.060Z
Matthew Steven Monkan
<p>I would post this as a comment to another answer, but I don't have enough reputation.</p>

<p>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 <a href="http://www.greenteapress.com/thinkpython/" rel="nofollow">Think Python</a> first.</p>

CC BY-SA 3.0
2015-05-25T17:31:31.947Z
2015-05-25T17:31:31.947Z
JNCF
<p>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</p>

<p>libbitcoin - Asynchronous C++ Bitcoin library</p>

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

<p>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 &amp; future is a must). </p>

CC BY-SA 3.0
2014-12-16T05:45:34.983Z
2014-12-16T06:04:15.033Z
2014-12-16T06:04:15.033Z
efaysal
<p>Is there any reference or authoritative resource, or book on Bitcoin programming?</p>
<p>Bitcoin is dubbed &quot;programmable money&quot; but there is no obvious resource for how to do that aside from trudging through subsections of hack-prone forums.</p>
<p>Altcoins many times are simply finding and replacing the word &quot;bitcoin&quot; in the code base and clients, so it seems even in that case their programmers have a thin understanding of various bitcoin programming paradigms.</p>
<p>I'm sure a &quot;book&quot; 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.</p>

CC BY-SA 4.0
2020-10-14T16:38:49.037Z
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
<development><bitcoin-core-development><wallet-development><bitcoin-literature>
Is there a reference, authoritative resource or book on Bitcoin programming?
CQM
# Is there a reference, authoritative resource or book on Bitcoin programming?

(Asked by: username_0 on 2013-12-10)

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.

**Tags:** development, bitcoin-core-development, wallet-development, bitcoin-literature

> **Comments:**
> **username_0**: 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.  

---

## 9 answers

### Answer by username_1 on 2020-10-14. Score: 10

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](https://www.youtube.com/watch?v=yU3Sr07Qnxg), [transcript](https://diyhpl.us/wiki/transcripts/sf-bitcoin-meetup/2017-04-03-andreas-antonopoulos-bitcoin-scripting/)).

**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](https://www.youtube.com/watch?v=e6voIwB-An4)).

**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](https://www.youtube.com/watch?v=6tHnYyaw0qw), [transcript](https://diyhpl.us/wiki/transcripts/london-bitcoin-devs/2020-04-29-kalle-rosenbaum-grokking-bitcoin/)). 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](https://github.com/bitcoinbook/bitcoinbook), Programming Bitcoin is [here](https://github.com/jimmysong/programmingbitcoin) and Grokking Bitcoin is [here](https://github.com/kallerosenbaum/grokkingbitcoin) with a special build of the book including diagrams [here](http://rosenbaum.se/book/).

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](https://www.manning.com/books/grokking-bitcoin) but all are available from Amazon or your usual book seller.

> **Comments:**
> **username_2**: // , username_1++ on the Mastering Bitcoin. Re-reading it and getting my mind re-blown.  

---

### Answer by username_3 on 2015-05-19. Score: 5

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:

<http://davidederosa.com/basic-blockchain-programming/>

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


---

### Answer by username_4 on 2014-03-12. Score: 5

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

<http://bitcoinbook.info/>

> **Comments:**
> **username_6**: How can I read it right now? On the website I cannot buy nor ebook neither paper version yet. I found https://github.com/aantonop/bitcoinbook but I cannot compile the asciidoc properly. Please help me with this question if you can: http://ebooks.stackexchange.com/questions/2535/how-to-render-asciidoc-with-latexmath-macros  
> **username_5**: Here you have http://chimera.labs.oreilly.com/books/1234000001802/index.html Whole book online  

---

### Answer by username_5 on 2014-12-15. Score: 4

The best sources that I found for free:

1. [Mastering Bitcoin](http://chimera.labs.oreilly.com/books/1234000001802/index.html)
2. [Developer Documentation](https://bitcoin.org/en/developer-documentation)

I didn't check this out [Bitcoin Programming by Mostafa username_7](http://rads.stackoverflow.com/amzn/click/1500176826)
but looks like a good wisdom source.


---

### Answer by username_7 on 2014-06-12. Score: 3

Bitcoin Programming Book

![Bitcoin Programming Book by Mostafa username_7](https://i.sstatic.net/n1vMK.jpg)

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

Paperback [http://www.amazon.com/Bitcoin-Programming-Mostafa-username_7/dp/1500176826/](http://rads.stackoverflow.com/amzn/click/1500176826)


---

### Answer by username_8 on 2013-12-11. Score: 3

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

The best resource you will find is the [bitcoin wiki](https://en.bitcoin.it/wiki/Main_Page) that is describing the bitcoin protocols very well.

> **July 2014 Edit**
>
> Now there is a book called [Mastering
> Bitcoin](http://shop.oreilly.com/product/0636920032281.do) that is
> available in early release.
>
> I believe that this book match to what you are looking.
>
> You can buy here on
> [Here](http://shop.oreilly.com/product/0636920032281.do)


---

### Answer by username_9 on 2019-04-15. Score: 2

[![Programming Bitcon by Jimmy Song](https://i.sstatic.net/cHhbU.jpg)](https://www.oreilly.com/library/view/programming-bitcoin/9781492031482/)

**Programming Bitcoin** by Jimmy Song

**ISBN**: 9781492031482


---

### Answer by username_10 on 2015-05-25. Score: 2

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 username_7. 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](http://www.greenteapress.com/thinkpython/) first.


---

### Answer by username_11 on 2014-12-16. Score: 1

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).


---

