NodeJS Bit4You Client
Last updated a year ago by chainius-bit4you .
ISC · Original npm · Tarball · package.json
$ cnpm install @chainius/bit4you-client 
SYNC missed versions from official npm registry.

Official bit4you NodeJS client

Connect and interact with our platform through NodeJS. Create your own flows or analyse our markets by using this library.


A minimal example can be found in the example folder.

API Credentials

Create API credentials at: https://www.bit4you.io/settings/security

These are needed to use our API and therefor this library.

Environment variables

Use your created API credentials by setting following environment variables:

Variable Description
B4Y_CLIENT_ID Your CLIENT ID from your created credentials
B4Y_CLIENT_SECRET Your API KEY from your created credentials

This is optional, as you may also provide your credentials in the constructor (See example). But it is recommended to setup your configuration through environment variables.


The client has several methods that you may call to get different information through your credentials.

Method Description
userinfo() Info on the user that is authenticated through their API credentials.
scopes() Scopes the authenticated user has through their API credentials.
setSimulation(Boolean) (synchronous) Set the mode on simulation/real for your api calls.
setSimulation(Boolean) (synchronous) Set the mode on simulation/real for your api calls.
markets() Get all markets information and current value
summaries() Get ticker/current information for all markets
ticks(market, interval) Get historical information for a certain market
openOrders() Get your current OPEN positions
portfolio() Get your current FILLED positions
portfolioHistory() Get a history for your portfolio
balances() Get your balance for all assets
cancelOrder(id) Close a position that is not completely filled.
closePosition(id) Close a filled position seen in your portfolio (by its order ID)
buy(market, quantity, rate) Create a buy position for a specific asset
transactions(iso) Get a list of your transaction for a specific asset
withdraw(iso, quantity, address) External withdraw of your fund of a certain asset

Current Tags

  • 0.0.2                                ...           latest (a year ago)

2 Versions

  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 2
Dependencies (6)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |