Skip to content

Commit

Permalink
Merge branch 'release/1.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
benmarten committed Jan 13, 2018
2 parents c5796f9 + e2d656d commit 18c0ed3
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 20 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<a name="1.6.2"></a>
## [1.6.2](https://github.com/benmarten/CryptoETF/compare/1.6.1...1.6.2) (2018-01-13)


### Bug Fixes

* **binance:** fix binance integration ([b9953ab](https://github.com/benmarten/CryptoETF/commit/b9953ab))
* **sample:** fix sample ([787688e](https://github.com/benmarten/CryptoETF/commit/787688e))


### Features

* **ui:** colorize output; allow to hide exchanges below certain holding treshold ([deb858a](https://github.com/benmarten/CryptoETF/commit/deb858a))



<a name="1.6.1"></a>
## [1.6.1](https://github.com/benmarten/CryptoETF/compare/1.6.0...1.6.1) (2018-01-09)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CryptoETF
*DISCLAIMER: This tool neither is, nor should be construed as an offer, solicitation, or recommendation to buy or sell any cryptoassets.*

<img src="https://raw.githubusercontent.com/benmarten/CryptoETF/static/screenshot.jpg" width="1102">
<img src="https://raw.githubusercontent.com/benmarten/CryptoETF/static/screenshot.jpg" width="1200">
A CLI app, that pulls the cryptocoin balances from your exchanges and displayes your portoflio in comparison to the overall market. A recommendation is shown based on the ideal capitalization-weighted portfolio.

## Installation
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"testLocal": "./node_modules/.bin/nyc mocha --require babel-core/register test/**/*.js test/**/**/*.js",
"test": "NODE_ENV=test npm run testLocal"
},
"version": "1.6.1"
"version": "1.6.2"
}
2 changes: 1 addition & 1 deletion src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class Utils {
}

static colorize(string) {
if (string.startsWith('-')) {
if (string.indexOf('-') !== -1) {
return string.red
} else {
return string.green
Expand Down
1 change: 1 addition & 0 deletions src/model/Terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Portfolio from './Portfolio'
import Format from '../Format'
import * as Settings from '../Settings'
import {table} from 'table'
import colors from 'colors';

export default class Terminal {
/**
Expand Down
7 changes: 2 additions & 5 deletions src/model/integrations/BinanceWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ export default class BinanceWallet extends AbstractWallet {
* @prop data.free The amount.
*/
static _getBalanceForCredential(credential) {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
const binance = new Binance.BinanceRest(credential)
binance.account(function(err, account) {
if (err) {
return reject(err)
}
binance.account().then(function(account) {
let result = []
let balances = account.balances
for (let index in balances) {
Expand Down
25 changes: 14 additions & 11 deletions src/sample.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
import Portfolio from './model/Portfolio'
import Coinmarket from './model/Coinmarket'
import Coin from './model/Coin'
import Terminal from './model/Terminal'

async function refreshPortfolio() {
return new Promise(async (resolve) => {
try {
await Coinmarket.init()

Portfolio.addCoin(new Coin('BTC', 3, 'Coinbase'))
Portfolio.addCoin(new Coin('ETH', 20, 'Coinbase'))
Portfolio.addCoin(new Coin('BCH', 3, 'Poloniex'))
Portfolio.addCoin(new Coin('MIOTA', 100, 'Coinbase'))
Portfolio.addCoin(new Coin('XRP', 1000, 'Poloniex'))
Portfolio.addCoin(new Coin('LTC', 10, 'Coinbase'))
Portfolio.addCoin(new Coin('ADA', 200, 'Bittrex'))
Portfolio.addCoin(new Coin('DASH', 2, 'Poloniex'))
Portfolio.addCoin(new Coin('XMR', 10, 'Poloniex'))
Portfolio.addCoin(new Coin('XEM', 10, 'Poloniex'))
Portfolio.addCoin(new Coin('BTC', 1.5, 'Coinbase'))
Portfolio.addCoin(new Coin('ETH', 6.6, 'Coinbase'))
Portfolio.addCoin(new Coin('XRP', 2600, 'Poloniex'))
Portfolio.addCoin(new Coin('BCH', 1.14, 'Coinbase'))
Portfolio.addCoin(new Coin('ADA', 1779, 'Poloniex'))
Portfolio.addCoin(new Coin('XEM', 760, 'Coinbase'))
Portfolio.addCoin(new Coin('LTC', 5, 'Bittrex'))
Portfolio.addCoin(new Coin('XLM', 1471, 'Poloniex'))
Portfolio.addCoin(new Coin('MIOTA', 235, 'Poloniex'))
Portfolio.addCoin(new Coin('TRX', 6690, 'Poloniex'))

await Portfolio.addMissingCoins()
console.log(Portfolio.getOutput())

let portfolio = Portfolio.getPortfolio()
Terminal.printOutput(portfolio)
} catch (error) {
console.log(error)
console.log('Error getting data, retrying...')
Expand Down

0 comments on commit 18c0ed3

Please sign in to comment.