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

api-bittrex

v0.0.2

Published

API Bittrex - asynchronous node.js library for the Bittrex API https://bittrex.com/

Readme

Api Bittrex

A Node.js API client for the [https://github.com/ionic-team/ionic][Ionic Framework].

The client supports public and private calls.

For private calls, the user secret is never exposed to other parts of the program or over the Web. The user key is sent as a header to the API, along with a signed request.

Repo home: [github.com/leandronascimento/api-bittrex][repo]

License

This Library was created by using parts of Adrian Soluch (@n0mad01) soluch.us [node.bittrex.api] (https://github.com/n0mad01/node.bittrex.api/blob/master/node.bittrex.api.js) MIT, open source. See LICENSE file.

Make API calls

Before you start

This is just a quick reminder that you are handling coins with this library (and thus real money), so, understand the situation as much as possible and make everything to prevent losing them.

Here is a small checklist you should go through before you start:

  1. Make sure you don't give your api key more rights as absolutely necessary - for first testing READ INFO alone should be enough! (bittrex.com under: Settings/API Keys) bittrex_ap_keys_control
  2. make sure to understand the API Key permissions
    1. READ INFO - Allows you to read private details such as open orders, order history, balances, etc
    2. TRADE LIMIT - Allows you to create/cancel trade limit buy/sell orders
    3. TRADE MARKET - allows you to create/cancel market buy/sell orders
    4. WITHDRAW - Allows you to withdraw to another address
  3. Make use of the Bittrex IP Whitelist as also the Withdrawal Whitelist features
  4. Do not ever commit your API Keys to GitHub or expose them under any circumstances!

Quick start

$ npm install api-bittrex

Importe as a module in Ionic

In your app, import the module:

   import * as bittrex from 'api-bittrex';

Create an instance of the client

If only public API calls are needed, then no API key or secret is required:

   const APISECRET = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
   const APIKEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

   bittrex.options({ 
     'apikey' : APIKEY, 
     'apisecret' : APISECRET, 
     'stream' : false, 
     'verbose' : false, 
     'cleartext' : false 
   });

   bittrex.getbalances( function( data, err ) {
     console.log( data );
   });

Examples

After configuration you can use the object right away: example #1

bittrex.getmarketsummaries( function( data, err ) {
  if (err) {
    return console.error(err);
  }
  for( var i in data.result ) {
    bittrex.getticker( { market : data.result[i].MarketName }, function( ticker ) {
      console.log( ticker );
    });
  }
});

example #2

bittrex.getbalance({ currency : 'BTC' }, function( data, err ) {
  if (err) {
    return console.error(err);
  }
  console.log( data );
});

Methods

Optional parameters may have to be looked up at https://bittrex.com/Home/Api.

It may happen that some Bittrex API methods are missing, also they could have been forgotten in the documentation. In this case, if this strikes you, feel free to open a issue or send me a pull request.

Also: the method sendCustomRequest enables completely custom requests, regardless the specific API methods.

sendCustomRequest
  • url String
  • callback Function
  • credentials Boolean optional whether the credentials should be applied to the request/stream or not, default is set to false.

example #1

var url = 'https://bittrex.com/api/v1.1/public/getticker?market=BTC-LTC';
bittrex.sendCustomRequest( url, function( data, err ) {
  console.log( data );
});

example #2 (credentials applied to request/stream)

bittrex.sendCustomRequest( 'https://bittrex.com/api/v1.1/account/getbalances?currency=BTC', function( data, err ) {
  console.log( data );
}, true );

will result in (the Header is being set too):
https://bittrex.com/api/v1.1/account/getbalances?currency=BTC&apikey=API_KEY&nonce=4456490600
getticker
bittrex.getticker( { market : 'BTC-LTC' }, function( data, err ) {
  console.log( data );
});
getbalances
bittrex.getbalances( function( data, err ) {
  console.log( data );
});
getmarkethistory
bittrex.getmarkethistory({ market : 'BTC-LTC' }, function( data, err ) {
  console.log( data );
});
getcandles (v2 method)
bittrex.getcandles({
  marketName: 'USDT-BTC',
  tickInterval: 'fiveMin', // intervals are keywords
}, function( data, err ) {
  console.log( data );
});
getmarketsummaries
bittrex.getmarketsummaries( function( data, err ) {
  console.log( data );
});
getmarketsummary
bittrex.getmarketsummary( { market : 'BTC-LTC'}, function( data, err ) {
  console.log( data );
});
getorderbook
bittrex.getorderbook({ market : 'BTC-LTC', depth : 10, type : 'both' }, function( data, err ) {
  console.log( data );
});
getwithdrawalhistory
bittrex.getwithdrawalhistory({ currency : 'BTC' }, function( data, err ) {
  console.log( data );
});
getdepositaddress
bittrex.getdepositaddress({ currency : 'BTC' }, function( data, err ) {
  console.log( data );
});
getdeposithistory
bittrex.getdeposithistory({ currency : 'BTC' }, function( data, err ) {
  console.log( data );
});
getbalance
bittrex.getbalance({ currency : 'BTC' }, function( data, err ) {
  console.log( data );
});
withdraw
bittrex.withdraw({ currency : 'BTC', quantity : '1.5112', address : 'THE_ADDRESS' }, function( data, err ) {
  console.log( data );
});