GithubHelp home page GithubHelp logo

bichenkk / coinmon Goto Github PK

View Code? Open in Web Editor NEW
1.6K 54.0 154.0 273 KB

πŸ’° The cryptocurrency price tool on CLI. πŸ–₯

License: MIT License

JavaScript 97.71% Dockerfile 2.29%
bitcoin cryptocurrency crypto ticker ethereum btc price-tracker cli nodejs javascript

coinmon's Introduction

Node version License: MIT PRs Welcome

πŸ’° Cryptocurrency price ticker CLI.

Check cryptocurrencies' prices, changes on your console. Best CLI tool for those who are both Crypto investors and Engineers.

All data comes from coincap APIs.

Quick Update

  • As coinmarketcap API is only free with API keys, we moved to use coincap API and disabled some features.

Install

In order to use coinmon, make sure that you have Node version 6.0.0 or higher.

$ npm install -g coinmon

Usage

To check the top 10 cryptocurrencies ranked by their market cap, simply enter

$ coinmon

Options

Find specific coin(s)

You can use the -f (or --find) with coin symbol to search cryptocurrencies. You can add symbols seperated by comma.

$ coinmon -f btc // search coins included keyword btc
$ coinmon -f btc,eth // search coins included keyword btc or eth

Find top coin(s)

You can use the -t (or --top) with the index to find the top n cryptocurrencies ranked by their market cap.

$ coinmon -t 50 // find top 50

Show option menu

You can use the -h (or --help) to find all valid options of coinmon

$ coinmon -h

Screenshot

Development

It's simple to run coinmon on your local computer.
The following is step-by-step instruction.

$ git clone https://github.com/bichenkk/coinmon.git
$ cd coinmon
$ yarn
$ npm install -g
$ npm link
$ coinmon

Docker

Initial usage

$ docker run --rm -ti jaymoulin/coinmon

You can pass parameters just like coinmon binary

$ docker run --rm -ti jaymoulin/coinmon --help

Local usage

Build image

$ docker build -t coinmon .

Usage

$ docker run --rm -ti coinmon

You can pass parameters just like coinmon binary

$ docker run --rm -ti coinmon --help

Contributors

  • @maticrivo
  • @pgila
  • @vladei
  • @jaymoulin
  • @anilkilic

License

MIT

coinmon's People

Contributors

bichenkk avatar craigdevoy avatar danielruf avatar hpduong avatar jaymoulin avatar jrwren avatar kenshinji avatar maticrivo avatar noplanman avatar pgilad avatar stichoza avatar vladei avatar yuto-katsuragi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coinmon's Issues

We are not able to find coins matching your keywords

Just loaded fresh via npm, -f works, but no other options.

-> % coinmon -t 50              
                                                            
  ___     ___    __     ___      ___ ___      ___     ___    
 /'___\  / __`\ /\_\  /' _ `\  /' __` __`\   / __`\ /' _ `\  
/\ \__/ /\ \_\ \\/\ \ /\ \/\ \ /\ \/\ \/\ \ /\ \_\ \/\ \/\ \ 
\ \____\\ \____/ \ \ \\ \_\ \_\\ \_\ \_\ \_\\ \____/\ \_\ \_\
 \/____/ \/___/   \/_/ \/_/\/_/ \/_/\/_/\/_/ \/___/  \/_/\/_/
                                                             


We are not able to find coins matching your keywords
-> % coinmon
                                                            
  ___     ___    __     ___      ___ ___      ___     ___    
 /'___\  / __`\ /\_\  /' _ `\  /' __` __`\   / __`\ /' _ `\  
/\ \__/ /\ \_\ \\/\ \ /\ \/\ \ /\ \/\ \/\ \ /\ \_\ \/\ \/\ \ 
\ \____\\ \____/ \ \ \\ \_\ \_\\ \_\ \_\ \_\\ \____/\ \_\ \_\
 \/____/ \/___/   \/_/ \/_/\/_/ \/_/\/_/\/_/ \/___/  \/_/\/_/
                                                             


We are not able to find coins matching your keywords

I'll try to figure out what's going on, thought you'd like to know.

Sorry, this issue was spam.

I'm sorry to inform you that my GitHub token was compromised, leading to the creation of spam posts. Upon discovering this, I took action to close the issue and correct the content.

Coinmon + Raspberry Pi 3

Hello,
I've been getting this issue, tried to install coinmon on a Raspberry Pi 3 with the latest Raspbian.
Node is installed.

Can you please point me in the right direction.

Thank you

`pi@raspberrypi:~ $ coinmon
/usr/local/lib/node_modules/coinmon/src/index.js:30
let portfolioEnabled;
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3`

Feature Request: Configurable Decimal Places

The -s flag is very useful, on smaller terminals, to limit output.

Would it be possible to add a feature: ability to limit the coin price accuracy to a fixed amount of decimal places (or better yet, total digits - useful for low value coins)

Example: The current bitcoin price shows "6282.25189496", but just "6282" would be fine...

Note: The screenshot on Readme.MD shows bitcoin price limited to 1 decimal place, which is great, however the current version of coinmon gives BTC price to 8 decimal places...

