Member-only story
Binance is one of the cheapest (in terms of fees) crypto trading platforms out there and it offers an API. I love APIs because they allow me to repeat exactly the same thing without my psyche trying to trick me. And especially when you go into finance that's pretty important — it comes very handy being a technocrat. Plus: taking myself 20 years back in time I keep remembering this quote:
“Why program by hand in five days what you can spend five years of your life automating?”
from the book: “Language Translation Using PCCTS and C++: A Reference Guide”. That is very much what I love spending my spare time on (when it’s rainy outside). The objective of this article is to walk you through the setup of Binance python and eventually displaying data gathered from this API.
Environment Setup
I usually start a new project off in a new virtual python environment. Don’t ask me why — I like using virtualenvwrapper and I usually publish my code on GitHub:
mkvirtualenv binance-python
workon binance-python
mkdir ~/Documents/GitHub/binance-python-eval
cd ~/Documents/GitHub/binance-python-eval
Next, we need to get a few Python packages into the newly created environment:
pip install python-binance
pip install pandas
pip install plotly
I would be tempted to use jupyter-notebooks for this type of project. However, as…