• Stars
    star
    113
  • Rank 310,115 (Top 7 %)
  • Language
    Ruby
  • License
    GNU Affero Genera...
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compare cryptocurrency trading data across multiple exchanges and blockchains in the comfort of your terminal
coinpare logo

Coinpare Gitter

Gem Version Actions CI Build status Maintainability Coverage Status Inline docs

Compare cryptocurrency trading data across multiple exchanges and blockchains in the comfort of your terminal

A screenshot is worth a thousand words:

CoinsView

Installation

This project uses Ruby, before installing the coinpare tool, you'll need to ensure Ruby is installed on your machine.

In your terminal execute ruby command with -v option:

$ ruby -v

If you have version of Ruby greater than 2.0.0 then you're good to go.

Otherwise, please follow Installing Ruby to pick best installation method for your operating system.

Once Ruby is installed, install the coinpare gem:

$ gem install coinpare

And then execute coinpare to see all available options:

$ coinpare

Features

  • Compare purchased or top coins trading info(price, vol, open, high, low etc)
  • Compare top markets by a trading coin pair
  • Create custom portfolio and track your holdings
  • Display portfolio in a table or pie chart
  • Auto refresh cryptocurrencies info with a configurable time interval

Contents

1. Usage

To use all available commands, run the following in your terminal:

$ coinpare

You will be presented with the following interface:

Interface

2. View coins

You can see top 10 trading info (price, volume, open, high, low etc) of any cyptocurrency in any other currency by executing the following in your terminal:

$ coinpare coins

By default, USD is used as the base currency price conversion. You can change this by passing --base or -b flag:

$ coinpare coins --base BTC

If you wish to see more currencies use --top flag:

$ coinpare coins --top 30

Alternatively, you can specify exactly the coins you're interested in by naming them separated by space:

$ coinpare coins ETH BCH LTC --base btc

You can also change the default exchange CCCAGG using the --exchange or -e flag:

$ coinpare coins BTC ETH --exchange coinbase

See view markets for more information on available exchanges.

Finally, if you want to auto refresh data use --watch or -w flag:

$ coinpare coins --watch
$ coinpare coins -w

You can watch for changes on your preferred cryptocurrencies:

$ coinpare coins BTC ETH LTC ZEC --watch

By default 5 seconds interval is used which you can change by providing a new value after --watch flag:

$ coinpare coins --watch 20   # every 20 seconds

To finish watching for changes hold down Ctrl+C key combination.

3. View markets

You can get top markets by volume for any currency pair. By default 10 top exchanges for the BTC and USD pair by their total volume across all markets in the last 24 hours are displayed.

$ coinpare markets

is equivalent to:

$ coinpare markets BTC --base USD

An example output:

MarketsView

To change the pair do:

$ coinpare markets ETH -b BTC

You can specify the number of displayed exchanges with --top or -t flag:

$ coinpare markets --top 30

To watch for changes use the --watch or -w flag:

$ coinpare markets --watch
$ coinpare markets -w

To finish watching for changes hold down Ctrl+C key combination.

4. Create portfolio

There is an easy way for you to keep track of all your investments using the holdings command. When run for the first time, you will be presented with a prompt that will guide you through the portfolio setup and allow you to add as many holdings as you wish.

$ coinpare holdings

The prompt may look:

CreateHoldings

4.1 Edit coins

All your holdings information will be persisted in your user home directory in a file called coinpare.toml. You can edit this file directly using your configured editor by passing the --edit flag:

$ coinpare holdings --edit

An example configuration file may look:

[[holdings]]
amount = 1.0
name = "BTC"
price = 9000.0

[[holdings]]
amount = 5.0
name = "LTC"
price = 100.0

[[holdings]]
amount = 2.3
name = "BTC"
price = 5000.0

[[holdings]]
amount = 1000.0
name = "TRX"
price = 2.0

[settings]
base = "USD"
color = true
exchange = "CCCAGG"

