Advertisement
Guest User

Untitled

a guest
Jun 10th, 2019
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. const api = require('binance');
  2. const binanceRest = new api.BinanceRest({
  3. key: '', // Get this from your account on binance.com
  4. secret: '', // Same for this
  5. timeout: 15000, // Optional, defaults to 15000, is the request time out in milliseconds
  6. recvWindow: 10000, // Optional, defaults to 5000, increase if you're getting timestamp errors
  7. disableBeautification: false,
  8. /*
  9. * Optional, default is false. Binance's API returns objects with lots of one letter keys. By
  10. * default those keys will be replaced with more descriptive, longer ones.
  11. */
  12. handleDrift: true
  13. /* Optional, default is false. If turned on, the library will attempt to handle any drift of
  14. * your clock on it's own. If a request fails due to drift, it'll attempt a fix by requesting
  15. * binance's server time, calculating the difference with your own clock, and then reattempting
  16. * the request.
  17. */
  18. });
  19.  
  20.  
  21.  
  22. //determining maximum quantity
  23.  
  24. binanceRest.bookTicker({
  25. symbol: 'BTCUSDT',
  26.  
  27. })
  28. .then((data) => {
  29. console.log(data);
  30. })
  31. .catch((err) => {
  32. console.error(err);
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement