n0mad01 / node.bittrex.api

No longer maintained
MIT License
183 stars 187 forks source link

Any ways to get fresh data every given period? #73

Open FabioEnne opened 7 years ago

FabioEnne commented 7 years ago

I'm trying to get fresh data of all the markets (highest, lowest, actual) but at every given period, is there any way to achieve this? By using websocket or api calls? Thanks a lot. I've tryeid something like this:

setInterval(function(){
    console.log("---");
    bittrex.websockets.listen( function( data ) {
          if (data.M === 'updateSummaryState') {
            data.A.forEach(function(data_for) {
              data_for.Deltas.forEach(function(marketsDelta) {
                console.log('Ticker Update for '+ marketsDelta.MarketName, marketsDelta);
              });
            });
          }
        });
},300000);

but once is triggered it keeps on dumping data, I need latest fresh data but only every 5 minutes..

FLYBYME commented 6 years ago

Just do an API cannot and not use the socket.