Advertisement
Guest User

mtgox_api sample

a guest
Jul 29th, 2011
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mtgoxAPI = require('./mtgox_api');
  2. var util = require('util');
  3. var mtgox = new mtgoxAPI({key : 'blabla', secret : 'blabla'});
  4.  
  5. mtgox.getBalance({
  6.     data : function(data) {
  7.         console.log('balance: ' + util.inspect(data));
  8.     }
  9. });
  10.  
  11. mtgox.getOrders({
  12.     stable : true,
  13.     data : function (o) {
  14.         console.log(util.inspect(o));
  15.     }
  16. });
  17.    
  18. mtgox.getDepth({
  19.     data : function(data) {
  20.         console.log('depth: ' + util.inspect(data));
  21.     },
  22.     error : function(e) {
  23.         console.error('oh noooo: ' + e);
  24.     }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement