forked from askmike/bitstamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.js
41 lines (31 loc) · 1.48 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var Bitstamp = require('./bitstamp.js');
var publicBitstamp = new Bitstamp();
publicBitstamp.transactions({time: 'hour'}, console.log);
// publicBitstamp.ticker(console.log);
// publicBitstamp.order_book(false, console.log);
// publicBitstamp.eur_usd(console.log);
var key = 'your key';
var secret = 'your secret';
var client_id = '0'; // your Bitstamp user ID
var privateBitstamp = new Bitstamp(key, secret, client_id);
// commented out for your protection
// privateBitstamp.balance(console.log);
// privateBitstamp.user_transactions(100, console.log);
// privateBitstamp.open_orders(console.log);
// privateBitstamp.cancel_order(id, console.log);
// privateBitstamp.buy(amount, price, console.log);
// privateBitstamp.sell(amount, price, console.log);
// privateBitstamp.withdrawal_requests(console.log);
// privateBitstamp.bitcoin_withdrawal(amount, address, console.log);
// privateBitstamp.bitcoin_deposit_address(console.log);
// privateBitstamp.unconfirmed_btc(console.log())
// privateBitstamp.ripple_withdrawal(amount, address, currency)
// privateBitstamp.ripple_address(console.log)
// Bistamp is currently (Thu Oct 31 13:54:19 CET 2013)
// returning 404's when doing these calls
// privateBitstamp.create_code(usd, btc, console.log);
// privateBitstamp.check_code(code, console.log);
// privateBitstamp.redeem_code(code, console.log);
// Bistamp is currently (Tue Aug 26 19:31:55 CEST 2014)
// returning 404's when doing these calls
// publicBitstamp.bitinstant(console.log);