https://github.com/hashfx/koinx-assignment
KoinX assignment solution for Blockchain Backend Intern position by Harsh Soni
https://github.com/hashfx/koinx-assignment
Last synced: 9 months ago
JSON representation
KoinX assignment solution for Blockchain Backend Intern position by Harsh Soni
- Host: GitHub
- URL: https://github.com/hashfx/koinx-assignment
- Owner: hashfx
- Created: 2024-04-21T08:34:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-24T10:55:36.000Z (over 1 year ago)
- Last Synced: 2025-05-19T00:11:17.521Z (about 1 year ago)
- Language: JavaScript
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KoinX Assignment
## Features
* Fetch and display a user's Ethereum transactions using the Etherscan API.
* Retrieve the current price of Ethereum in INR using the CoinGecko API.
* Store transaction and price data in a MongoDB Atlas database.
## Requirements
* [Node.js and npm](https://nodejs.org/en/download)
* [MongoDB Atlas account](https://www.mongodb.com/docs/atlas/tutorial/create-atlas-account/)
TASK_1: Fetch Transaction using Ethereum API
+ ToDo
+ create ```.env``` file and store etherscan api as ```ETHERSCAN_API_KEY=YOUR_API_KEY```
+ add ```MONGODB_URI``` to .env as ```MONGODB_URI=YOUR_MONGODB_URI```
+ make sure not to push .env file in production
+ Run app
```shell
cd TASK_1
npm install
node index.js
```
+ Test API
+ go to your browser and type ```localhost:3000/transactions/YOUR_ADDRESS```
+ replace YOUR_ADDRESS with a transaction or wallet address
TASK_2: Fetch Ethereum price every 10 minutes using CoinGecko API
+ ToDo
+ create ```.env``` file and store etherscan api as ```ETHERSCAN_API_KEY=YOUR_API_KEY```
+ add ```MONGODB_URI``` to .env as ```MONGODB_URI=YOUR_MONGODB_URI```
+ make sure not to push .env file in production
+ Run app
```shell
cd TASK_2
npm install
node index.js
```
TASK_3: Fetch balance of user and latest price of Ethereum
+ ToDo
+ visit ```localhost:3000/balance/ADDRESS``` in the browser and replace ```ADDRESS``` with address of the user
+ Run app
```shell
cd TASK_3
npm install
node index.js
```
Thanking You: developed by HARSH SONI