Coder Social home page Coder Social logo

crypo_report's Introduction

simple crypo report generator

my approach

languages

  • Node/Typescript

data

  • Only Loading the first 10k records using a csv-parser library

  • for validation we only allow the tokens ["BTC", "ETH", "XRP"]

  • ESLint ignored 🤫️🤫️🤫️️

  • Out of the box tsconfig.json configurations

  • No unit tests 😂️

How to run the code

  • Clone the repo [email protected]:MartinPirate/crypo_report.git
  • copy the trasactions.csv file fromhttps://github.com/Nparooei/Propine/tree/develop/data to the data directory (too huge to commit 😂️)
  • Run npm install to install the dependencies
  • Run tsc server.ts typescript compilation
  • Run npm run start for option 1 - no params
ℹ  info      Loading Latest Prices for all available  Tokens

✔  success   Token Values Loaded Successfully
{ 
BTC: 7134.658874, 
ETH: 317.4383764800001,
XRP: 0.2861133544
}
  • Run node server.js -t -t <token> for option 2 - using a Token Symbol eg node server.js -t "BTC"
ℹ  info       Loading Token Value for BTC in USD:
✔  success   Latest Token Value for BTC is  $7138.517561199999

ℹ  info       Loading Token Value for ETH in USD:
✔  success   Latest Token Value for ETH is  $317.7116899200001 

ℹ  info       Loading Token Value for XRP in USD:
✔  success   Latest Token Value for XRP is  $0.286321336 


  • Run node server.js -d <date> for option 3 given a date eg node server.js -d 2019-10-19
ℹ  info       Loading Token Value on date 2019-10-19 in USD  
✔  success   Token Values Loaded Successfully

{ 
BTC: 7139.7241476,
ETH: 317.9831053500001,
XRP: 0.2867372992 
}


  • Run npm run start -t <token> -d <date> option 3, given a token symbol and a date eg node server.js -t "BTC" -d 2019-10-19
ℹ  info      Loading Token Value of BTC on date 2019-10-19 in USD 
✔  success   Token key-value for BTC on 2019-10-19 is

{ BTC: 7138.547427199999 }


ℹ  info      Loading Token Value of ETH on date 2019-10-19 in USD 
✔  success   Token key-value for ETH on 2019-10-19 is
 
{ ETH: 317.6205854400001 }


ℹ  info      Loading Token Value of XRP on date 2019-10-19 in USD 
✔  success   Token key-value for XRP on 2019-10-19 is
 
{ XRP: 0.2872225896 }

crypo_report's People

Contributors

martinpirate avatar

Watchers

 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.