npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

independentreserve

v0.2.7

Published

Independent Reserve API Client for Node.JS

Downloads

51

Readme

Independent Reserve Javascript API Client

npm version Known Vulnerabilities

This is a node.js wrapper for the private and public methods exposed by the Independent Reserve API. You will need have a registered account with Independent Reserve and generated API keys to access the private methods.

Please contact [email protected] if you are having trouble opening and account or generating an API key.

Install

npm install independentreserve

Examples

var IR = require('independentreserve');

// Test public data APIs
var publicClient = new IR();

// get ticker for BTCUSD
publicClient.getMarketSummary("Xbt", "Usd", console.log);

// get order book for BTCAUD
publicClient.getOrderBook("Xbt", "Aud", console.log);

// get last 20 BTCAUD trades
publicClient.getRecentTrades("Xbt", "Aud", 20, console.log);

var privateClient = new IR(your_key, your_secret);

privateClient.getMarketSummary("Xbt", "Usd",
	function(err, data){
		console.log('bid ' + data.CurrentHighestBidPrice + ' ask ' + data.CurrentLowestOfferPrice);
});

// buy limit order against BTCUSD
privateClient.placeOrder("Xbt", "Usd", "LimitBid", 123.12, 0.12345678, function(err, data)
{
    console.log('orderGuid ' + data.OrderGuid);
});

// sell limit order against BTCAUD
privateClient.placeOrder("Xbt", "Aud", "LimitOffer", 567.12, 0.01, function(err, data)
{
    console.log('orderGuid ' + data.OrderGuid);
});

// sell market order
privateClient.placeOrder("Xbt", "Nzd", "MarketOffer", null, 0.87654321, function(err, data)
{
    console.log(data);
});

// buy market order
privateClient.placeOrder("Xbt", "Aud", "MarketBid", null, 0.87654321, function(err, data)
{
    console.log(data);
});

// enter a Guid returned in one of the above placeLimitOrder calls
var orderGuid = '';

// get order details for specified Guid
privateClient.getOrderDetails(orderGuid, function(err, data)
{
    console.log(data);
});

// cancel limit order
privateClient.cancelOrder(orderGuid, function(err, data)
{
    console.log(data);
});

// get the first 50 trades executed by the account the API key is linked to
privateClient.getTrades(1, 50, function(err, data)
{
    console.log(data);
});

// get BTC deposit address
privateClient.getDigitalCurrencyDepositAddress('Xbt', function(err, data)
{
   console.log(data);
});

// get ETH deposit addresses
privateClient.getDigitalCurrencyDepositAddresses('Eth', 1, 5, function(err, data)
{
    console.log(data);
});