Coder Social home page Coder Social logo

cryptotracker's Introduction

 ██████╗██████╗ ██╗   ██╗██████╗ ████████╗ ██████╗ ████████╗██████╗  █████╗  ██████╗██╗  ██╗███████╗██████╗ 
██╔════╝██╔══██╗╚██╗ ██╔╝██╔══██╗╚══██╔══╝██╔═══██╗╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗
██║     ██████╔╝ ╚████╔╝ ██████╔╝   ██║   ██║   ██║   ██║   ██████╔╝███████║██║     █████╔╝ █████╗  ██████╔╝
██║     ██╔══██╗  ╚██╔╝  ██╔═══╝    ██║   ██║   ██║   ██║   ██╔══██╗██╔══██║██║     ██╔═██╗ ██╔══╝  ██╔══██╗
╚██████╗██║  ██║   ██║   ██║        ██║   ╚██████╔╝   ██║   ██║  ██║██║  ██║╚██████╗██║  ██╗███████╗██║  ██║
 ╚═════╝╚═╝  ╚═╝   ╚═╝   ╚═╝        ╚═╝    ╚═════╝    ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝
------------------------------------------------------------------------------------------------------------
  

What is This? 🤔

This is a CryptoTracker designed to monitor cryptocurrency prices from various exchanges in real-time. By integrating multiple technologies, the tracker fetches the prices via an API, stores this data in a specialized time-series database, and subsequently performs calculations. The primary goal of these calculations is to identify the best arbitrage opportunities between exchanges. This provides users with the capability to systematically pinpoint trading potentials in the world of cryptocurrencies. For a live demonstration and to access the fully functional platform, visit this link.

Quick Start 🚀

This Docker Compose configuration quickly sets up the entire CryptoTracker infrastructure for you. The setup integrates various services including data storage services like InfluxDB, Redis, and RabbitMQ, multiple application services such as the API service, refresher service, and storage service, as well as real-time data streaming from exchanges like Bitstamp and Kraken.

To get everything up and running:

  1. Make sure you've set up the environment variables or .env file with all the necessary configurations (e.g., INFLUXDB_PORT, REDIS_PASSWORD, etc.).
  2. Navigate to the root directory containing the docker-compose.yml file.
  3. Execute the following command:
docker compose up -d --build

Once you've executed the command, Docker will handle the process of pulling the required images, building your services, and starting up all the containers. You'll then have a fully functional CryptoTracker system running locally. The frontend can be accessed by visiting http://localhost:3000, and other services are accessible through their specified ports, such as the API at port 3003.

Development 🛠️

The development environment for the CryptoTracker is designed to be modular, allowing you to edit and test each service individually. For ease of development, below are instructions on how to run each service separately:

Infrastructure

The fundamental infrastructure is comprised of databases and message brokers. To run just these essential services:

  1. Navigate to:
  • **/infrastructure/docker/db**
  • **/infrastructure/message_broker/**
2. Execute the command:
   docker compose up -d

Stream-Service

The Stream Service fetches cryptocurrency data from various APIs and writes them to the Message Queue. To start the Stream Service:

cd services
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
python -m streamservice.main <exchange>

Storage-Service

The Storage Service extracts data from the Message Queue and stores them in a time-series database. To start the Storage Service:

go mod download
go run cmd/storageservice/main.go

API

The API serves as the interface for retrieving data from the database. You can start the API with the following command:

air

Websocket

The Websocket Service ensures continuous data updates to provide real-time data:

go run cmd/websocket/main.go

Refresher-Service

The Refresher Service is responsible for sophisticated computations and stores the results in the Redis database. Price changes are directly communicated to the Websocket Service.

go run cmd/datarefresher/main.go

Frontend

The frontend is developed using Next.js and can be started as follows:

yarn install
yarn dev

Architecture 🏗️

The architecture model, as depicted below, illustrates how various services and components seamlessly interact within the CryptoTracker system to provide a robust and real-time solution for tracking cryptocurrency prices across multiple exchanges.

Architekturmodell

cryptotracker's People

Contributors

marv963 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.