Git Product home page Git Product logo

cointop-sh / cointop Goto Github PK

View Code? Open in Web Editor NEW
3.9K 3.9K 305.0 25.75 MB

A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀

Home Page: https://cointop.sh

License: Apache License 2.0

Go 96.95% Makefile 1.65% Python 0.73% Dockerfile 0.31% Shell 0.11% Nix 0.25%
bitcoin blockchain cli coin coingecko coinmarketcap command-line console cryptocurrency digital-currency ethereum go golang holdings homebrew linux macos monitoring portfolio terminal

cointop's Introduction


logo


cointop

Coin tracking for hackers

License Build Status Go Report Card GoDoc Mentioned in Awesome Terminals PRs Welcome

cointop is a fast and lightweight interactive terminal based UI application for tracking and monitoring cryptocurrency coin stats in real-time.

The interface is inspired by htop and shortcut keys are inspired by vim.

cointop screenshot

Demo

This connects to an instance of Cointop using SSH:

ssh cointop.sh

In action

screencast

Table of Contents

Documentation has been moved to docs.cointop.sh

Features

  • Shortcut keys: Vim-inspired shortcut keys, custom key bindings configuration
  • Colorschemes: Custom colorscheme configuration, 256-color and 24-bit support
  • Favorites: Save and view favorite coins
  • Portfolio: Portfolio tracking of holdings, view profit & loss
  • Charts: Charts for coin price history and global market graphs
  • Search: Fuzzy searching for finding coins
  • Conversion: Currency conversion
  • Price Alerts: Price alerts with desktop notifications
  • Multiple APIs: Supports multiple coin data APIs; CoinGecko and CoinMarketCap
  • Mouse: Mouse support
  • Offline: Offline cache
  • Fast: Fast sort shortcuts, pagination, chart date range change, auto-refresh
  • Lightweight: It's very lightweight; can be left running indefinitely

Contributing

See docs.cointop.sh/contributing

Many thanks to Simon Roberts, Alexis Hildebrandt, and all the contributors that made cointop better.

Social

Mentioned in

Cointop has been mentioned in:

Tip Jar

BTC Tip Jar 3KdMW53vUMLPEC33xhHAUx4EFtvmXQF8Kf

ETH Tip Jar 0xC014b8F6F43f467922E93De62C9216F0538E0F8f

Thank you for tips! 🙏

License

Released under the Apache 2.0 license.

© Miguel Mota

cointop's People

Contributors

afh avatar alrs avatar arjundashrath avatar berjou avatar cardanoumbrella avatar cuishuang avatar dolanor avatar git-sgmoore avatar hmble avatar johnrichardrinehart avatar jship avatar lyricnz avatar maciejaszek avatar miguelmota avatar pomyk avatar popey avatar sboselli avatar simon-anz avatar tingping avatar vuon9 avatar waymobetta 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cointop's Issues

Double Entry for Portfolio and Favorites

Hi tried marking my favorites and tested out the portfolio feature. It is for some reason showing me two entries for Bitcoin in portfolio and favorites. Resulting in double the value of my holdings

Support for Page Up / Page Down shortcut

Hello! I just installed the Go version and it's pretty awesome. However, I find some shortcut to be unintuitive. For example, Ctrl+d and Ctrl+u aren't exactly the first thing I'd think about in order to go up/down. Here's some ideas :

Page Up : Go to the page's first entry
Page Down : Go to the page's last entry
Home : Go to the first page
End : Go to the last page
Insert : Add to favourites
Delete : Remove from favourites

Have a nice day!

panic when running in termux

panic: mkdir /tmp: read-only file system

goroutine 1 [running]:
github.com/miguelmota/cointop/cointop/common/filecache.NewFileCache(0x40001f3a70, 0x5)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/miguelmota/[email protected]/cointop/common/filecache/filecache.go:45 +0x160
github.com/miguelmota/cointop/cointop.NewCointop(0x40001f3c50, 0x5be5b5a6f6, 0xc, 0x0)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/miguelmota/[email protected]/cointop/cointop.go:180 +0x1c24
github.com/miguelmota/cointop/cointop/cmd.RootCmd.func1(0x40001a6b00, 0x5be60008b0, 0x0, 0x0, 0x0, 0x0)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/miguelmota/[email protected]/cointop/cmd/root.go:80 +0x1d0
github.com/spf13/cobra.(*Command).execute(0x40001a6b00, 0x40001121b0, 0x0, 0x0, 0x40001a6b00, 0x40001121b0)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x2f8
github.com/spf13/cobra.(*Command).ExecuteC(0x40001a6b00, 0x40001f3f18, 0x8, 0x8)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x24c
github.com/spf13/cobra.(*Command).Execute(...)
        /data/data/com.termux/files/home/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/miguelmota/cointop/cointop/cmd.Execute()
        /data/data/com.termux/files/home/go/pkg/mod/github.com/miguelmota/[email protected]/cointop/cmd/cmd.go:22 +0xf4
main.main()
        /data/data/com.termux/files/home/go/pkg/mod/github.com/miguelmota/[email protected]/main.go:8 +0x18

When `XDG_CONFIG_HOME` is defined cointop places the config.toml in `$XDG_CONFIG_HOME/.config/cointop`

When a user has defined the environment variable XDG_CONFIG_HOME, the expected behavior of programs that use that environment variable is to place their config directory in$XDG_CONFIG_HOME/<name of app>/. On first startup of cointop it does not follow the expected behavior and instead places its config directory in $XDG_CONFIG_HOME/.config/cointop/. This breaks automation scripts that expect the app to properly leverage the environment variable (ex. scripting downloading cointop and placing the color schemes in the cointop config directory).

One way to fix this could be to change defaultConfigFilePath call a function that checks if XDG_CONFIG_HOME is defined and would either return the expanded value of $XDG_CONFIG_HOME/cointop/config.toml or ~/.config/cointop/config.toml if XDG_CONFIG_HOME is not defined.

System Information:

  • Ubuntu 18.04
  • Go version 1.14.4 linux/amd64

Steps to reproduce:

  1. Define the XDG_CONFIG_HOME environment variable in your shell's rc file or $HOME/.profile
  2. Download cointop using go get -u github.com/miguelmota/cointop
  3. Start cointop and run ls -a $XDG_CONFIG_HOME to verify that $XDG_CONFIG_HOME does not contain a cointop directory, but does contain a .config directory with a cointop subdirectory.

termui install error

yanyiwu@yanyiwudeMacBook-Air /Users/yanyiwu/code/blog/_posts                                                             master
⚡ go version
go version go1.5.1 darwin/amd64

yanyiwu@yanyiwudeMacBook-Air /Users/yanyiwu/code/blog/_posts                                                             master
⚡ go get -u github.com/miguelmota/cointop

# github.com/gizak/termui
../../../golang/src/github.com/gizak/termui/render.go:107: not enough arguments in call to stack.ParseDump
../../../golang/src/github.com/gizak/termui/render.go:112: undefined: stack.Palette
../../../golang/src/github.com/gizak/termui/render.go:113: undefined: stack.SortBuckets
../../../golang/src/github.com/gizak/termui/render.go:113: undefined: stack.Bucketize
../../../golang/src/github.com/gizak/termui/render.go:114: undefined: stack.CalcLengths

Remove dependencies from pkg folder and manage with go modules

Hi, really cool project! Is there a reason that several dependencies are stored in the pkg folder, rather than managed with go modules and stored in vendor? I was curious what rendering library you were using (termui vs gocui) and I didn't see either in go.mod, but noticed both libraries are stored in the pkg folder. Looks like there's also go-cache, termbox, now, and maybe some others too.

Sorting order is incorrect on startup

Love the app, but seem to be getting a weird issue with the sorting.

If I restart the app, the default sort order under rank is all messaged up. For me to fix it up, I need to do a cointop reset and then it works. This has happened on a macOS and Linux host, both installe via brew.

See the following screenshot of the sorting issue;

https://pasteboard.co/JlXcwYy.png

Any ideas?

settings

Is there a way to change columns, disable top/bottom bar or change colors? Bt the way something is wrong with fullscreen it seems, screenshot attached.
wqis

using an unknown flag causes a panic

$ cointop --flag

panic: unknown flag: --flag

goroutine 1 [running]:
github.com/miguelmota/cointop/cointop/cmd.Execute()
	/home/ubuntu/go/src/github.com/miguelmota/cointop/parts/cointop/go/src/github.com/miguelmota/cointop/cointop/cmd/cmd.go:18 +0x187
main.main()
	/home/ubuntu/go/src/github.com/miguelmota/cointop/parts/cointop/go/src/github.com/miguelmota/cointop/cmd/cointop/cointop.go:8 +0x20

Cannot set portfolio value for ETH and BTC, only for others.

I was able to set the portfolio values for several altcoins, but when it came to ETH and BTC it wouldn't "stick".
I was able to set them manually in the config file however. In there they where both set as 0.0, even after editing inside cointop.
Now i am able to change the portfolio values from inside cointop as i would assume it should function.

Dumps HTML with Cloudflare's CAPTCHA into terminal and exits

After running cointop, the screen flashes for a second and some HTML is dumped into the terminal. After that, the app exits, but scrolling in the terminal remains disabled. Here is a part that fits into my terminal:

  <div class="g-recaptcha"></div>
  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
    <div><div style="width: 302px">
      <div>
        <iframe src="https://www.google.com/recaptcha/api/fallback?k=6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe>
      </div>
      <div style="width: 300px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
        <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"></textarea>
        <input type="submit" value="Submit"></input>
      </div>
    </div></div>
  </noscript>
</form>

                
              </div>
            </div>

            <div class="cf-column">
              <div class="cf-screenshot-container">
              
                <span class="cf-no-screenshot"></span>
              
              </div>
            </div>
          </div><!-- /.columns -->
        </div>
      </div><!-- /.captcha-container -->

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>
            
            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>
            

            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>

            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>
            
              
            
          </div>
        </div>
      </div><!-- /.section -->
      

      <div class="cf-error-footer cf-wrapper">
  <p>
    <span class="cf-footer-item">Cloudflare Ray ID: <strong>538b7116dd9e6924</strong></span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Your IP</span>: 194.187.249.59</span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>
    
  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
  </div><!-- /#cf-wrapper -->

  <script type="text/javascript">
  window._cf_translation = {};
  
  
</script>


  
</body>
</html>

Apparently, cointop attempts to access some website, runs into a CAPTCHA request and crashes.

Being able to add an amount of fiat (usd, eur, ...) to the portfolio

Eventually including the possibility of adding a fixed amount of fiat (dollars, euros, ...) to the portfolio would be very useful in many cases (for example when you are monitoring the total amount - split into different currencies and cryptocurrencies - you have on an exchange).

Thank you!

Graph is always showing dollar price

When switching the currency to e.g. Euro, the price shows correctly in the table, but the graph still shows the Dollar price.
I've tried to refresh the graph, changed lots of settings, deleted my user settings, etc. but it keeps behaving that way.

2020-02-03-114338_942x265_scrot

v1.3.6 locks

I maintain the cointop port on FreeBSD and I upgraded it to the latest version 1.3.6 released so far, on my system. After opening cointop, it seems to freeze after the data is shown on screen. Can not hit Enter, go up or down, or even quit.

Issue with currencies using same symbol

Problem seems to occur when at least two currencies share the same symbol. Cointop will seemingly randomly load either one on startup.

Current example would be the symbol HOT which is used by Holochain and Hydro Protocol.

  • Searching only finds one or the other (depending on which loaded at startup?).
  • Even when marking one as favourite and saving, on subsequent loads 'randomly' one of the two mentioned currencies will appear as favoured.

panic: runtime error: index out of range [7] with length 0

All that needs to happen to reproduce this error on my machine is:

  1. Open cointop
  2. Leave it alone for a few hours
  3. Return. The app will have crashed with the following output:
~ λ cointop
panic: runtime error: index out of range [7] with length 0

goroutine 1 [running]:
github.com/jroimartin/gocui.(*View).Write(0xc0004100f0, 0xc00041e000, 0x9de, 0xa80, 0xc000465900, 0xc000465900, 0x555c389de05d)
	/home/gideon/go/pkg/mod/github.com/jroimartin/[email protected]/view.go:224 +0x4e0
fmt.Fprint(0x555c390c21a0, 0xc0004100f0, 0xc000465968, 0x1, 0x1, 0x1, 0xc000650000, 0x9de)
	/usr/lib/go/src/fmt/print.go:233 +0x8d
github.com/miguelmota/cointop/cointop.(*Cointop).UpdateChart.func1()
	cointop/chart.go:102 +0x14c
github.com/miguelmota/cointop/cointop.(*Cointop).update.func1(0xc0003dc000, 0xc0004659c0, 0x2)
	cointop/update.go:19 +0x26
