btce
v0.4.4
Published
BTC-E Trading API
Downloads
9
Readme
BTC-E API for Node.js
Simple API to BTC-E Crypto Coin Trading platform
Current version 0.4
Features
- Full API (Public and Trade)
- Asynchronous requests
- Automatically converts Date objects, strings and JS timestamps to UNIX timestamps
Usage samples
Init
var BTCE = require('./btce.js')
var btce = new BTCE.api('YOUR-KEY', 'YOUR-SECRET')
Get a ticker
btce.ticker({ pair: 'btc_usd' }, function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
Display user information (funds, transaction count, open orders count...)
btce.getInfo(function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
Get last 10 transactions in descending order
btce.transHistory({ count: 10, order: 'DESC' }, function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
Custom queries
btce.query('OrderList', { count: 5 }, function(err, data) {
if (!err) console.log(data)
else console.log(err)
})
Methods
// Trade API (requires api key and secret)
getInfo(callback)
transHistory(params, callback)
tradeHistory(params, callback)
orderList(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
BTC-E API documentation
- Trade: https://btc-e.com/api/documentation
- Public: https://btc-e.com/page/2
Feature requests
- petermrg at ymail dot com
Donate
- BTC: 1GVRSmJzZpFoLvFnPNtdwPeVXh6t4t65PZ
- LTC: LWSRwTDKVxE9BGziUzbUw7MkHz6KACVnAA