Advertisement
Guest User

Untitled

a guest
Jun 10th, 2019
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 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. var obtdata = binanceRest.bookTicker({
  25. symbol: 'BTCUSDT'})
  26.  
  27. var symbol = obtdata.symbol
  28. var bidPrice =obtdata.bidPrice
  29. var bidQty =obtdata.bidQty
  30. var askPrice =obtdata.askPrice
  31. var askQty =obtdata.askQty
  32.  
  33. console.log(askPrice);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement