<commit_before>var MtGoxClient = require("mtgox-apiv2");
var util = require('../util.js');
var _ = require('underscore');

var Trader = function(config) {
  if(_.isObject(config)) {
    this.key = config.key;
    this.secret = config.secret;
  }
  this.name = '<NAME>';

  _.bindAll(this);

  this.mtgox = new MtGoxClient(this.key, this.secret);
}

Trader.prototype.trade = function(what) {
  if(what !== 'BUY' && what !== 'SELL')
    return;

  log.info('NOW going to', what, '@', this.name);
  if(what === 'BUY')
    this.mtgox.add('bid', 1000);
  if(what === 'SELL')
    this.mtgox.add('ask', 1000);
}

Trader.prototype.getTrades = function(since, callback) {<commit_msg>fixed bug in mtgox code<commit_after>var MtGoxClient = require("mtgox-apiv2");
var util = require('../util.js');
var _ = require('underscore');
var log = require('../log.js');

var Trader = function(config) {
  if(_.isObject(config)) {
    this.key = config.key;
    this.secret = config.secret;
  }
  this.name = '<NAME>';

  _.bindAll(this);

  this.mtgox = new MtGoxClient(this.key, this.secret);
}

Trader.prototype.trade = function(what) {
  if(what !== 'BUY' && what !== 'SELL')
    return;

  log.info('NOW going to', what, '@', this.name);
  if(what === 'BUY')
    this.mtgox.add('bid', 1000);
  if(what === 'SELL')
    this.mtgox.add('ask', 1000);
}

Trader.prototype.getTrades = function(since, callback) {
{'fraction_non_alphanumeric': 0.20431654676258992, 'fraction_numerical': 0.012949640287769784, 'mean_word_length': 3.8131487889273354, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3053521', 'n_tokens_mistral': 552, 'n_tokens_neox': 519, 'n_words': 99}