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

btc-id

v1.0.0

Published

A Node.js-based Implementation of Bitcoin Indonesia's Trade API

Readme

btc-id

A Node.js-based Implementation of Bitcoin Indonesia's Trade API

Compatibility

This implementation is compatible with Trade API v1.7. All API request methods are implemented using Request and Bluebird.

Important Notes

  • A private and secret key must be set before making private API requests. See this link.
  • Correct order of parallel private API requests cannot be guaranteed because of asynchronous nature of JavaScript and network latency. Some requests will fail because of incorrect nonce. Tell your nice trading bot to handle errors carefully and just don't go too fast.
  • It is recommended to use proven third party library to parse numbers and do arithmetic calculations, such as bignumber.js. You know, JavaScript is bad at math and I am pretty sure you don't want to lose even only a small fraction of your precious digital golds.
  • I am not responsible for any future profits, losses or damages caused by this library. Cryptocurrency trading is always considered to be high-risk activity. By using this library, it is assumed that you know exactly what you are doing.

Usage

const btcid = require('btc-id');
const API = new btcid();

Methods

General

version

Get Trade API compatibility version. Example:

console.log(API.version); // '1.7'

baseUrl

Get/set base URL for API requests. Example:

console.log(API.baseUrl); // 'https://vip.bitcoin.co.id'
API.baseUrl = 'http://a-trading-proxy.com';
console.log(API.baseUrl); // 'http://a-trading-proxy.com'

key

Set API key. Example:

API.key = 'AAAAAAAA-BBBBBBBB-CCCCCCCC-DDDDDDDD-EEEEEEEE';

secret

Set secret key. Example:

API.secret = '1263e5a57b853024509bf94ff466ec6a2a733ad83a2aa6ceb5cc14301713b4a77f2bb154a66cde73';

pair(coinA, coinB)

An easy way to generate coin pair string for use with API requests. Example:

console.log(API.pair('BTC', 'IDR')); // 'btc_idr'

Public API

getTicker(pair)

Example:

API.getTicker(API.pair('BTC','IDR'))
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getTrades(pair)

Example:

API.getTrades(API.pair('BTC','IDR'))
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getDepth(pair)

Example:

API.getDepth(API.pair('BTC','IDR'))
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

Private

getInfo()

Example:

API.getInfo()
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getTransHistory()

Example:

API.getTransHistory()
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getTradeHistory({pair, [count, from_id, end_id, order, since, end]})

Example:

API.getTradeHistory({pair: API.pair('BTC', 'IDR'), count: 100, order: 'desc'})
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getOpenOrders({[pair]})

Example A (get all open orders of all pairs):

API.getOpenOrders({})
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

Example B (get open orders of specific pair):

API.getOpenOrders({pair: API.pair('BTC', 'IDR')})
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getOrderHistory({pair, [count, from]})

Example:

API.getOrderHistory({pair: API.pair('BTC', 'IDR'), count: 100})
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });

getOrder({pair, order_id})

Example:

API.getOrder({pair: API.pair('BTC', 'IDR'), order_id: 94428})
    .then(function(response) {
        console.log(response);
    })
    .catch(function(err) {
        console.error(err);
    });