Timeouts and retries

Sometimes the coinmon script just sits there fetching the data. I run the coinmon inside a while loop and sometimes is just stuck for an unknown amount of time.

what about a pure text outoput option?

Hi,
I'm kindly requesting to the developers a pure text (or json) output so that it can be inserted into a file,
something like
coinmon -f BTC,ETH -o(utput) >> price.txt

It would be very useful.

Thank you,
Luca

Died?

It show

Coinmon is not working now. Please try again later

Cannot launch on Raspbian

Hello,

After installing, I get the output below on Raspbian:

module.js:327
    throw err;
    ^

Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/coinmon/src/index.js:7:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

Node.js is up to date. How to get the colors module?

Thank you very much in advance.

Alerts based on pre-configured rules

Would like a feature to get notifications or some form of alerts, based on a set of pre-configured rules ( such as BTC price increase by 1% ). Any plans for taking this up ?

how to print only column you want

Hello,

I've just install coinmon (very nice project).
My issue is : with my mobilephone, the display isn't perfect because there is to much columns.

Can we delete the rank column ?

Thank you

Logo

Hey,

It might not make sense for a CLI project but I made a simple logo, if you'd like to use.

coinmon-v1

Editable vector files (.svg) are inside Archive.zip
Archive.zip

Font: Montserrat

No support for proxies

Hey there,

Perhaps I missed a part of some configuration but I cannot use coinmon behind a firewall.

coinmon -t 10


/'\ / __\ /\_\ /' _ \ /' __ __\ / __\ /' _ \
/\ _
/ /\ _\ \/\ \ /\ /\ \ /\ /\ /\ \ /\ _\ /\ /\ \
\ _
\ _/ \ \ \ _\ _\ _\ _\ _\ _/\ _\ _
/
/ // // //// ////// /_/ ////

Coinmon is not working now. Please try again later.

Is what I get every time running the command.
I suspect that this is a proxying issue.

Specify location for -p option

The -p option works fine in Linux, but in Windows I cannot specify an alternate location when running Coinmon in PowerShell.

πŸ“pyCOINMON port based on COINMON for Python 🐍

This is a issue for public information about pyCOINMON port based on COINMON.

COINMON is a great project! Congrants! πŸŽ‰πŸŽ‰πŸŽ‰

But I think that the concept of the project may be more powerfull implemented with Python 🐍.
At this moment pyCOINMON has near to 90% of the functionality of COINMON.

https://github.com/RDCH106/pycoinmon

It will be a pleasure to exchange ideas between the projects.

Showing the number of tokens you hold

Is there a feature, or a feature on the roadmap for showing how many tokens of a specific coin you hold? I like the default output with the USD value, but sometimes I want to know how many coins I actually hold.

Coins with identical symbols

There are two coins with the same symbol "BTG"
https://api.coinmarketcap.com/v1/ticker/bitcoin-gold/
https://api.coinmarketcap.com/v1/ticker/bitgem/

so if you have portfolio like this:

{
"btg": 10
}

You get 2 coins instead of one:

-------------------------------------------------------
β•‘ Rank β”‚ Coin β”‚ Price USD β”‚ Balance β”‚ Estimated Value β•‘
β€”---------------------------------------------------β€”
β•‘ 22   β”‚ BTG  β”‚ 76.305    β”‚ 10      β”‚ 763.05          β•‘
β€”---------------------------------------------------β€”
β•‘ 1087 β”‚ BTG  β”‚ 9.87773   β”‚ 10      β”‚ 98.78           β•‘
β€”-----------------------------------------------------

Could you, please, add ability to avoid this problem?
Possible solutions:

  1. Search by name or id on coinmarketcap
  2. Exclude coins by name or id

Need help with this issue

Hey, just installed Coinmon but can't seem to get it work.

My terminal give me this "/usr/bin/env: β€˜node’: No such file or directory"

Thank you

default "top" option no longer works

Appears coincap api, assets limit key is now limited to 6 as the max, despite their api page stating 2000.

coinmon -t 1 thru 6 ; works
coinmon -t 7+; errors
coinmon ; errors

Not sure if much can be done on your end.

Table Borders slightly misaligned

An admittedly very minor problem, but on my machine (Ubuntu 17.10, node v6.11.4) the data-row columns are not properly aligned with the header columns.... see here or the attached image for a demo. I don't know if this is perhaps an emoji related issue?

screenshot from 2017-11-20 14-04-31

Donation button

Most opensource projects have a donation button. Not that I have that much luck with crypto to make you rich, but a small donation to thank you for your efforts would be nice.

Enhancement: Find support for multiple coins

Enhancement Request:

Consider adding the ability to "find" multiple coins. Possibly using comma/space delimited

coinmon -f btc,neo,xrp,bcn,xmg,xmr,dash

if accepted. allow various sorting approaches, by symbol, price, change, etc....

edit: justed looked at api looks like you may have to use: /ticker/{id}/ to pull back specific coins..

Table header is missing a space

