npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

coinx

v0.11.2

Published

Buy and sell crypto-currencies from the command line.

Readme

coinx

A command-line tool to interact with multiple crypto-currencies exchanges. Buy, sell, find the best price, and check your exchange balances.

Setup

Usage

Security

Automation

Install

Install it globally on your computer. npm install -g coinx

Upgrade to the latest version

Coinx is currently at version 0.10.0 You can upgrade with npm: npm update -g coinx

Supported Exchanges

Currently: Kraken, Poloniex, Bitfinex, Liqui, Bittrex.

Configure

The tool uses your exchange API keys to make requests and queries. You'll have to get your API keys from each exchange manually, but then you can store it in the tool by using the config command.

$ coinx config kraken
? Kraken API Key abcd
? Kraken API Secret efgh
Saved data for Kraken

Note: Your API Keys and Secrets are stored in your operating system home directory in a coinx directory as a JSON file.

Update

Use coinx update to update coinx with the latest list of coins from coinmarketcap.com.

Coin Price

Get the price of any crypto-currency by using the coin's symbol. Bitcoin is shown in US Dollars, all other coins are shown in BTC and in US Dollars.

For example, to get the price of Bitcoin:

$ coinx price btc
Getting prices for BTC...
Exchange Price in USD
Liqui        $2419.87
Bitfinex     $2429.68
Poloniex     $2431.92
Bittrex      $2442.46
Kraken       $2454.00
                     
Average      $2435.59

Or, to get the price of Etherium:

$ coinx price eth
Getting prices for Ethereum (ETH)...
Exchange Price in BTC Price in USD
Liqui      0.08789270      $208.30
Poloniex   0.08809500      $208.78
Kraken     0.08811500      $208.82
Bitfinex   0.08821900      $209.07
Bittrex    0.08840483      $209.51
                                  
Average    0.08814531      $208.89

Or, for Siacoin:

$ coinx price sc
Getting prices for Siacoin (SC)...
Exchange Price in BTC Price in USD
Bittrex    0.00000335        $0.01
Poloniex   0.00000333        $0.01
                                  
Average    0.00000334        $0.01

Check Exchange Funds

Check your balances on the exchanges.

$ coinx funds
Getting balances...
Poloniex
Name             Symbol          Count Value USD
Bitcoin          BTC        0.03227520    $76.51
Siacoin          SC      2465.11765598    $19.46
NEM              XEM      151.10258763    $18.43
Dash             DASH       0.09817530    $16.94

...

Options:

$ coinx funds --help
Options:

    -e, --exchange [name]  Get balances at the specified exchange.
    -a, --alphabetically   Sort the balance list alphabetically.
    -n, --numerically      Sort the balance list by the number of coins, descending.
    -c, --coin [symbol]    Only get balances for this coin.

For example, to check balances only on Liqui:

$ coinx funds -e poloniex
Getting balances on Liqui...
Liqui
Name                  Symbol        Count Value USD
Bitcoin               BTC      0.02564645    $30.77
Ethereum              ETH      0.08706164    $18.04
Augur                 REP      0.66674308    $13.59
MobileGo              MGO     17.23038495    $13.33
...

Or, to check how many BTC you have on all the exchanges:

$ coinx funds -c btc
Getting balances...
Poloniex
Name    Symbol      Count Value USD
Bitcoin BTC    0.00227520    $6.53
Total                        $6.53
Kraken
Name    Symbol      Count Value USD
Bitcoin BTC    0.00237879    $6.40
Total                        $6.40
Liqui
Name    Symbol      Count Value USD
Bitcoin BTC    0.00256464    $6.81
Total                        $6.81

Buy Coins

Buy a coin by specifying, in US dollars, how much you want to spend. Note that BTC is what will actually be spent! You must have the necessary BTC available on the exchange for the purchase to go through.

Coinx will automatically use the exchange with the best rate, unless you specify an exchange to use via the --exchange option.

Before the purchase goes through, you'll be asked to confirm.

For example, to buy $2 worth of AntShares at the best available price:

$ coinx buy ans -$ 2
Checking AntShares (ANS) on the markets...
Best price found on Bittrex at $8.14

*Note that the number of coins may change slightly if the market fluctuates*
? Buy about 0.24562982 worth of ANS? Yes
Buying...
Order complete!
Bittrex order number xxxxx-xxxxx-xxxxxxx
Bought 0.2461696 ANS
Worth about $2.00

Or, to buy $2 worth of Ethereum on the Liqui exchange:

$ coinx buy eth -e liqui -$ 2
Checking Ethereum (ETH) on the markets...
Best price found on Liqui at $278.70

*Note that the number of coins may change slightly if the market fluctuates*

? Buy about 0.00717629 worth of ETH? Yes
Buying...
Order complete!
Liqui order number 0
Bought 0.00717629 ETH
Worth about $2.00

The results of all purchases are logged into {home folder}/coinx/log.csv.

Sell Coins

Coming soon.

Lock

Encrypt the file that contains your API keys. Please choose a good password, and don't forget it. If you do forget it, you'll have to delete the coinx.json file in your {homedir}/coinx folder, and rerun coinx config for each exchange.

coinx lock password

After you lock your config, you will not be able to use coinx until you unlock it.

Unlock

Decrypt your API key file.

coinx unlock password

Actions

Actions are a way to automate steps in coinx.

Buy all the Coins!

Lets you buy the top crypto coins by market cap. Specify how much you want to spend per coin (-$), and how many coins you want to buy (-t, default is 50).

You can exclude coins by putting their symbol into the exclude_coins.txt in the actions/buyallthecoins folder.

$ coinx action buyallthecoins -$ 2 -t 50
Buy all the coins!
Spend per coin: $2
Coins to buy: 50
Maximum spend: $100 (assumes all coins available to buy)
Will not buy:  BTC, USDT, BCC, VERI
? Proceed? Yes
Getting latest Market Cap list...
Got list...
Skipping excluded coin Bitcoin.

Buying Ethereum.
Checking Ethereum (ETH) on the markets...
Best price found on Bittrex at $228.64
Buying 0.00874752 Ethereum on Bittrex
Order complete!
Bittrex order number e2fffabd-915b-4d13-bf37-af534cf82af8
Bought 0.00874747 ETH at 0.08268905 BTC per coin
Worth about $2.00

Buying Ripple.
Checking Ripple (XRP) on the markets...
Best price found on Bittrex at $0.20
...