Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
This is a node.js wrapper for the private and public methods exposed by the itBit API. You will need have a registered account with itBit and requested API keys to access the private methods.
Please contact help@itbit.com if you are having trouble opening and account and api@itbit.com to request your API key.
npm install itbit
var ItBit = require('itbit');
var userId = "",
walletId = "",
orderId = "";
var itBit = new ItBit({
key: "",
secret: "",
timeout: 20000 // milliseconds
});
itBit.getTicker("XBTUSD",
function(err, data)
{
console.log('bid ' + data.bid + ' ask ' + data.ask);
}
);
itBit.getOrderBook("XBTUSD",
function(err, data)
{
console.log('%s bids and %s asks', data.bids.length, data.asks.length);
}
);
itBit.getWallets(userId,
function(err, wallets)
{
// for each wallet
wallets.forEach(function(wallet)
{
console.log('wallet id %s, account identifier %s', wallet.id, wallet.accountIdentifier);
// for each currency
wallet.balances.forEach(function(balance)
{
console.log('currency %s, total %s, available %s', balance.currency, balance.totalBalance, balance.availableBalance);
});
});
}
);
itBit.getWallet(walletId,
function(err, wallet)
{
// for each currency
wallet.balances.forEach(function(balance)
{
console.log('currency %s, total %s, available %s', balance.currency, balance.totalBalance, balance.availableBalance);
});
}
);
itBit.addOrder(walletId, "sell", "limit", "0.01", "500", "XBTUSD", null, null,
function(err, data)
{
console.log('new order id ' + data.id);
}
);
itBit.getOrder(walletId, orderId,
function(err, data)
{
console.log(data);
}
);
itBit.cancelOrder(walletId, orderId,
function(err, data)
{
console.log(data);
}
);
FAQs
itbit API client for node.js
The npm package itbit receives a total of 12 weekly downloads. As such, itbit popularity was classified as not popular.
We found that itbit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.