pj

personalcapital-js

NodeJS Wrapper for the Personal Capital private API.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

19

Maintenance

Last Commit

1yr ago

Contributors

3

Package

Dependencies

4

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

NodeJS Wrapper for the Personal Capital private API.

SMS 2FA must be enabled on your account in order to use this, this is not an API limitation, should someone need non-sms auth it can be implemented.

Wrapper Functions :

updateBalance method works with all custom accounts other than Custom Stock Options and Manual Investment Holdings. addHolding, updateHolding, and updateInvestmentCashBalance methods work with Manual Investment Holdings asset type

Installation

$ npm install personalcapital
$ npm install request@^2.34

Usage

({PersonalCapital, TwoFactorMode} = require('./personalcapital/personalcapital.js'));
let tcfs = require('tough-cookie-file-store');
let request = require('request-promise-native');
let pc = new PersonalCapital(name='pcjs', cookiejar=request.jar(new tcfs('./pc-cookie.json')));

let main = async () => {
  await pc.auth('USERNAME', 'PASSWORD');
  let accounts = await pc.getAccounts();
  let accountIds = accounts.map((e) => e.accountId).slice(0,3);
  console.log(await pc.getHistories(accounts=accountIds));
  return '';
};

main().then(() => process.exit());

Attributions

  • John Collins (@jamaicanmoose) : Wrapper Development
  • Haochi Chen (@haochi) : Inspiration for authentication method from his Python wrapper

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial