This post shows how you can leverage two powerful python libraries, Beavers and Perspective, to analyse data in realtime and display it in a dashboard.
We will connect to Coinbase's websocket API to receive crypto market updates in real time.
In order to share this data with other services and decouple producers from consumer, we'll publish this data over Kafka, as json.
We'll then write a Beavers that will read the data from Kafka, enrich it, and publish it in a perspective dashboard.
You'll need:
The code for this tutorial is available on github
git clone https://github.com/0x26res/beavers-examples cd beavers-example/coinbase_analytics/
python3 -m venv --clear .venv source ./.venv/bin/activate pip install -r requirements.txt
We use the kafka-kraft docker image to run a super simple kafka cluster.
The above is the detailed content of Build a real-time crypto analytics dashboard with Beavers and Perspective. For more information, please follow other related articles on the PHP Chinese website!