binance-exchange/node-binance-api

Missing TickerPrice for group of coins after several successful fetches...

mcginnik opened this issue · 6 comments

binance.prices(...) not always successful

  • bug: Missing prices for these coins every once in a while (every 10 minutes or so after dozens of successful fetches, spaced every 10 seconds or so...

refreshBalancesForCoins: NO TickerPrice for DLT...
refreshBalancesForCoins: NO TickerPrice for ARN...
refreshBalancesForCoins: NO TickerPrice for BCPT...
refreshBalancesForCoins: NO TickerPrice for LUN...
refreshBalancesForCoins: NO TickerPrice for BCD...
refreshBalancesForCoins: NO TickerPrice for VIA...
refreshBalancesForCoins: NO TickerPrice for WINGS...
refreshBalancesForCoins: NO TickerPrice for AMB...
refreshBalancesForCoins: NO TickerPrice for OST...
refreshBalancesForCoins: NO TickerPrice for NAV...
refreshBalancesForCoins: NO TickerPrice for GVT...
refreshBalancesForCoins: NO TickerPrice for NEBL...
refreshBalancesForCoins: NO TickerPrice for BAT...
refreshBalancesForCoins: NO TickerPrice for DGD...
refreshBalancesForCoins: NO TickerPrice for NANO...
refreshBalancesForCoins: NO TickerPrice for XMR...

All other coin prices are fine... just these specific ones are missing.

  • feature: please add
  • enhancement: add this to existing features

Short Description:

  • Bad fetches from binance.prices()

Platform:

  • macos

node version:

  • 9.3.0

Long descrption

  • binance.prices((error, ticker) => {
    })

Works fine most of the time, but every 100 times or so it misses the same coins:

refreshBalancesForCoins: NO TickerPrice for DLT...
refreshBalancesForCoins: NO TickerPrice for ARN...
refreshBalancesForCoins: NO TickerPrice for BCPT...
refreshBalancesForCoins: NO TickerPrice for LUN...
refreshBalancesForCoins: NO TickerPrice for BCD...
refreshBalancesForCoins: NO TickerPrice for VIA...
refreshBalancesForCoins: NO TickerPrice for WINGS...
refreshBalancesForCoins: NO TickerPrice for AMB...
refreshBalancesForCoins: NO TickerPrice for OST...
refreshBalancesForCoins: NO TickerPrice for NAV...
refreshBalancesForCoins: NO TickerPrice for GVT...
refreshBalancesForCoins: NO TickerPrice for NEBL...
refreshBalancesForCoins: NO TickerPrice for BAT...
refreshBalancesForCoins: NO TickerPrice for DGD...
refreshBalancesForCoins: NO TickerPrice for NANO...
refreshBalancesForCoins: NO TickerPrice for XMR...

code

const util = require('util');
const binance = require('node-binance-api');
binance.options({
  APIKEY: '<key>',
  APISECRET: '<secret>',
  useServerTime: true, // If you get timestamp errors, synchronize to server time at startup
  test: true // If you want to use sandbox mode where orders are simulated
});

util.inspect( binance );

result

{
   "result":"result"
}

thank you

This is strange, I have not noticed this behavior
The only time I had anything close was when I was reading from JSON files that weren't done writing to disk

Do you have any kind of error reporting?

binance.prices((error, ticker) => {
if ( error ) return console.error(error);
})

It doesn't look like any error is reported. Most of the ticker data is still there, I'm only missing those specific coins when it acts strangely...

This issue only started yesterday from what I've seen... i've been watching my logs closely and only just noticed it last night. I also tried an old version of my code where I had never seen it before and noticed it there too, so it seems like something changed either with Binance or the api.

Here's an update. I haven't seen the same issue for the last day and a half. It may have been on the Binance side where those specific coin prices weren't being fetched... I'll keep an eye out for it though and update if I see it again.

Thanks for the update. Please let me know if anything changes

There's nothing reasonable I can really do since it's coming like this from binance

Suggest using miniTicker instead