HaLamUs / crypto-terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple portfolio checker

This application is part of the Propine test

FYI: https://gist.github.com/liangzan/4436cb8b083c66b3517e7f4d80939f06

Prerequisite

Getting Started

Clone this project with the following commands:

git clone git@github.com:HaLamUs/crypto-terminal.git

Configure the application

  1. Data

Create new folder named data, then put the transactions.csv in it

  1. Install packages
npm i

Usage

Need help

node . --help

Get latest portfolio

node .

Return the latest portfolio value for that token in USD

node . -t eth

Return the portfolio value per token in USD on that date

node . -d 2023/03/22

Return the portfolio token value in USD by given date

node . -d 2023/03/22 -t btc

Detail

  1. Caching

When starting for the first time the program needs at least 3 minutes. (Mac mini M1)

My stategy is using cache here, after 30 mins the cache will be invalid

  1. Promise all

I can not find the history api whose param is a token array so I loop the token array to invoke api one by one.

Video

terminal.mov

Author

This repo was developed by @lamha.

Follow or connect with me on LinkedIn.

License

MIT License

About


Languages

Language:JavaScript 100.0%