72 lines
2.1 KiB
Markdown
72 lines
2.1 KiB
Markdown
# GammaDesk Implementation Notes
|
|
|
|
## Editing guide
|
|
|
|
Start here for common changes:
|
|
|
|
| Task | File |
|
|
|---|---|
|
|
| Add a dashboard metric | `client/src/pages/dashboard.tsx` |
|
|
| Change the GEX chart | `client/src/components/gex-chart.tsx` |
|
|
| Change mock symbols or calculations | `server/marketData.ts` |
|
|
| Add an API route | `server/routes.ts` |
|
|
| Wire ORATS endpoints | `server/oratsClient.ts` |
|
|
| Change shared response shapes | `shared/schema.ts` |
|
|
| Change theme colors | `client/src/index.css` |
|
|
| Add app navigation | `client/src/components/app-sidebar.tsx` and `client/src/App.tsx` |
|
|
|
|
## Build order for future work
|
|
|
|
1. Update shared types in `shared/schema.ts`.
|
|
2. Update backend route or calculation logic.
|
|
3. Update frontend query and UI.
|
|
4. Run `npm run check`.
|
|
5. Run `npm run build`.
|
|
6. Test key screens: Dashboard, Gamma Levels, Expiry Matrix, Screener, Settings.
|
|
|
|
## ORATS wiring checklist
|
|
|
|
- Add HTTP helpers to `server/oratsClient.ts`.
|
|
- Inject `ORATS_API_KEY` as a `token` query parameter server-side.
|
|
- Support `ORATS_MODE`: delayed, live, intraday.
|
|
- Implement typed methods:
|
|
- `getTickers`
|
|
- `getExpirations`
|
|
- `getStrikes`
|
|
- `getStrikesByExpiry`
|
|
- `getMoniesImplied`
|
|
- `getSummaries`
|
|
- `getIvRank`
|
|
- Add normalizers from ORATS fields to GammaDesk models.
|
|
- Add short-lived cache per symbol and endpoint.
|
|
- Log missing fields without breaking the whole dashboard.
|
|
- Preserve mock fallback for local development.
|
|
|
|
## Calculation roadmap
|
|
|
|
Current MVP:
|
|
|
|
- Per-strike call and put GEX
|
|
- Net GEX
|
|
- Call wall
|
|
- Put wall
|
|
- HVL approximation by cumulative net-GEX crossing
|
|
- Expiration standalone/cumulative views
|
|
|
|
Next accuracy upgrade:
|
|
|
|
- Recalculate total gamma across a hypothetical spot grid.
|
|
- Find true zero-gamma crossing from the spot grid.
|
|
- Add transition zones around HVL.
|
|
- Add C1/P1 through C6/P6 ranked wall levels.
|
|
- Add absolute GEX levels Ab1 through Ab10.
|
|
|
|
## Product roadmap
|
|
|
|
1. Real ORATS connector.
|
|
2. Dedicated `/api/nt8/levels/:symbol` endpoint.
|
|
3. Watchlists and saved symbol groups.
|
|
4. Alerts when price nears HVL, call wall, or put wall.
|
|
5. Multi-user accounts and billing only after data licensing is clarified.
|
|
|