Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Auditoria ANUBIS
- * Bruno da Silva
- */
- const api = require('binance');
- const binanceRest = new api.BinanceRest({
- key: 'BvrJWAYFrR7UCsNHWyW7hmnUB8vfgIeW07H75xiMeCoBOdFu2k955kRTqrHfzBsX',
- secret: 'oYnqXHkj6fNEk9ARTab3QFXmI96eW9jW3Ozd7LRJowOKeUVzbECCfKhWHnP4izZA',
- timeout: 15000,
- recvWindow: 10000,
- disableBeautification: false,
- handleDrift: false
- });
- const binanceWS = new api.BinanceWS(true);
- binanceRest.account(function(error, data) {
- for(var i in data.balances) {
- if(data.balances[i].locked > 0 || data.balances[i].free > 0) {
- console.log(data.balances[i]);
- }
- }
- });
- binanceRest.depositHistory({asset:'BTC'}, function(error, data) {
- var total = 0.0;
- for(var i in data.depositList) {
- total += data.depositList[i].amount;
- }
- console.log('Total depositos BTC ' , total);
- });
- binanceRest.withdrawHistory({asset:'BTC'}, function(error, data) {
- var total = 0.0;
- for(var i in data.withdrawList) {
- total += data.withdrawList[i].amount;
- }
- console.log('Total retiradas BTC ' , total);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement