xBalance is a node.js app for getting your accounts balance from multiple cryptocurency exchanges.
The application code is shared on github at https://github.com/dutu/xBalance/
- How it works
- Why using statistical calculation is more efficient
- Setting up the application
- Running locally
- Running on Heroku
- Updating the application
- Running locally
- Running on Heroku
- FAQ
- License
xBalance is:
- an open source application
- runs on node.js
- can either run locally on your computer or can be hosted on a cloud platform (e.g. Heroku).
The application gets the balance of your accounts from multiple cryptocurency exchanges.
Exchange name or wallet | slug [1] | Authentication |
---|---|---|
Bitfinex | "bitfinex" |
key , secret |
Bitstamp | "bitstamp" |
key , secret , username |
BitX | "bitx" |
key , secret |
Gdax | "gdax" |
key , secret , passphrase |
Poloniex | "poloniex" |
key , secret |
BTC wallet | "BTC wallet" |
- |
[1] values to be used for
exchange
in theaccount.js
file (see step 5 below)
-
Clone
xBalance
application source code from github:$ git clone https://github.com/dutu/xBalance.git $ cd xBalance
-
Install the dependencies, preparing your system for running the app locally:
npm install
-
Setup accounts name and API keyes for your accounts : Rename the file
accounts-template.js
toaccounts.js
, then update the file with your own values -
Start the app locally:
npm start
-
Get your balances by opening http://localhost:4000/ with your internet browser
-
Get your balances raw data by opening http://localhost:4000/api/getBalances with your internet browser
-
Create a Heroku account if you don't have one already](http://www.heroku.com)
-
Download and install the Heroku Toolbelt Once installed, you'll have access to the heroku command from your command shell.
-
Log into Heroku:
$ heroku login
-
Clone
xBalance
application source code from github:$ git clone https://github.com/dutu/xBalance.git $ cd xBalance
-
Setup accounts name and API keyes for your accounts : Rename the file
accounts-template.js
toaccounts.js
, then update the file with your own values -
Create an app on Heroku and deploy the code
$ heroku create $ git push heroku master $ heroku ps:scale web=0 xBalance=0
-
Provision the papertrail logging add-on
$ heroku addons:create papertrail
Note: To help with abuse prevention, Heroku requires account verification for provisioning an add-on . If your account has not been verified, you will be directed to visit the verification site.
-
Open the papertrail console to see the log messages.
$ heroku addons:open papertrail
Note: Keep the papertrail console open to monitor progress
-
Start the application
heroku ps:scale xBalance=1
-
Upgrade your application to Hobby (optional)
Note: By default the Heroku applications run on Free dyno. See: https://www.heroku.com/pricing
Updating the application when xBalance code is updated on github
-
Stop the xBalance application with
CTRL+C
-
Update the local clone from github
$ cd xBalance $ git pull origin master
-
Update dependencies:
npm update
-
Start the app locally:
npm start
Note: If you are requested to update node.js version, please do so by downloading and installing the applicable version. Go to https://nodejs.org.
-
Update the local clone from github
$ cd xBalance $ git pull origin master
-
Open the papertrail console to see the log messages
$ heroku addons:open papertrail
-
Deploy updated code to heroku
$ git push heroku master
The application will restart automatically with the newly deployed code
Q1: Can you add support for new exchnges
A1: Yes, please contact me by e-mail or raise an issue on github.