GithubHelp home page GithubHelp logo

madnight / bitcoin-chart-cli Goto Github PK

View Code? Open in Web Editor NEW
300.0 14.0 37.0 898 KB

Bitcoin chart for the terminal as command line util

License: MIT License

JavaScript 94.19% Shell 5.81%
bitcoin cli charts terminal nodejs cryptocurrency cryptocurrencies cryptocurrency-graph bitcoin-price ethereum-price

bitcoin-chart-cli's People

Contributors

chadsr avatar dependabot[bot] avatar madnight 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

bitcoin-chart-cli's Issues

Vulnerability

The badge show that there is one vulnerability, prototype pollution.

SyntaxError: Unexpected identifier

I get this message after installing as explained in the README, happens also with options or other currencies.

[...]/yarn/global/node_modules/bitcoin-chart-cli/index.js:39
const current = async url => (await axios.get(url)).data
                      ^^^
SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)

url error

bitcoin-chart-cli -V
./.nvm/versions/node/v6.11.4/lib/node_modules/bitcoin-chart-cli/index.js:52
const fetchCoinList = async url =>
^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)

Support for api key?

I would like to use an api key from cryptopian just so I'm not limited to "free"

Erhh..Help requisite!

Installs node, Installs chart-cli but then:

/usr/local/lib/node_modules/bitcoin-chart-cli/index.js:21
const printCoins = async () =>
                         ^

SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)

Help @madnight ?

Empty chart when using bitcoin-chart-cli with watch

bitcoin-chart-cli works without any problems (tried all args, resizing terminal etc.), but after using
watch bitcoin-chart-cli... I see just numbers, header, info but no chart, the whole screen is empty

Using OS X, iterm2, node = 9.4.0

"width" option not working correctly

Hello, first of all, great app here!
I installed on my Mac (macOS 10.12.6) and I noticed some strange behavior trying to set the 'width' option.
For -w 70 and -w 80, it seems like the chart is displayed at the same width, and only the text underneath the chart changes its width. Image attached.

image

Example: tmux script

#!/bin/sh
tmux new-session -d -s BTC_mon 'watch -n 30 bitcoin-chart-cli --currency CAD --mins 30 --width 60'
tmux split-window -h 'watch -n 60 bitcoin-chart-cli --currency CAD --hours 24 --width 60'
tmux split-window -v -t 0 'watch -n 60 bitcoin-chart-cli --currency CAD --days 7 --width 60'
tmux split-window -v -t 2 'watch -n 60 bitcoin-chart-cli --currency CAD --days 30 --width 60'
tmux -2 attach-session -t BTC_mon

Just wanted to post a good tmux example for the graph.
Not really an error just thought it would help people.
Also love the program ๐Ÿ‘

[Feature Request] Minimum (and maximum) unit range

I find it a bit disturbing how much the chart may change on update due to the min and max values of the requested timeframe changing and the chart range depending on them.

So I'd like to be able to set something like have the minimum range be 50 units of the selected currency and the chart range wouldn't go smaller than that even if all the values from the requested timeframe are spread on a range less than 50 units.

I was thinking of requesting also max range option but that could be a bit too hard to implement in a way that satisfies all. Maybe take the average of the values within the selecter timeframe and center the chart on it if the current value is within that range? Otherwise use the current value as the min or max of the range depending on whether it was under or over the range determined from the average. Anyway the max value is less important to me but might as well lay it here as well.

Would you mind if I backlink to this repository?

Hello, Fabian!

I noticed your bitcoin-chart-cli repository, and I am very happy to know you're using my asciichart package in it, that's awesome! ) Would you mind if I link to your repository from my other projects on GitHub? Also, checkout my ccxt library for cryptocurrency trading, if you haven't yet )

Thanks!

PS. Don't know if it's appropriate here, but I tried to send the above message to your contact email, and got the following response, you may want to do something about it )

screen shot 2017-08-03 at 16 42 10

Use only one API call per run.

By having tmux view of multiple updating charts you can easily exceed your daily call limits. I noticed that every time bitcoin-chart-cli runs it makes two API call, to get the history and the current value. This is not very favorable for free users.

I then wondered would it be possible to extract the current value straight from the history call so you'd only need to make a single API call? I'm not very familiar with the API but I'd sort of assume that the latest value in the history would be the current value.

Unknown Error

I have installed bitcoin-chart-cli and created a symlink between /usr/bin/nodejs and usr/bin/node. When I run the command bitcoin-chart-cli I receive the following error.

/usr/local/lib/node_modules/bitcoin-chart-cli/index.js:3
const { get, defaultTo, map, flow, sortBy, remove, always,
^

SyntaxError: Unexpected token ,
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

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.