https://koin-x-mauve.vercel.app/api/stats/bitcoin https://koin-x-mauve.vercel.app/api/deviation/bitcoin
- Retrieves the current stats of Ethereum,Matic and Bitcoin from the CoinGecko API and updates it in the database every 2 hours.
- Provides a
GET
API endpoint which fetches and returns current stats(usd,usd_market_cap and usd_24h_change) of given Coin. - Provides a
GET
API endpoint to retrieve the stats and deviation for last 100 record of given coin.
- Node.js
- Express.js
- MongoDB (with Mongoose)
- Axios (for making HTTP requests)
- Etherscan API
- CoinGecko API
- Clone the repository:
git clone https://github.com/ShubhzDev/KoinX.git
- Install dependencies:
npm install
- Set up the environment variables in the
.env.example
file. - Start the server:
npm start
- The server will start running on
http://localhost:8080
.
GET /api/stats/coin
: Fetches and returns current stats(usd,usd_market_cap and usd_24h_change) of given Coin.GET /api/deviation/coin
: Calculates and returns deviation of given Coin.