1.0.2 • Published 6 years ago

bluebit v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Bluebit module

Use to interact with Bluebit over the API

Installation

npm i --save bluebit

Or by using yarn

yarn add bluebit

Use

First, you should create an instance of bluebird by using new Bluebit() and pass your auth details. To improve your security we recommend:

  • The api_key put inside your source-code
  • The passpharse put in an enviroment variable.
  • The private_key in a file in a secure storage.

    	var Bluebit=require('bluebit')
    	var bluebit=Bluebit({
    		private_key:'your_private_key',
    		passphrase:	'your_passpharse',
    		api_key:	'your_api_key'
    	})
    
    	bluebit.get_orders().then(orders=>{
    		console.log('My Active oOrders:',orders)
    	})

Promises

All bluebit functions returning a promises. We recommend using async/await syntax

var Bluebitp({public_key:'...',passpharse:'...',api_key:'...'})
init().then(()=>{
	process.exit()
}).catch(e=>{
	throw e
})

async init(){
	await bluebit.get_orders()
})
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago