Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit c9f3987

Browse files
committed
Instructions to Instantiate or use Singleton
1 parent 5b9cbef commit c9f3987

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff 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
3446
binance.prices('BNBBTC', (error, ticker) => {

0 commit comments

Comments
 (0)