This repository was archived by the owner on Oct 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,15 +20,27 @@ npm install node-binance-api --save
2020
2121#### Getting started
2222``` javascript
23- const Binance = require (' node-binance-api' );
24- const binance = new Binance ().options ({
23+ const binance = require (' node-binance-api' ).options ({
2524 APIKEY : ' <key>' ,
2625 APISECRET : ' <secret>' ,
2726 useServerTime: true , // If you get timestamp errors, synchronize to server time at startup
2827 test: true // If you want to use sandbox mode where orders are simulated
2928});
3029```
3130
31+ #### Instantiating Multiple Instances
32+ ``` javascript
33+ const Binance = require (' node-binance-api' );
34+
35+ const instance1 = new Binance ().options ({
36+ // ...
37+ });
38+
39+ const instance2 = new Binance ().options ({
40+ // ...
41+ });
42+ ```
43+
3244#### Getting latest price of a symbol
3345``` js
3446binance .prices (' BNBBTC' , (error , ticker ) => {
Original file line number Diff line number Diff line change 1313 */
1414let api = function Binance ( ) {
1515 'use strict' ;
16- if ( ! ( this instanceof Binance ) ) {
17- return new Binance ( ) ;
18- }
1916 const WebSocket = require ( 'ws' ) ;
2017 const request = require ( 'request' ) ;
2118 const crypto = require ( 'crypto' ) ;
You can’t perform that action at this time.
0 commit comments