Permalink
Browse files

migrate to num package over depricated decimal package

fixes #2
  • Loading branch information...
defunctzombie committed Aug 9, 2012
1 parent aacca6a commit faedeafaab8f75b473b9ba004e39aa684a08074c
Showing with 6 additions and 6 deletions.
  1. +2 −2 examples/midpoint_tracker.js
  2. +3 −3 lib/order/mtgox_rest.js
  3. +1 −1 package.json
@@ -5,7 +5,7 @@
var fs = require('fs');
// 3rd party
-var decimal = require('decimal');
+var num = require('num');
// library
var books = require('..').books;
@@ -56,7 +56,7 @@ var previous = [];
book.on('changed', function(details) {
var existing;
- var price = decimal(details.price);
+ var price = num(details.price);
var size = 0.1;
var side = details.side;
View
@@ -6,7 +6,7 @@ var querystring = require('querystring');
var crypto = require('crypto');
// 3rd party
-var decimal = require('decimal');
+var num = require('num');
var microtime = require('microtime');
var Trader = function(options) {
@@ -29,8 +29,8 @@ var Trader = function(options) {
/// callback(err, detail)
Trader.prototype.new_order = function(details, cb) {
var url = '/api/1/' + details.product_id + '/private/order/add';
- var price = decimal(details.price).mul(1e5).toString();
- var size = decimal(details.size).mul(1e8).toString();
+ var price = num(details.price).mul(1e5).toString();
+ var size = num(details.size).mul(1e8).toString();
var params = {
type: (details.side === 0) ? 'bid' : 'ask',
View
@@ -11,7 +11,7 @@
"dependencies": {
"microtime": "0.2.0",
"colors": "0.6.0-1",
- "decimal": "git://github.com/bitfloor/node-decimal.git#a3bb6f"
+ "num": "0.1.2"
},
"devDependencies": {}
}

0 comments on commit faedeaf

Please sign in to comment.