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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mintpaljs

v1.0.0

Published

Asynchronous wrapper for the MintPal API

Readme

MintPalJS

Asynchronous wrapper for the MintPal API.

Usage

Add 'mintpaljs' to the dependencies section of your projects package.json

"dependencies": {
  "mintpaljs": "*",
  ...
}

Install using npm

npm install

Use in your project

var mintpal = require('mintpaljs');

Links

Source

git clone git://iquidus.co.nz/mintpaljs.git

Example code (this site)

git clone git://iquidus.co.nz/mintpaljs-example.git

Functions

get_summary

Provides an overview of [exchange] markets. Data refreshes every minute.

mintpal.get_summary(exchange, callback);

Requires: exchange: ('BTC', 'LTC', '')
Returns: callback(error, summary)

note: '' will return results for all markets (both BTC and LTC)

summary is an array of objects structured as:

[{
   "market_id":"25",
   "code":"AUR",
   "exchange":"BTC",
   "last_price":"0.04600001",
   "yesterday_price":"0.04300000",
   "change":"+6.98",
   "24hhigh":"0.04980000",
   "24hlow":"0.04000050",
   "24hvol":"21.737"
   "top_bid":"0.04590000"
   "top_ask":"0.04600005"
},
...
]

get_stats

Provides the statistics for a single market. Data refreshes every minute.

mintpal.get_stats(coin, exchange, callback);

Requires: coin: e.g 'AUR'; exchange: ('BTC' or 'LTC')
Returns: callback(error, stats)

stats is an object structured as:

{
  "market_id":"25",
  "code":"AUR",
  "exchange":"BTC",
  "last_price":"0.04600001",
  "yesterday_price":"0.04300000",
  "change":"+6.98",
  "24hhigh":"0.04980000",
  "24hlow":"0.04000050",
  "24hvol":"21.737"
  "top_bid":"0.04590000"
  "top_ask":"0.04600005"
}

get_trades

Fetches the last 100 trades for a given market.

mintpal.get_trades(coin, exchange, callback);

Requires: coin: e.g 'AUR'; exchange: ('BTC' or 'LTC')
Returns: callback(error, trades)

trades is an array of objects structured as:

[{
   "count":"100",
   "trades":[{
      "type":"1",
      "price":"0.00000023",
      "amount":"412128.80177019",
      "total":"0.09478962",
      "time":"1394498289.2727"
   },
   ...
}]

note: Type 0 refers to a BUY and type 1 refers to a SELL. Time is specified as a unix timestamp with microseconds.

get_orders

Fetches the 50 best priced orders of a given type for a given market.

mintpal.get_orders(coin, exchange, type, callback);

Requires: coin: e.g 'AUR'; exchange: ('BTC' or 'LTC'); type: ('BUY' or 'SELL')
Returns: callback(error, orders)

orders is an array of objects structured as:

[{
   "count":"23",
   "type":"BUY",
   "orders":[{
      "price":"0.00000023",
      "amount":"22446985.14519785",
      "total":"5.16280655"
   },
   ...
}]

note: The orders are kept in the orders.orders array.

get_chartdata

Fetches the chart data that MintPal use for their candlestick graphs for a market for a given time period. The period is an optional parameter and can be either '6hh' (6 hours), '1DD' (24 hours), '3DD' (3 days), '7DD' (1 week) or 'MAX'. If no period is defined, it will default to 6 hours. The market ID can be found by checking the market summary or market stats.

mintpal.get_chartdata(coin, exchange, period, callback);

Requires: coin: e.g 'AUR'; exchange: ('BTC' or 'LTC'); period: e.g '6hh'
Returns: callback(error, chartdata)

chartdata is an array of objects structured as:

[{
   "date":"2014-02-09 14:20",
   "open":"0.00000006",
   "close":"0.00000006",
   "high":"0.00000006",
   "low":"0.00000003",
   "exchange_volume":"0.00002145",
   "coin_volume":"608.50000000"
},
...
]

note: You will most likely need to format chartdata to be compitable with which ever charting libs are used. See example code for jqplot example.