Book Image

Hands-On Bitcoin Programming with Python

By : BignumWorks Software LLP
Book Image

Hands-On Bitcoin Programming with Python

By: BignumWorks Software LLP

Overview of this book

Bitcoin is a cryptocurrency that’s changing the face of online payments. Hands-On Bitcoin Programming with Python teaches you to build software applications for mining and creating Bitcoins using Python. This book starts with the basics of both Bitcoin and blockchain and gives you an overview of these inherent concepts by showing you how to build Bitcoin-driven applications with Python. Packed with clear instructions and practical examples, you will learn to understand simple Python coding examples that work with this cryptocurrency. By the end of the book, you’ll be able to mine Bitcoins, accept Bitcoin payments on the app, and work with the basics of blockchain technology to create simply distributed ledgers.
Table of Contents (6 chapters)

Building a bitcoin trading bot

In this section, we will learn about the following topics:

  • How to get the current bid and asking price for bitcoin
  • How to make a decision whether to buy or sell bitcoin
  • Triggering the bitcoin trade advice alert
Actual buying and selling of bitcoin won't be covered, as it involves actual money. However, we will focus on sending an email alert when it is trying to buy or sell bitcoin based on the condition we set.

We will use the bitcoin price API module to fetch the bitcoin price. It is available on GitHub at https://github.com/dursk/bitcoin-price-api.