madnight / bitcoin-chart-cli Goto Github PK
View Code? Open in Web Editor NEWBitcoin chart for the terminal as command line util
License: MIT License
Bitcoin chart for the terminal as command line util
License: MIT License
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
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.
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.
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 )
The badge show that there is one vulnerability, prototype pollution.
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)
I would like to use an api key from cryptopian just so I'm not limited to "free"
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 ?
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
Did the api change somehow? The Cryptocompare site is still up and their api is working.
There is a wrong name set for symbol DCR.
https://github.com/madnight/bitcoin-chart-cli/blob/master/coins.js#L7
It should be "Decred".
@BlkChockr suggested that the user should be able to define any coin in an generic way by adding its code as param
bitcoin-chart-cli --coin ETH
$ npm install bitcoin-chart-cli -g
$ bitcoin-chart-cli
Sorry. The coin/currency pair BTC/USD does not exist in the cryptocompare api.
$ bitcoin-chart-cli --coin ETH -d 360 -w 80 -h 20
Sorry. The coin/currency pair ETH/USD does not exist in the cryptocompare api.
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)
"Message":"Coin list succesfully returned! This api is moving to https://min-api.cryptocompare.com/data/all/coinlist, please change the path."
#!/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 ๐
๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.