OptionsEdge is a Node.js and Express.js web app that identifies options-based support and resistance levels, such as put/call walls and gamma flips, using data from Alpha Vantage. It caches data in MongoDB to reduce API load and ensure fallback availability. A built-in watchlist lets users track and revisit tickers of interest.
- Real-Time Options Data: Fetch and display live options data including support/resistance levels and gamma flips.
- Price Data Caching: Automatically caches intraday price series in MongoDB for API rate-limit resilience.
- Charting: Interactive Chart.js charts with overlaid levels.
- Watchlist Management: Add or remove tickers in your personal watchlist.
src/
├── app.js # Main entry point and server setup
├── config.js # Environment & API config
├── database.js # MongoDB connection & TTL indexes
├── api/
│ └── alphaVantage.js # Alpha Vantage HTTP client
├── controllers/
│ ├── tickerController.js # Ticker search & detail handlers
│ └── watchlistController.js # Watchlist actions
├── services/
│ ├── userService.js # Test user and watchlist helpers
│ ├── dataService.js # Price fetch & cache logic
│ ├── optionsService.js # Combine options + price into levels
│ ├── chartService.js # Prepare data sets for Chart.js
│ └── optionsParser.js # Parse raw option chain into strike format
├── db/
│ ├── historicalPrice.js # Mongoose model & cache ops
│ └── optionChain.js # Mongoose model & cache ops
├── router/
│ ├── indexRouter.js # Home & status routes
│ ├── tickerRouter.js # /ticker routes
│ └── watchlistRouter.js # /watchlist routes
├── views/
│ ├── index.hbs # Homepage
│ ├── ticker.hbs # Search form
│ ├── ticker-detail.hbs # Detail view with chart
│ └── watchlist.hbs # Watchlist page
public/
├── javascripts/
│ ├── price-chart.js # Renders Chart.js with fetched data
│ ├── ticker-search.js # Handles ticker form + validation
│ └── warnings.js # UI warnings and fallback prompts
└── stylesheets/
└── styles.css # App-wide CSS styling
- Clone your fork:
git clone https://github.com/<your-username>/options-edge-nodejs.git cd options-edge-nodejs
- Install dependencies:
npm install
- Configure environment variables in a
.envfile:ALPHA_VANTAGE_API_KEY=your_key_here MONGODB_URI=mongodb://localhost:27017/optionsflow
- Start the server:
npm start
App runs at http://localhost:3000 by default.
- GET /: Home page and API status
- GET /ticker: Search form for ticker lookup
- GET /ticker/:symbol: Show options + chart for a symbol
- GET /ticker/:symbol/json: JSON API for programmatic access
- GET /watchlist: View watchlist page
- POST /watchlist/add: Add a symbol to watchlist
- POST /watchlist/remove: Remove a symbol from watchlist
- Add user authentication and profiles
- Enhance error handling for API rate limits
- Write unit tests for service layers (e.g., options calculations)
- Expand chart customization (timeframes, annotations)
This project is licensed under the terms of the GNU General Public License v3.0.
See the LICENSE file for details.