Giter Club home page Giter Club logo

propine-interview's Introduction

Portfolio CLI Tool

This interactive CLI tool returns portfolio values for tokens. You may specify a date and/or a token.

Dependencies

  • This tool requires you have node.js installed (v14+ recommended)
  • A javascript package manager (yarn recommended)

Setup

  • Clone this repository locally.

  • Install dependencies with your package manager (eg: yarn install)

  • Run the 'setup' npm script (eg: yarn setup). This command will download the needed data, and requires an internet connection.

  • Build the project by running yarn build or npm run build in the project directory.

  • Run the CLI tool with node .

  • You can also build and run the cli tool in one step with the start npm script. yarn start or npm start

Usage

  • You can enter the ticker for the cryptocurrencies you're interested in (In Uppercase) when prompted. Leave blank for all tokens

  • You can enter a date (yyyy-mm-dd) when prompted, if you would like to see the portfolio value for the token(s) as at that date. Leave blank to see the portfolio value for that token to date.

Design decisions

In this implementation, the whole file is never loaded completely into memory, as memory is a limited resource and we may not be able to predict exactly how much we will need in the future if it works that way.

In this implementation, the transaction history is instead streamed into the program, a single record at a time, and the useful information is extracted from each record and consumed.

Pricing information is obtained on the fly with cryptocompare.com's public API, so the pricing information for tokens is pretty much guaranteed to always be up-to-date.

propine-interview's People

Contributors

uchebuego avatar

Watchers

Wong Liang Zan avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.