binance-exchange/node-binance-api

Version 0.4.26 - Cannot read property '**filter**' of undefined

marselx opened this issue · 11 comments

C:\www\laravel\node_modules\node-binance-api*node-binance-api.js:915*
context.messageQueue = context.messageQueue.filter(depth => depth.u > context.snapshotUpdateId);
^

TypeError: Cannot read property 'filter' of undefined
at C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:915:69
at Request._callback (C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:66:20)
at Request.self.callback (C:\www\laravel\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\www\laravel\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\www\laravel\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)


Same codes working very well 0.4.25 version ....

Good luck !

now my old versions giving errors too :(

I updated then all my system destroyed :( - i get back old version now not working too.. I don't understand ...

All was good .....

$ node markets.js
Server started....
Waiting connectin from //laravel.bitex
Listening port: 2121
C:\www\laravel\markets.js:55
for ( let obj of prevDay ) {
^

TypeError: prevDay is not iterable
at binance.prevDay (C:\www\laravel\markets.js:55:20)
at C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:696:49

I can confirm everything is working properly for me. Try adding some error messages / running this test code:

binance.prevDay(false, (error, prevDay) => {
	if ( error ) return console.error("prevDay error: ", error);
	for ( let obj of prevDay ) {
		let symbol = obj.symbol;
		console.log(symbol+" volume:"+obj.volume+" change: "+obj.priceChangePercent+"%");
	}
});

Is your system time set correctly? If not you will need to try the useServerTime option

body: '{"code":-1003,"msg":"Way too many requests; IP banned until 1522523427617. Please use the websocket for live updates to avoid bans."}' }

There was no any problem - system was working really so so good - last 4 days worked no any error really was so good ...

I updated then BLOCK I think

How i will tun back to my old system I don't know .. I have no back-up files :(

Starting system...

My system getting all data from all coins on binance.. it was really worked so so super until to update . now old files to not working , it's interesting . Binance did any update on their side ?

Getting data several times ... Then blocking to me :(

$ node markets.js
Server started....
Waiting connectin from //laravel.bitex
Listening port: 2121
Here...
Here...
Here...
Here...
Here...
Here...
Here...
Here...
Here...
Here...
C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:915
context.messageQueue = context.messageQueue.filter(depth => depth.u > context.snapshotUpdateId);
^

TypeError: Cannot read property 'filter' of undefined
at C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:915:69
at Request._callback (C:\www\laravel\node_modules\node-binance-api\node-binance-api.js:64:24)
at Request.self.callback (C:\www\laravel\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\www\laravel\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\www\laravel\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)

Hello again...

I turn to version "# v0.4.24" extract from ZIP file, then all is working normal like as old times....

I love this warn so much.... These are not important - important is IP not blocking ans system working ....

Here...
Here...
[ 'depthHandler :STORJBTC: Unexpected first depth event. Skipping. !! IF this pe
rsists, the "STORJBTC" cache is OUT OF SYNC !! ' ]
[ 'depthHandler :ZECBTC: Unexpected first depth event. Skipping. !! IF this pers
ists, the "ZECBTC" cache is OUT OF SYNC !! ' ]
[ 'depthHandler :AMBBTC: Unexpected first depth event. Skipping. !! IF this pers
ists, the "AMBBTC" cache is OUT OF SYNC !! ' ]
[ 'depthHandler :MANABTC: Unexpected first depth event. Skipping. !! IF this per

[ 'depthHandler :STORMBTC: Unexpected first depth event. Skipping. !! IF this pe
rsists, the "STORMBTC" cache is OUT OF SYNC !! ' ]
Here...
Here...

I wrote this and BANNED again....

I don't understand what happening there....

binance.options({
APIKEY: process.env.BINANCE_APIKEY,
APISECRET: process.env.BINANCE_APISECRET,
useServerTime: process.env.BINANCE_USESERVERTIME, // If you get timestamp errors, synchronize to server time at startup
//test: process.env.BINANCE_TEST, // If you want to use sandbox mode where orders are simulated
'reconnect': true
});

serverTime options I have too ... I don't understand what happening ....

I checked task manager, there was looks like working node 5 different process, I killed them all , i will try again after my penalty time ....

I turn to version "# v0.4.24" extract from ZIP file, then all is working normal like as old times....

Looks like working for now ...

I hope keep will work.

Please check last version about requesting sizes .... I think there is some ISSUE on last version

BANNED is from making too many requests. Slow down your program so you don't make so many requests when you first start it if this keeps up. Otherwise, wait an hour or two and try again.

mate but you are forgetting this .. same codes working with version v0.4.24 very well ...

now Im working with old version v0.4.24 ( there is miniTicker too ) working fine