Simple Moving Average (SMA) – Python Binance API for Crypto Trading

A simple moving average (SMA) is calculated by summing over a fixed number of last prices, say k, and dividing this by the number of prices k. Depending on the selection k, you can obtain short-term or long-term SMAs. Short-term SMAs respond quickly whereas long-term SMAs respond slowly to changes in the prices. You can … Read more

Binance Trading API – Creating Your First Simple Crypto-Trading Bot

Disclaimer: The bot built here should be used only as a learning tool. If you choose to do real trading on Binance, then you have to build your own criteria and logic for trading. The author is not responsible for any losses incurred if you choose to use the code developed here on Binance. Note: … Read more

A RegEx to Match Bitcoin Addresses

What regular expressions can be used to match Bitcoin addresses? A regular expression for validating Bitcoin addresses must check that the string is 26-35 characters long, start with “1” or “3” or “bc1” consists of uppercase or lowercase alphabetic and numeric characters, and ensure it doesn’t contain ambiguous characters. Not allowed are the uppercase letter … Read more

The $31,000,000 Bitcoin Valuation Thesis

In this article, I’ll develop a simple model of how to value Bitcoin. Valuation Thesis Bitcoin will replace the SWIFT bank-to-bank settlement protocol. Valuation Methodology Bitcoin is now the largest, most decentralized, and most secure international monetary network in the world. This makes it a perfect candidate for bank-to-bank settlements of high-value transactions (whitepaper). Currently, … Read more

Bitcoin – Where Are the Women?

A recent Binance Research study shows that approximately 95% of all Bitcoin holders are men. Redistribution of Wealth to Men When reading the Bitcoin whitepaper and the transformation towards a new decentralized, digital monetary system, I realized that we’re in the middle of one of the greatest redistributions of wealth and power in the last … Read more

The Bullish Case on Blockchains

The last 100 years have been economically dominated by corporations. Corporations have brought us health, wealth, and wisdom. Corporations organized the invention and distribution of drugs that saved billions of lives. Corporations took care of automation and efficiency gains and subsequently made billions of people live lives in prosperity and wealth — an average worker … Read more

Are Energy Costs and CapEx Invested in Bitcoin Worth It?

Bitcoin capital expenditure and energy overhead are often criticized to be unsustainably high. But are they worth it in relation to the value provided by the Bitcoin network? TLDR; Capex and energy costs are estimated using the USD value of the transaction fees paid by the Bitcoin traders. The value of the Bitcoin monetary system … Read more

How to Get All Transactions for a BTC Address in Python?

Problem Formulation Given a single Bitcoin address in the form of a stream of characters such as the address of the first “Genesis” block ever created on the Bitcoin blockchain: 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX How to get all transactions for this BTC address in a Python script? Solution To get all transactions of a given Bitcoin address, import … Read more

How to Get Binance API Prices in Python at a Precise Time?

Problem Formulation Say, you want to get the current price of a cryptocurrency using Python’s inofficial binance API. How do you do this for a precise point in time? Step 1: Install Python Binance with pip If you haven’t already, install the Python Binance API using the pip package manager. Run pip install python-binance in … Read more