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

Commit

Permalink
Better useServerTime example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Eyrick committed Sep 22, 2018
1 parent 2a04972 commit 019e819
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ binance.balance((error, balances) => {
console.log("balances()", balances);
console.log("ETH balance: ", balances.ETH.available);
});
// If you have problems with this function,
// see Troubleshooting at the bottom of this page.
```
<details>
<summary>View Response</summary>
Expand Down Expand Up @@ -1624,17 +1626,6 @@ set socks_proxy=socks://ip:port
### Troubleshooting
Verify that your system time is correct. If you have any suggestions don't hestitate to file an issue.

Problems getting your balance? Wrap the entry point of your application in useServerTime:
```js
binance.useServerTime(function() {
binance.balance((error, balances) => {
if ( error ) return console.error(error);
console.log("balances()", balances);
console.log("BNB balance: ", balances.BNB.available);
});
});
```

Having problems? Try adding `useServerTime` to your options or setting `recvWindow`:
```js
binance.options({
Expand All @@ -1649,6 +1640,17 @@ binance.options({
});
```

Problems getting your balance? Wrap the entry point of your application in useServerTime:
```js
binance.useServerTime(function() {
binance.balance((error, balances) => {
if ( error ) return console.error(error);
console.log("balances()", balances);
console.log("BNB balance: ", balances.BNB.available);
});
});
```

[![Views](http://hits.dwyl.io/jaggedsoft/node-binance-api.svg)](http://hits.dwyl.io/jaggedsoft/node-binance-api)

Thank you to all contributors: dmzoneill, dmitriz, keith1024, usama33, yanislk, learnathoner, vaielab, nickreese, Tuitio, grandmore, itnok, CollinEstes, sethyx, mstijak, MadDeveloper, balthazar, bitoiu, matthewwoop, robaleman, hems and others!

0 comments on commit 019e819

Please sign in to comment.