https://github.com/shreyansh1410/cryptopricetracker
This project is a Node.js application that fetches real-time cryptocurrency data from the CoinGecko API and stores it in a MongoDB database. It uses cron jobs to automate the data fetching process at defined intervals.
https://github.com/shreyansh1410/cryptopricetracker
mongodb mongoose node-fetch nodejs
Last synced: 4 months ago
JSON representation
This project is a Node.js application that fetches real-time cryptocurrency data from the CoinGecko API and stores it in a MongoDB database. It uses cron jobs to automate the data fetching process at defined intervals.
- Host: GitHub
- URL: https://github.com/shreyansh1410/cryptopricetracker
- Owner: shreyansh1410
- Created: 2024-10-10T08:21:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-16T07:18:41.000Z (12 months ago)
- Last Synced: 2025-06-11T15:38:41.629Z (8 months ago)
- Topics: mongodb, mongoose, node-fetch, nodejs
- Language: JavaScript
- Homepage: https://cryptopricetracker-eirq.onrender.com
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cryptocurrency Data Fetching Project
This project is a Node.js application that fetches real-time cryptocurrency data from the CoinGecko API and stores it in a MongoDB database. It uses cron jobs to automate the data fetching process at defined intervals.
## Table of Contents
- Features
- Technologies Used
- Setup and Installation
- Configuration
- Usage
- Cron Jobs
- Deployment
- Contributing
- License
## Features
- Fetches cryptocurrency data (Bitcoin, Matic, Ethereum) from the CoinGecko API.
- Stores the fetched data in a MongoDB database.
- Automated data fetching using cron jobs.
- Detailed error logging for better debugging.
## Technologies Used
- Node.js
- Express.js
- MongoDB
- Mongoose
- Node-fetch
- Node-cron
## Setup and Installation
1. Clone the repository:
```
git clone
cd
```
2. Install the dependencies:
```
npm install
```
3. Create a `.env` file in the root directory and add your MongoDB connection string and any other necessary environment variables.
## Configuration
- Ensure you have a MongoDB database set up and accessible.
- Set up your environment variables in the `.env` file:
```
MONGODB_URI=
COINGECKO_API_KEY=
```
## Usage
1. Start the application:
```
npm start
```
2. The application will begin fetching cryptocurrency data according to the schedule set in the cron job.
## Cron Jobs
The cron job is configured to fetch cryptocurrency data every two hours. You can modify the schedule in the `cronjob.js` file.
## Deployment
https://cryptopricetracker-het5.onrender.com/
## Contributing
Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.
## License
This project is licensed under the MIT License.