DZone

“Bitcoin soars past $50,000 for the first time.” — CNN

“Tesla invests $1.5 billion in bitcoin, will start accepting it as payment.” — Washington Post

Not a day goes by without some crypto news stealing the headlines these days. From institutional support of Bitcoin to central banks around the world exploring some form of digital currency, interest in cryptocurrency has never been higher. This is also reflected in the daily exchange volume:

Cryptocurrency exchange volume

As someone interested in the future of DeFi (decentralized finance), I wanted to better track the price of different cryptocurrencies and store them into a time-series database for further analysis. I found an interesting talk by Ludvig Sandman and Bruce Zulu at Kafka Summit London 2019, ‘Using Kafka Streams to Analyze Live Trading Activity for Crypto Exchanges,’ so I decided to leverage Kafka and modify it for my own use. In this tutorial, we will use Python to send real-time cryptocurrency metrics into Kafka topics, store these records in QuestDB, and perform moving average calculations on this time-series data with NumPy.

Source: DZone