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 efghSaved data
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 btcGetting prices
Or, to get the price of Etherium:
$ coinx price ethGetting prices
Or, for Siacoin:
$ coinx price scGetting prices
Check Exchange Funds
Check your balances on the exchanges.
$ coinx fundsGetting balances...PoloniexName Symbol Count Value USDBitcoin BTC 0.03227520 $76.51Siacoin SC 2465.11765598 $19.46NEM XEM 151.10258763 $18.43Dash DASH 0.09817530 $16.94 ...
Options:
$ coinx funds --helpOptions: -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 example, to check balances only on Liqui:
$ coinx funds -e poloniexGetting balances on Liqui...LiquiName Symbol Count Value USDBitcoin BTC 0.02564645 $30.77Ethereum ETH 0.08706164 $18.04Augur REP 0.66674308 $13.59MobileGo MGO 17.23038495 $13.33...
Or, to check how many BTC you have on all the exchanges:
$ coinx funds -c btcGetting balances...PoloniexName Symbol Count Value USDBitcoin BTC 0.00227520 $6.53Total $6.53KrakenName Symbol Count Value USDBitcoin BTC 0.00237879 $6.40Total $6.40LiquiName Symbol Count Value USDBitcoin BTC 0.00256464 $6.81Total $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 -$ 2Checking AntShares on the markets...Best price found on Bittrex at $8.14 *Note that the number of coins may change slightly
Or, to buy $2 worth of Ethereum on the Liqui exchange:
$ coinx buy eth -e liqui -$ 2Checking Ethereum on the markets...Best price found on Liqui at $278.70 *Note that the number of coins may change slightly
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
...