n0mad01 / node.bittrex.api

No longer maintained
MIT License
183 stars 187 forks source link

bittrex.websockets.listen.example.js timing #27

Closed Janti87 closed 7 years ago

Janti87 commented 7 years ago

How to run below each 0.3-0.5 second but same time to get all pairs.

t bittrex = require('../node.bittrex.api');

const websocketsclient = 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);
      });
    });
  }
});
n0mad01 commented 7 years ago

i don't understand what you are trying to do.

websockets is a full duplex message based communication protocol which means that you receive data whenever it gets "pushed" by bittrex.

you could make use of the standard requests but i would not recommend to request too often, otherwise you'll get banned.

see https://bitcoin.stackexchange.com/a/55163/31585

Janti87 commented 7 years ago

See, I know when some pumps will happen, so I need this code to work within milliseconds, within 2-3 seconds pump is becoming dump, will not work

What do you think about this?

On Jul 16, 2017, at 1:56 PM, Adrian Soluch notifications@github.com wrote:

i don't understand what you are trying to do.

websockets is a full duplex message based communication protocol which means that you receive data whenever it gets "pushed" by bittrex.

you could make use of the standard requests but i would not recommend to request too often, otherwise you'll get banned.

see https://bitcoin.stackexchange.com/a/55163/31585

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

n0mad01 commented 7 years ago

i still have no idea which usecases you are adressing, so i can't help you with that.

regarding latency you should contact bittrex.