Simple API to BTC-E Crypto Coin Trading platform
- Full API (Public and Trade)
- Asynchronous requests
- Automatically converts Date objects, strings and JS timestamps to UNIX timestamps
npm install btce
var BTCE = require('btce')
var btce = new BTCE('YOUR-KEY', 'YOUR-SECRET')
btce.ticker({ pair: 'btc_usd' }, function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
btce.getInfo(function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
btce.transHistory({ count: 10, order: 'DESC' }, function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
btce.trade({'pair': 'btc_usd', 'type': 'buy', 'rate': 100.0, 'amount': 2.0}, function(err, data) {
if (!err) console.log(data);
else console.log(err);
});
// Trade API (requires api key and secret)
getInfo(callback)
transHistory(params, callback)
tradeHistory(params, callback)
orderList(params, callback)
activeOrders(params, callback)
trade(params, callback)
cancelOrder(orderId, callback)
query(method, params, callback)
// Public API
fee(params, callback)
trades(params, callback)
depth(params, callback)
ticker(params, callback)
// utils
getTimestamp(time)
getHTTPS(url, callback)
Information about parameters in source comments
- Trade: https://btc-e.com/api/documentation
- Public: https://btc-e.com/page/2