2.0.2 • Published 4 years ago

stonksjs v2.0.2

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

stonksjs

Algotrading utility scripts. To the moon!!! 🚀🚀🚀

CI Tests Coverage Status

Features

Stonks is a collection of helpful tools to make stock searches and algotrading easier. The goal is for stonks to be everything but the backtesting. With stonks you can:

  • Buy and sell on Robinhood with node
  • Custom finviz screener
  • Diverse scrapers, pulling symbols from Robinhood, finviz, and Dividend Value Builder

Installation

npm install stonksjs

or

yarn add stonksjs

Usage

More in-depth examples can be found in the example/ directory

Import the module in your script or project, and execute one of the functions available:

const stonks = require('stonksjs');

// stonks is a plan object, with each submodule containing the functions
const { screeners, scrapers } = stonks;

// all functions are promise based
const symbols = await screeners.swingTrendingUp();

// trade on Robinhood by saving your credentials as environment variables
const { Robinhood } = stonks;
const robinhood = new Robinhood(username, password, deviceToken);
const order = await robinhood.buy('MSFT', {
  qty: 100,
  type: 'limit',
  price: 123.45,
});

More examples and API docs can be found in docs/api.

Environment Variables

The Robinhood class required the username, password, and deviceToken and will default to environment variables is undefined. See .env.sample for all the environment variables that should be defined.

For instructions on how to get the device token value, read this GitHub comment.

API

Full API docs and examples can be found in docs/api.

Development

git clone http://github.com/nielse63/stonksjs.git
cd stonksjs
npm ci

Lint and run the full test suite before pushing or opening a PR.

Releases

To release a new version, run:

npm run release

Roadmap

See docs/roadmap.md for upcoming features, or open an issue on GitHub.

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.13

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago

1.0.0-alpha

4 years ago

1.0.0-0

4 years ago

0.0.0

4 years ago