Once configured, any subsequent execution of holdings command will display current prices and totals. For example, the before mentioned configuration file may produce the following result:

ViewHoldings

Similar to other commands, if you want to auto refresh data use --watch or -w flag:

$ coinpare holdings --watch
$ coinpare holdings -w

To finish watching for changes hold down Ctrl+C key combination.

4.2 Add/remove coins

Coinpare allows you to easily add and remove individual coins to and from your holdings portfolio.

To add a coin to your current portfolio use --add flag

$ coinpare holdings --add

For example, the following screenshot shows adding an ETH coin:

AddHoldings

To remove one or more coins from your current portfolio use --remove flag:

$ coinpare holdings --remove

You will be presented with a multi select menu that contains all current holdings similar to the one below:

RemoveHoldings

Finally, if you wish to clear all your holdings and start again use --clear flag:

$ coinpare holdings --clear

4.3 Pie charts

By default holdings are displayed in a table format. Alternatively, you can view your portfolio in a pie chart using the --pie or -p option which optionally accepts pie chart radius value:

$ coinpare holdings --pie

An example output:

HoldingsAsPieChart

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/piotrmurach/coinpare. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in the Coinpare project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Credits

All the data is obtained from CryptoCompare.

Copyright

Copyright (c) 2018 Piotr Murach. See GNU Affero General Public License v3.0 for further details.

More Repositories

1

tty

Toolkit for developing sleek command line apps.
Ruby
2,505
star
2

tty-prompt

A beautiful and powerful interactive command line prompt
Ruby
1,467
star
3

github

Ruby interface to GitHub API
Ruby
1,151
star
4

finite_machine

A minimal finite state machine with a straightforward syntax.
Ruby
807
star
5

pastel

Terminal output styling with intuitive and clean API.
Ruby
638
star
6

rspec-benchmark

Performance testing matchers for RSpec
Ruby
602
star
7

tty-spinner

A terminal spinner for tasks that have non-deterministic time frame.
Ruby
428
star
8

tty-progressbar

Display a single or multiple progress bars in the terminal.
Ruby
422
star
9

loaf

Manages and displays breadcrumb trails in Rails app - lean & mean.
Ruby
407
star
10

tty-command

Execute shell commands with pretty output logging and capture stdout, stderr and exit status.
Ruby
400
star
11

tty-markdown

Convert a markdown document or text into a terminal friendly output.
Ruby
307
star
12

tty-logger

A readable, structured and beautiful logging for the terminal
Ruby
294
star
13

github_cli

GitHub on your command line. Use your terminal, not the browser.
Ruby
266
star
14

tty-table

A flexible and intuitive table generator
Ruby
190
star
15

tty-box

Draw various frames and boxes in your terminal window
Ruby
183
star
16

awesome-ruby-cli-apps

A curated list of awesome command-line applications in Ruby.
Ruby
169
star
17

rack-policy

Rack middleware for the EU ePrivacy Directive compliance in Ruby Web Apps
Ruby
147
star
18

tty-pie

Draw pie charts in your terminal window
Ruby
140
star
19

necromancer

Conversion from one object type to another with a bit of black magic.
Ruby
135
star
20

strings

A set of useful functions for transforming strings.
Ruby
129
star
21

tty-exit

Terminal exit codes.
Ruby
99
star
22

strings-case

Convert strings between different cases.
Ruby
97
star
23

tty-reader

A set of methods for processing keyboard input in character, line and multiline modes.
Ruby
89
star
24

tty-screen

Terminal screen detection - cross platform, major ruby interpreters
Ruby
86
star
25

tty-option

A declarative command-line parser
Ruby
85
star
26

merkle_tree

A merkle tree is a data structure used for efficiently summarizing sets of data, often one-time signatures.
Ruby
82
star
27

verse

[DEPRECATED] Text transformations
Ruby
71
star
28

tty-cursor

