Skip to content

This Project is a Server Side Application that allows users to fetch all CryptoCurrency List , Facilitate Price Conversion on a particular date and Provides List of Companies that holds a specific CryptoCurrency.

Notifications You must be signed in to change notification settings

arvindk2025/KoinX_Backend_Assignment_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KoinX Backend Assignment

This project is a server-side application that allows users:

  1. To fetch all the Cryptocurrency lists from the Coingecko API :-
https://api.coingecko.com/api/v3/coins/list
  1. To facilitate the Price Conversion of one Crypto Currency to another Crypto Currency
  2. To fetch the List of Companies holding specific Cryptocurrencies Usin API :-
https://api.coingecko.com/api/v3/companies/public_treasury/${currency} 

Important Links:-

Project Demo Video Link https://asset.cloudinary.com/arvindkumar/ab0493dbc217b32244ee32153eb75307
Documentation.pdf Link https://drive.google.com/file/d/10f-CJMNFoOYhdJ-j9CiXg49ACQ6u2XkS/view?usp=sharing
Project Hosted Link on Render https://koinx-backend-assignment-ah3d.onrender.com/

Task 1: Fetch Cryptocurrency Names and IDs

  1. Note:- Testing URL for POSTMAN for Task-1
Define PORT = 8000
http://localhost:8000/api/cryptocurrencylist
  1. Fetching The Cryptocurrencies data from the Coingecko API :-
https://api.coingecko.com/api/v3/coins/list 

Koinx_Backend_Assignment 3. And After Fetching Data I am storing fetched data in MongoDB Database in the name and Id's format. Koinx_Backend_Assignment 4. For updating the data at Every hour we are using “node-shedule” package . This package provides a flexible and powerful way to define rules for scheduling tasks at specific times or intervals. 5. We are using “schedule.shedulejob” method to update the data at every hour Koinx_Backend_Assignment


Task 2: Cryptocurrency Price Conversion API

  1. Generated API that takes the Coingecko IDs of 2 cryptocurrencies and returns the price of one currency in another on a particular date. (Price Conversion Logic is written in the currencyConverter.controller.js file under controllers folder.
Define PORT = 8000
http://localhost:8000/api/currencyCoverter
  1. Request Schema:
        {
            "fromCurrency": "bitcoin",
            "toCurrency": "ethereum",
            "date": "12-01-2024"
        }
  2. Response:
       {
            "success": true,
            "data":{
                "convertedPrice": 17.688510609605387
             }
       }
  3. Converted Price in POSTMAN during the Testing Verification Koinx_Backend_Assignment

Task 3: Companies Holding Cryptocurrency API

  1. implemented an API that retrieves a list of companies holding a specific cryptocurrency.
Define PORT = 8000
http://localhost:8000/api/companies/public_treasury
  1. Implemented the getListofCompanies function in the listofCompaniesData.controller.js file under controllers to handle the retrieval of company data.
  2. Tested the API functionality using Postman. Koinx_Backend_Assignment

Request and Response Examples

  1. Request Schema:
    {
        "currency": "bitcoin"
    }
  2. Response:
    {
    "success": true,
    "List of Companies that holds bitcoin": [
                    "MicroStrategy Inc.",
                    "Galaxy Digital Holdings",
                    "Marathon Digital Holdings",
                    "Tesla, Inc.",
                    "Hut 8 Mining Corp",
                    "Coinbase Global, Inc",
                    "Block Inc.",
                    "Riot Platforms, Inc",
                    "Hive Blockchain",
                    "CleanSpark Inc.",
                    "NEXON Co Ltd",
                    "Exodus Movement Inc",
                    "Meitu Inc",
                    "Bit Digital, Inc",
                    "Bitfarms Limited",
                    "NFT Investments PLC",
                    "Cipher Mining",
                    "DMG Blockchain Solutions Inc.",
                    "Neptune Digital Assets Corp.",
                    "BIGG Digital Assets Inc.",
                    "Advanced Bitcoin Technologies AG",
                    "FRMO Corp.",
                    "The Brooker Group",
                    "DigitalX",
                    "LQwD Technologies Corp",
                    "Cypherpunk Holdings Inc",
                    "Core Scientific",
                    "Mogo Inc."
            ]
       }

Testing: For Testing this Server App in POSTMAN use following URL

  • Task-1: Get request to fetch All CryptoCurrency List
http://localhost:8000/api/cryptocurrencylist
  • Task-2 : Post request to convert one Currency to another
http://localhost:8000/api/currencyCoverter
  • Task-3 : Post request to fetch ListofCompanies
http://localhost:8000/api/companies/public_treasury

Or

Testing: For Testing this Server App using Deployed Link in POSTMAN use following URL

  • Task-1: Get request to fetch All CryptoCurrency List
https://koinx-backend-assignment-ah3d.onrender.com/api/cryptocurrencylist
  • Task-2 : Post request to convert one Currency to another
https://koinx-backend-assignment-ah3d.onrender.com/api/currencyCoverter
  • Task-3 : Post request to fetch ListofCompanies
https://koinx-backend-assignment-ah3d.onrender.com/api/companies/public_treasury

Technologies Used

  • Node.js
  • Express.js
  • MongoDB
  • Coingecko API
  • Render
  • MongoDB Atlas
  • POSTMAN
  • Cors
  • Axios
  • Node-Schedule Package
  • schedule.schedule job Method

Installation & Steps to Run the Project Your Locally Storage

  1. Download or Clone the repository:
 git clone https://github.com/arvindk2025/KoinX_Backend_Assignment_.git
  1. Install all the required dependencies:
 npm install
  1. Connect the MongoDB database by adding the Connection URL and PORT to the .env file (you can use MongoDB Atlas or Compass) :
MONGODB_URL = paste from connection string 
PORT = 8000
  1. Finally, Run the project:
 npm start

Or

npm run start

About

This Project is a Server Side Application that allows users to fetch all CryptoCurrency List , Facilitate Price Conversion on a particular date and Provides List of Companies that holds a specific CryptoCurrency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published