Coinbase Node.js client updates

We’ve updated our official Coinbase Node.js library to support the new API v2. We tried to keep the structure of the codebase very similar to the previous versions to make it as easy as possible for you to migrate to API v2. This new version is now available on npm:

npm install coinbase

To get you started, here’s an example code snippet to buy bitcoin using this library:

var coinbase = require('coinbase');
var client   = new coinbase.Client({'apiKey': 'API KEY',
                                    'apiSecret': 'API SECRET'});

// Create new BTC wallet/account:
client.createAccount({'name': 'test'}, function(err, account) {
  console.log('Account: ' +;{'amount': 0.01, 'currency': 'BTC'}, function(err, buy) {
    console.log('Buy: ' + buy.amount.amount + ' ' + buy.amount.currency);

You can find more information about the library here. If you have any questions or feedback regarding this update, let us know on Twitter, or via email.

Please note: We’re hiring engineers (both in our San Francisco office and remote anywhere in the world). If you’re interested in speaking with us about a role we’ve set up a coding challenge that you can take in about 30–45 minutes. You can also apply through our careers site if you prefer to start the conversation that way.

Written by Maksim Stepanenko