Open elaarabi opened 4 years ago
hey, did you solve it out? i'm having the same problem
it seems like the function "binance.websockets.userData" doesn't work any more. I solved it this way:
const signature = crypto.createHmac('sha256', ${process.env.BINANCE_SECRETKEY}
).update('').digest('hex');
const streamingKey = await axios.post('https://testnet.binancefuture.com/fapi/v1/listenKey', signature=${signature}
, {headers: {'X-MBX-APIKEY': ${process.env.BINANCE_APIKEY}
,'content-type': 'application/x-www-form-urlencoded'}});
binance.futuresSubscribe( streamingKey.data.listenKey, console.log ); //function of "jaggedsoft / node-binance-api"
becareful with de base url, en this code i used de tesnet base
you just use it wrong, its working in 0.13.0
function order_update(data) {
console.log(data)
}
binance.websockets.userData(order_update, true);
Hello, The userData function callbacks are no longer working in my code !
Here is the code i am using :
binance.websockets.userData(function (data) { console.log("balance_update"); self.balance_update(data); }, function (data) { console.log("execution_update"); self.execution_update(data); });
PS: this was working before just fine !