Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jongan69/stonksjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@jongan69/stonksjs
Reliable algotrading utilities written in node - Updated and maintained fork
Features
- Custom screeners from finviz, msn, and finscreener
- Detailed ticker fundamentals
- Module and CommonJS compatible
- Light-weight - few to no dependencies
Goals
What stonksjs is:
The primary objective of this project are:
- To provide a collection of reliable algotrading utilities written in typescript/node
- Take some of the guess-work out of the stock research process by using industry-tested, predefined screeners
- Provide more data-points for a given instrument than most packages currently available
- Enable algotrading programmers with diversified assets - not just the hottest options rumors on r/wallstreetbets
What stonksjs is not:
- stonksjs is not a roboadvisor or professional trading app - this is just a fun little side project
- stonksjs is not an unofficial API for Robinhood or any other brokerage. If that's what you're looking for, I'd recommend algotrader
- stonksjs is not a backtesting tool, although that might get added to the roadmap soon
Usage
Installation, usage, and API docs can be found in each scoped package directory.
Quick Start with Examples
The easiest way to get started is with our comprehensive examples:
# Run the interactive demo
./examples/run-demo.sh
# Or run directly
node examples/comprehensive-demo.js
This will demonstrate all the functionality across the stonksjs ecosystem, including:
- 📊 Stock quote retrieval with detailed metrics
- 🔍 40+ pre-defined stock screeners
- 💾 Cached quote data for better performance
- 🚀 Advanced portfolio and sentiment analysis
Name | Description | Version |
---|---|---|
@stonksjs/core | Single point of entry for all stonksjs packages | |
@stonksjs/quote | Detailed, real-time stock quote data | |
@stonksjs/finviz | Unofficial finviz API | |
@stonksjs/stock-screener | Pre-defined industry standard stock screeners from MSN Money |
Development
Setup
Prerequisites
This project requires node v18.0.0
or higher.
Installation
Clone the repo and install the dependencies:
git clone http://github.com/nielse63/stonksjs.git
cd stonksjs
nvm use
npm ci
Testing
Tests are run using jest
, and can be run by executing:
npm test
# run with coverage
npm test -- --coverage
Examples
Comprehensive examples are available in the examples/
directory:
# Run the interactive demo script
./examples/run-demo.sh
# Or run examples directly
node examples/comprehensive-demo.js # JavaScript version
npx ts-node examples/comprehensive-demo.ts # TypeScript version
The examples demonstrate:
- All package functionality with real-world usage
- Performance optimization techniques
- Advanced analysis patterns
- Error handling best practices
Release
To release a new version, run:
npm run release
This executes lerna publish
behind the scenes, and you'll be prompted with a
few questions before the package is deployed.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Roadmap
All new features and changes are being tracked in GitHub under the projects and issues tabs of this repo.