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

mintpal

v0.1.2

Published

Mintpal.com NodeJS API client.

Downloads

3

Readme

Mintpal

Mintpal.com NodeJS API client. Fully supports the v1 API features: Mintpal.com API.

NPM

Build Status

Example Usage

var Mintpal = require('mintpal');
var client = new Mintpal();

// fetch current stats for DRK/BTC
client.stats('DRK', 'BTC', function(err, data){ })

// fetch a market summary for LTC
client.summary('LTC', function(err, data){ })

// see last 100 trades for LTC/BTC
client.trades('LTC/BTC', function(err, data){ })

// get chart data for Dogecoin (last 24 hours)
client.chart('DOGE/BTC', '1dd', function(err, data){ })

Mintpal.com API documentation

For detailed API info, check out the official v1 API docs: https://www.mintpal.com/api

API Methods

@options Object:

  • exchange set a default exchange, example: LTC or BTC
  • coin set a default coin, example: 'DOGE'
  • period default time period to use for chart method calls
  • api_version defaults to v1
var mintpal = new Mintpal({
  exchange: 'BTC',
  coin: 'DOGE'
})
  • exchange (optional) summary data by exchange (LTC or BTC)
  • callback receives error, data, response

Provides an overview of all our markets. Data refreshes every minute.

mintpal.summary(function(err, data){
  console.log(data)
})
[
  {
    "market_id": "88",
    "coin": "365Coin",
    "code": "365",
    "exchange": "BTC",
    "last_price": "0.20000001",
    "yesterday_price": "0.20000001",
    "change": "0.00",
    "24hhigh": "0.21500024",
    "24hlow": "0.20000000",
    "24hvol": "0.163",
    "top_bid": "0.20000001",
    "top_ask": "0.20499999"
  },
  ...
]
  • coin The coin you're interested in, example: DOGE
  • exchange (optional) exchange example: LTC or BTC

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

mintpal.summary('DOGE', 'BTC', function(err, data){
  console.log(data)
})
// or shorthand
mintpal.summary('DOGE/BTC', function(){})
[
  {
    "market_id": "16",
    "coin": "Dogecoin",
    "code": "DOGE",
    "exchange": "BTC",
    "last_price": "0.00000049",
    "yesterday_price": "0.00000050",
    "change": "-2.00",
    "24hhigh": "0.00000052",
    "24hlow": "0.00000046",
    "24hvol": "37.989",
    "top_bid": "0.00000049",
    "top_ask": "0.00000050"
  }
]
  • coin The coin you're interested in, example: DOGE
  • exchange (optional) exchange example: LTC or BTC

Fetches the last 100 trades for a given market.

mintpal.trades('DOGE', 'BTC', function(err, data){
  console.log(data)
})
// or shorthand
mintpal.trades('DOGE/BTC', function(){})
[{
   "count":"100",
   "trades":[{
      "type":"1",
      "price":"0.00000023",
      "amount":"412128.80177019",
      "total":"0.09478962",
      "time":"1394498289.2727"
   },
   ...
}]
  • coin The coin you're interested in, example: DOGE
  • exchange (optional) exchange example: LTC or BTC
  • type (optional) example: BUY or SELL (default is BUY)

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

mintpal.orders('DOGE', 'BTC', 'BUY', function(err, data){
  console.log(data)
})
// or shorthand
mintpal.orders('DOGE/BTC', 'SELL', function(){})
[{
   "count":"23",
   "type":"BUY",
   "orders":[{
      "price":"0.00000023",
      "amount":"22446985.14519785",
      "total":"5.16280655"
   },
   ...
}]
  • coin The coin you're interested in, example: DOGE
  • exchange (optional) exchange example: LTC or BTC
  • period (optional) time period filter examples: 6hh, 1dd, 3dd, 7dd, max default is 6hh

chart data that we use for our candlestick graphs for a market for a given time period.

mintpal.chart('DOGE', 'BTC', '6hh', function(err, data){
  console.log(data)
})
// or shorthand
mintpal.chart('DOGE/BTC', 'max', function(){})
[
  {
    "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"
  },
  ...
]

Contributing

Fork and clone the repository. Install dependencies with:

npm install

Run the existing test spec with npm test.

Roadmap

Support this project

BTC 1EkGJfpcAi6oeq1ooEjgzHVuRvc1HdvuXu
LTC LKPvk8RQsoYpmS9ajoXVoMUtAVpTJ8R9zH
CRYPT Esug5bcsMkQ9m2kMPtLpz2thwXSjyMtxkw