Real-time Bitcoin Notification with Faust
In this story, a simple real-time application that has built with Python and Faust. This application is very useful for bitcoin miners; if bitcoin price is lower than certain amount of US dollar it will make sound then if it came up, it will make different sound.
This repo could be found here.
Data Model
I am going to use postgresql for database. Asyncpg and Tortoise is also employed to be ORM for my application. The model is this:
The Tortoise is very good tool to create the tables in database; the by asyncpg I am querying into database, because it is the fastest.
Faust App
In our faust application, a very simple feature of faust is going to be used, TIMER.
The bitcoin price will be captured by this script and data will be gathered from
This app every 10 seconds will make a request and gathered current bitcoin price.
Build and Run
docker-compose up --build