Skip to content

Server side application using Node.js and MongoDB, website fetching real-time crypto data (Bitcoin, Matic, Ethereum) from CoinGecko API, with 2-hour updates and endpoints for stats and price deviation.

Notifications You must be signed in to change notification settings

snehexcel/koinx-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptocurrency Data Fetcher

  • Overview: A server-side website that retrieves real-time cryptocurrency data for Bitcoin, Matic, and Ethereum using the CoinGecko API.

  • Key Features:

    • Fetches the latest cryptocurrency statistics, including price, market cap, and 24-hour change.
    • Runs a background job every 2 hours to automatically update and store data.
    • Provides two API endpoints:
      • /stats: Returns current data for a specified cryptocurrency.
      • /deviation: Calculates the standard deviation of prices from the last 100 records.
  • Technologies Used:

    • Node.js and Express.js for server-side development.
    • MongoDB (or another database) for data storage.
    • Axios for making API requests to CoinGecko.
    • Cron for scheduling background jobs.
  • Setup Instructions:

    1. Install dependencies using npm install.
    2. Configure your database connection in a .env file.
    3. Start the server with npm start.
  • API Endpoints:

    • /stats?coin=bitcoin: Returns the latest price, market cap, and 24-hour change.

      {
        "price": 40000,
        "marketCap": 800000000,
        "24hChange": 3.4
      }
    • /deviation?coin=bitcoin: Returns the standard deviation of the price based on the last 100 records.

      {
        "standardDeviation": 4082.48
      }

This project offers an efficient way to access real-time cryptocurrency statistics, making it a valuable resource for developers and enthusiasts.

About

Server side application using Node.js and MongoDB, website fetching real-time crypto data (Bitcoin, Matic, Ethereum) from CoinGecko API, with 2-hour updates and endpoints for stats and price deviation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published