github.com/jroimartin/gocui.(*Gui).MainLoop(0xc0003dc000, 0xc0003dc000, 0x0)
	/home/gideon/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:377 +0x2db
github.com/miguelmota/cointop/cointop.(*Cointop).Run(0xc000170420, 0x0, 0x0)
	cointop/cointop.go:353 +0x355
github.com/miguelmota/cointop/cmd.Execute.func1(0xc00017a000, 0x555c3942c4c0, 0x0, 0x0, 0x0, 0x0)
	cmd/cointop.go:77 +0x249
github.com/spf13/cobra.(*Command).execute(0xc00017a000, 0xc0000201d0, 0x0, 0x0, 0xc00017a000, 0xc0000201d0)
	/home/gideon/go/pkg/mod/github.com/spf13/[email protected]/command.go:826 +0x462
github.com/spf13/cobra.(*Command).ExecuteC(0xc00017a000, 0xc0000a9f18, 0x5, 0x5)
	/home/gideon/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fd
github.com/spf13/cobra.(*Command).Execute(...)
	/home/gideon/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/miguelmota/cointop/cmd.Execute()
	cmd/cointop.go:152 +0xd56
main.main()
	main.go:8 +0x22

This is running in urxvt on Arch Linux

Transparent background

Hi,

Could it be possible to personnalize the background color with transparency support ?

Add custom refresh setting

Is your feature request related to a problem? Please describe.
Coinmarket cap is now requiring an API key for the use of their API. A fresh install currently logs Pro API Key is required. A basic account only has about 333/day requests, so it looks like there might need to be a way to either turn off polling or reduce the refresh rate.

Describe the solution you'd like
A customizable setting in the config file that will accept a refresh rate argument. It should accept a way to completely turn off refresh rates to force the user to manually refresh, and it should accept a numeric value for a refresh rate.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
None really.

Logo/Icon Proposal

Sorry for not having the template
Hi good day! Im Jibbie Eguna, a graphics designer, I would like to ask for your permission to propose a new designs of logo in your application/project. I would like to help projects in open-source .I would just like to propose new designs if you are needing it. Hoping for your positive response Thank You!

Cointop fails to install in Termux

I get this when I try to install in Termux

$ go get -u github.com/miguelmota/cointop
# github.com/miguelmota/cointop/vendor/github.com/fatih/color
go/src/github.com/miguelmota/cointop/vendor/github.com/fatih/color/color.go:21:43: undefined: isatty.IsCygwinTerminal

Enter key doesn't work on Ubuntu

I built a snap of cointop which you can install on Ubuntu (and other distros) with snap install cointop. However pressing Enter on a line doesn't launch a browser (as I expect it should). It appears that cointop calls /bin/openvt when it might be better to just call xdg-open (without the path) which is a more robust way of launching URLs on Linux AIUI.

Failed to ping

Installed via homebrew on osx. First run ran fine. However, after exiting and attempting to run again I am presented with:

$ cointop
2019/02/27 00:33:15 failed to ping

I've tried this on a second machine with the same results, also from homebrew
OSX 10.12.6

$ brew --version
Homebrew 2.0.2
Homebrew/homebrew-core (git revision de949; last commit 2019-02-26)
Homebrew/homebrew-cask (git revision 18160; last commit 2019-02-27)

Fail to start in Windows 10.

I installed go, latest version and used the command for windows go get -u github.com/miguelmota/cointop. It did not show any error and came to next line.
I used cointop to start but error shows up.

C:\Users\RohitSingh>go get -u github.com/miguelmota/cointop

C:\Users\RohitSingh>cointop
time="2019-06-11T21:11:07+05:30" level=fatal msg="mkdir : The system cannot find the path specified."

App crashes at startup. Takes console along with it.

Hi there. I was attempting to use your tool on Ubuntu 19.04 with a pretty fresh install of the OS with few modifications. The app seems to crash and locks up the terminal along with it. I've included a screenshot of the error and will try to get the crashlog in text form momentarily. I believe the most recent update made this crash happen rather in a few seconds to immediately upon start.

If there's other details you'd like or would find helpful, please let me know.

It does change the behavior for me, but now it insta-crashes. I've installed from source via the go get command and not from a package manager. I'll be around today at the keys if you want more details.

go version go1.12.3 linux/amd64

image

image

Logo Proposal

Greetings!

I am an aspiring graphics designer and I have some designs for your project, I can show you the design if you wanted to do so.

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.