The Coin table header is missing one space (Or maybe it's each coin label that have one extra space), making the row look weird. See attached screenie.

image

Use versioning

I love this project guy!
I use it via docker and I like to tag my image properly. I believe it would make sense to define a standard versioning for the project.

Cheers!
Pascal

Can't see Everex coin

Basically I was expecting EVX to show Everex coin but I am seeing nothing, any ideas?

Feature Request: Data Not BS

The point of a CLI, is to produce data, that can be run through an ETL pipeline, not visualizations - I could go to coinmarketcap for that. This is what I would currently have to do, just to determine price, so that it could be piped into a downstream process.

$ docker run --rm -ti jaymoulin/coinmon:0.0.22 -s 2 | sed -n '7p' | awk '{ print $2 }'
5095.99288768
...
# instrument value
$ docker run --rm -ti jaymoulin/coinmon:0.0.22 -s 2 \
     | sed -n '7p' \
     | awk '{ print $2 }' \
     | xargs -I{} echo "price_btc {}" \
     | curl pushgatway/metrics/job/cryptosamplejob

If coinmon is "The cryptocurrency price tool", then, like, give us the actual unmolested data, not a useless layout.

Auto refresh

Hi, thanks for this great little tool!

It would be really great if it would automatically refresh, with a configurable interval. This way, it would act a bit like web-based chart aggregators like cryptowat.ch, and be even more useful!

zsh: command not found: coinmon

Hello, I need some help, I can't figure out what's wrong. I installed this on my mac through the homebrew, but when I try to launch with command "coinmon" I get this error:

➜  ~ npm install -g coinmon
/Users/Arnas/.npm-global/bin/coinmon -> /Users/Arnas/.npm-global/lib/node_modules/coinmon/src/index.js
+ [email protected]
updated 1 package in 2.567s
➜  ~ coinmon              
zsh: command not found: coinmon

When I just drag the alias /Users/Arnas/.npm-global/bin/coinmon to terminal all works, but it's hardway to launch this alias, any tips?

Adding Change week

Is it possible to add an extra column showing the change from a week?

Default currency

There is no default currency:

twaszczyk@kattomwasnb:~/workspaces/silesia-blockchain-meetup$ coinmon -c eth
We cannot convert to your currency.
twaszczyk@kattomwasnb:~/workspaces/silesia-blockchain-meetup$ coinmon -c usd

Cool to setup default currency like USD.

Thanks for the project!

Make Market Cap values more readable

Currently values in the Market Cap column are displayed without separators, like this 136782547484. I think it would be more readable if they are displayed like this 136 782 547 484 or this 136,782,547,484.

How do I make it tick?

Hello,

The readme mentions "Cryptocurrency price ticker CLI", but I can't seem to figure out how to make it start "ticking", i.e. display continuous updates. Is it supposed to be able to?

Data display is unnecessarily wide

It would be awesome to have the displayed data fit into 80-char lines, as that is roughly the size of most terminal windows. Currently, the rows are 92 characters long, so the table rows wrap in a standard ~80 and it doesn't look great:

Personally, I'd be happy to see fewer digits of market cap and a few less whitespace characters to make this possible.

Add Ethereum address to FUNDING.yml

I'd like to see an Ethereum address added to the custom property of the FUNDING.yml file for GitHub Sponsors. This would allow a canonical address to send funds to. For example, projects could parse out the address and provide donation capabilities to the user.

portfolio error : Please include a valid json file.

Hi,
When I run coinmon -p I receive this error message : Please include a valid json file.
I don't understand why?? the other command work very well.

json :

{ "trx": 0, "snm": 2248.95860000, "ada": 0, "ast": 0, "nav": 0, "bqx": 0, "lrc": 0, "kmd": 0, "ven": 0, "omg": , "qtum": 0, "ltc": 0, "dash": 1, "xmr": 1, "dat": 1, "nas": 1 }

image

Thanks for the help!

Rank portfolio by 'Estimated Value' does not work

Hi, thanks for building a great tool, loving it so far.

I found a bug in the -r (--rank) argument. I have portfolio enabled and I'm trying to sort by 'Estimated Value' but it has no impact on the order.

Here is the command that I'm using:

coinmon -p -s 1,2,4,7,8 -r 8

If I'm missing something obvious, please let me know.

Thanks again!

Missing path?

I don't know js but I gather I'm missing a directory or global path. I'm using zsh.

Upon attempting install:

path.js:975
      const path = i >= 0 ? args[i] : process.cwd();
                                              ^

Error: ENOENT: no such file or directory, uv_cwd
    at Object.resolve (path.js:975:47)
    at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:550:17)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:648:20)
    at Function.Module._load (internal/modules/cjs/loader.js:580:25)
    at Module.require (internal/modules/cjs/loader.js:711:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/usr/lib/node_modules/coinmon/src/index.js:9:20)
    at Module._compile (internal/modules/cjs/loader.js:805:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
    at Module.load (internal/modules/cjs/loader.js:672:32)

Is it possible to add more cryptocurrencies (myself)?

Thank you for this program! I have made a simple watch and grep command to monitor some cryptocurrencies that I am interested in but there is one that is not available and that is NuCypher (NU). Is it possible for me to somehow add this in a configuration file?

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.