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

yodlee-transactions

v1.0.7

Published

functions to pull aggregate transaction data from Yodlee api

Readme

===Yodlee API helper ===

This npm module will let you grab amount of money spent on transactions, filtered by category.

Installation

$ npm install --save yodlee-transactions

Usage

//If you look into the node modules and check the test.js file, it will have a test example to work off of.
var yodlee = require('yodlee-transactions');

Authentication using Cobrand Credentials

Yodlee requires a cobSessionToken before we can access the API. Get your credentials here.

Yodlee uses the standard oauth authentication flow in order to allow apps to act on a user's behalf. The API provides a convenience method to help you authenticate your users.

below snippet is a starting point on using this module.

var yodlee = require("./index");
var cobrandUser = ""; //example format in sbCobxxxxx
var cobrandPassword = ""; //format is xxxx-xxx-xxx-xxx-xxxx the number of x is not accurate
var userName = ""; //example formats are sbMemxxxxx
var userPassword = ""; //example formate are in sbMemxxxxx
var cobSessionToken = "";
var userSessionToken = "";
var accounts = [];


function generateCobToken(cobrandUser, cobrandPassword){
  return yodlee.getCobSession(cobrandUser, cobrandPassword)
    .then(function(data){
      var dataObj = JSON.parse(data);
      cobSessionToken = dataObj.session.cobSession;
      return cobSessionToken;
    });
}

function generateUserToken(userName, userPassword){
  return function(cobSessionToken){
    return yodlee.getUserSession(cobSessionToken, userName, userPassword)
      .then(function(user){
        var userObj = JSON.parse(user);
        userSessionToken = userObj.session.userSession;
        return userSessionToken;
      });
  }
}

function getAccounts() {
  return yodlee.getAccounts(cobSessionToken, userSessionToken)
    .then(function(data){
      var dataObj = JSON.parse(data);
      accounts = [] //clearing it out kind of
      for (var k in dataObj){
        if (dataObj.hasOwnProperty(k)){
          accounts.push(dataObj[k]);
        }
      }
    })
}

function getTransactions(accountId, fromDate, toDate) {
  return yodlee.getTransactions(cobSessionToken, userSessionToken, accountId, fromDate, toDate)
    .then(function(data){
      return JSON.parse(data);
    })
}

function getCategorySpending(transactionObj) {
  return yodlee.getCategorySpending(transactionObj);
}

//Running here
generateCobToken(cobrandUser, cobrandPassword)
  .then(generateUserToken(userName, userPassword))
  .then(function(){
    getAccounts();
    getTransactions()
      .then(getCategorySpending);
  })

Using the API

GET User Accounts

Returns the information related to the specified accounts aggregated by the User: Yodlee Docs

Next Steps

  • get specific accounts
  • get better accounting filter functions