Terminal cursor movement and manipulation of cursor properties such as visibility
Ruby
70
star
29

tty-file

File manipulation utility methods
Ruby
67
star
30

supervision

Write distributed systems that are resilient and self-heal.
Ruby
65
star
31

tty-config

A highly customisable application configuration interface for building terminal tools.
Ruby
63
star
32

tty-font

Terminal fonts
Ruby
60
star
33

benchmark-trend

Measure performance trends of Ruby code
Ruby
60
star
34

lex

Lex is an implementation of lex tool in Ruby.
Ruby
56
star
35

tty-tree

Print directory or structured data in a tree like format
Ruby
56
star
36

strings-truncation

Truncate strings with fullwidth characters and ANSI codes.
Ruby
50
star
37

slideck

Present Markdown-powered slide decks in the terminal.
Ruby
44
star
38

tty-pager

Terminal output paging - cross-platform, major ruby interpreters
Ruby
40
star
39

tty-color

Terminal color capabilities detection
Ruby
35
star
40

tty-link

Hyperlinks in your terminal
Ruby
32
star
41

strings-inflection

Convert between singular and plural forms of English nouns
Ruby
31
star
42

tty-platform

Operating system detection
Ruby
29
star
43

tty-sparkline

Sparkline charts for terminal applications.
Ruby
29
star
44

tty-editor

Opens a file or text in the user's preferred editor
Ruby
28
star
45

communist

Library for mocking CLI calls to external APIs
Ruby
25
star
46

splay_tree

A self-balancing binary tree optimised for fast access to frequently used nodes.
Ruby
24
star
47

equatable

Allows ruby objects to implement equality comparison and inspection methods.
Ruby
24
star
48

minehunter

Terminal mine hunting game.
Ruby
23
star
49

rotation.js

Responsive and mobile enabled jQuery plugin to help create rotating content.
JavaScript
22
star
50

strings-ansi

Handle ANSI escape codes in strings
Ruby
20
star
51

benchmark-malloc

Trace memory allocations and collect stats
Ruby
20
star
52

strings-numeral

Express numbers as string numerals
Ruby
20
star
53

tty-which

Cross-platform implementation of Unix `which` command
Ruby
19
star
54

benchmark-perf

Benchmark execution time and iterations per second
Ruby
13
star
55

tty-runner

A command routing tree for terminal applications
Ruby
12
star
56

queen

English language linter to hold your files in high esteem.
Ruby
8
star
57

impact

Ruby backend for Impact.js framework
Ruby
8
star
58

pastel-cli

CLI tool for intuitive terminal output styling
Ruby
7
star
59

dotfiles

Configuration files for Unix tools
Vim Script
7
star
60

tty-markdown-cli

CLI tool for displaying nicely formatted Markdown documents in the terminal
Ruby
6
star
61

static_deploy

Automate deployment of static websites
Ruby
6
star
62

tenpin

Terminal tenpin bowling game
Ruby
4
star
63

tty.github.io

TTY toolkit website.
SCSS
3
star
64

tytus

Helps you manage page titles in your Rails app.
Ruby
3
star
65

peter-murach.github.com

Personal webpage
JavaScript
2
star
66

wc.rb

A Ruby clone of Unix wc utility.
Ruby
2
star
67

exportable

Rails plugin to ease exporting tasks.
Ruby
1
star
68

capistrano-git-stages

Multistage capistrano git tags
Ruby
1
star
69

leek

Cucumber steps and RSpec expectations for command line apps
Ruby
1
star
70

tabster

Ruby
1
star
71

unicorn.github.io

Website for the github_api and github_cli ruby gems.
CSS
1
star
72

tty-color-cli

CLI tool for terminal color capabilities detection
Ruby
1
star
73

finite_machine.github.io

Website for finite_machine Ruby gem
SCSS
1
star
74

strings-wrapping

Wrap strings with fullwidth characters and ANSI codes
Ruby
1
star