<commit_before>var Bitstamp = require('./Bitstamp');

var ws = new Bitstamp({
  // force encrypted socket session
  encrypted: true,

  // BTC/USD market:
  live_trades: true,
  order_book: false,
  diff_order_book: false,

  // BTC/EUR market:
  live_trades_btceur: false,
  order_book_btceur: false,
  diff_order_book_btceur: false
});

console.log('listening to new trades..');

ws.on('trade', function(trade) {
  console.log('new trade:', trade);
});


// if you enabeld `order_book` and/or `diff_order_book`

ws.on('data', function(data) {
  console.log('new order book event:', data);
});


// if you enabeld `live_trades_btceur`, `order_book_btceur` and/or `diff_order_book_btceur`

// ws.on('trade', function(data) {
//   console.log('new trade:', data);
// });
// ws.on('data', function(data) {
//   console.log('new order book event:', data);
// });<commit_msg>update example<commit_after>var Bitstamp = require('./Bitstamp');

var ws = new Bitstamp({
  // force encrypted socket session
  encrypted: true,

  // BTC/USD market:
  live_trades: true,
  order_book: true,
  diff_order_book: true,

  // BTC/EUR market:
  live_trades_btceur: false,
  order_book_btceur: false,
  diff_order_book_btceur: false
});

// if you enabeld `live_trades` or `live_trades_btceur`

console.log('listening to new trades..');
ws.on('trade', function(trade) {
  console.log('new trade:', trade);
});


// if you enabeld `order_book`, `diff_order_book`,
// `order_book_btceur` and/or `diff_order_book_btceur`.

console.log('listening to new order book events..');
ws.on('data', function(data) {
  console.log('new order book event:', data);
});
{'fraction_non_alphanumeric': 0.16442542787286063, 'fraction_numerical': 0.0, 'mean_word_length': 4.314935064935065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4753277', 'n_tokens_mistral': 628, 'n_tokens_neox': 601, 'n_words': 136}