项目作者: johntitus

项目描述 :
Buy, sell, and find the best prices for crypto-currencies from multiple markets.
高级语言: JavaScript
项目地址: git://github.com/johntitus/coinx.git
创建时间: 2017-06-30T23:53:57Z
项目社区:https://github.com/johntitus/coinx

开源协议:MIT License

下载


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" class="reference-link">Install

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

Upgrade to the latest version" class="reference-link">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" class="reference-link">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.

  1. $ coinx config kraken
  2. ? Kraken API Key abcd
  3. ? Kraken API Secret efgh
  4. 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" class="reference-link"> Update

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

Coin Price" class="reference-link"> 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:

  1. $ coinx price btc
  2. Getting prices for BTC...
  3. Exchange Price in USD
  4. Liqui $2419.87
  5. Bitfinex $2429.68
  6. Poloniex $2431.92
  7. Bittrex $2442.46
  8. Kraken $2454.00
  9. Average $2435.59

Or, to get the price of Etherium:

  1. $ coinx price eth
  2. Getting prices for Ethereum (ETH)...
  3. Exchange Price in BTC Price in USD
  4. Liqui 0.08789270 $208.30
  5. Poloniex 0.08809500 $208.78
  6. Kraken 0.08811500 $208.82
  7. Bitfinex 0.08821900 $209.07
  8. Bittrex 0.08840483 $209.51
  9. Average 0.08814531 $208.89

Or, for Siacoin:

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

Check Exchange Funds" class="reference-link"> Check Exchange Funds

Check your balances on the exchanges.

  1. $ coinx funds
  2. Getting balances...
  3. Poloniex
  4. Name Symbol Count Value USD
  5. Bitcoin BTC 0.03227520 $76.51
  6. Siacoin SC 2465.11765598 $19.46
  7. NEM XEM 151.10258763 $18.43
  8. Dash DASH 0.09817530 $16.94
  9. ...

Options:

  1. $ coinx funds --help
  2. Options:
  3. -e, --exchange [name] Get balances at the specified exchange.
  4. -a, --alphabetically Sort the balance list alphabetically.
  5. -n, --numerically Sort the balance list by the number of coins, descending.
  6. -c, --coin [symbol] Only get balances for this coin.

For example, to check balances only on Liqui:

  1. $ coinx funds -e poloniex
  2. Getting balances on Liqui...
  3. Liqui
  4. Name Symbol Count Value USD
  5. Bitcoin BTC 0.02564645 $30.77
  6. Ethereum ETH 0.08706164 $18.04
  7. Augur REP 0.66674308 $13.59
  8. MobileGo MGO 17.23038495 $13.33
  9. ...

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

  1. $ coinx funds -c btc
  2. Getting balances...
  3. Poloniex
  4. Name Symbol Count Value USD
  5. Bitcoin BTC 0.00227520 $6.53
  6. Total $6.53
  7. Kraken
  8. Name Symbol Count Value USD
  9. Bitcoin BTC 0.00237879 $6.40
  10. Total $6.40
  11. Liqui
  12. Name Symbol Count Value USD
  13. Bitcoin BTC 0.00256464 $6.81
  14. Total $6.81

Buy Coins" class="reference-link"> 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:

  1. $ coinx buy ans -$ 2
  2. Checking AntShares (ANS) on the markets...
  3. Best price found on Bittrex at $8.14
  4. *Note that the number of coins may change slightly if the market fluctuates*
  5. ? Buy about 0.24562982 worth of ANS? Yes
  6. Buying...
  7. Order complete!
  8. Bittrex order number xxxxx-xxxxx-xxxxxxx
  9. Bought 0.2461696 ANS
  10. Worth about $2.00

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

  1. $ coinx buy eth -e liqui -$ 2
  2. Checking Ethereum (ETH) on the markets...
  3. Best price found on Liqui at $278.70
  4. *Note that the number of coins may change slightly if the market fluctuates*
  5. ? Buy about 0.00717629 worth of ETH? Yes
  6. Buying...
  7. Order complete!
  8. Liqui order number 0
  9. Bought 0.00717629 ETH
  10. Worth about $2.00

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

Sell Coins

Coming soon.

Lock" class="reference-link"> 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.

  1. coinx lock password

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

Unlock" class="reference-link">Unlock

Decrypt your API key file.

  1. coinx unlock password

Actions

Actions are a way to automate steps in coinx.

Buy all the Coins!" class="reference-link"> 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.

  1. $ coinx action buyallthecoins -$ 2 -t 50
  2. Buy all the coins!
  3. Spend per coin: $2
  4. Coins to buy: 50
  5. Maximum spend: $100 (assumes all coins available to buy)
  6. Will not buy: BTC, USDT, BCC, VERI
  7. ? Proceed? Yes
  8. Getting latest Market Cap list...
  9. Got list...
  10. Skipping excluded coin Bitcoin.
  11. Buying Ethereum.
  12. Checking Ethereum (ETH) on the markets...
  13. Best price found on Bittrex at $228.64
  14. Buying 0.00874752 Ethereum on Bittrex
  15. Order complete!
  16. Bittrex order number e2fffabd-915b-4d13-bf37-af534cf82af8
  17. Bought 0.00874747 ETH at 0.08268905 BTC per coin
  18. Worth about $2.00
  19. Buying Ripple.
  20. Checking Ripple (XRP) on the markets...
  21. Best price found on Bittrex at $0.20
  22. ...