stonks-dashboard 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -0
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/assets/.gitkeep +0 -0
- package/assets/dashboard.png +0 -0
- package/cache.json +3899 -0
- package/config.json +9 -0
- package/package.json +29 -0
- package/src/dataService.js +355 -0
- package/src/index.js +473 -0
package/.gitattributes
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Pierre RAFFALLI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Stonks Dashboard
|
|
2
|
+
|
|
3
|
+
Minimal real-time market dashboard for your terminal.
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
6
|
+
|
|
7
|
+
- **Watchlist:** Crypto, stocks, ETFs in one view
|
|
8
|
+
- **Trend chart:** Periods 1D, 7D, 30D, 90D
|
|
9
|
+
- **Details panel:** Key metrics (price, change, highs/lows)
|
|
10
|
+
- **Caching & rate limits:** Smooth updates with fewer API errors
|
|
11
|
+
|
|
12
|
+
**Requirements**
|
|
13
|
+
|
|
14
|
+
- Node.js (LTS recommended)
|
|
15
|
+
|
|
16
|
+
**Install**
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Run**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Controls**
|
|
29
|
+
|
|
30
|
+
- Up/Down: Navigate
|
|
31
|
+
- 1–4: Switch period (1D/7D/30D/90D)
|
|
32
|
+
- q or Ctrl+C: Quit
|
|
33
|
+
|
|
34
|
+
**Configuration**
|
|
35
|
+
|
|
36
|
+
- Edit `config.json` to adjust:
|
|
37
|
+
- `tickers`: symbols to display
|
|
38
|
+
- `cryptoIds`: CoinGecko IDs for crypto (e.g., "BTC": "bitcoin")
|
|
39
|
+
- `updateInterval`: polling interval in ms
|
|
40
|
+
|
|
41
|
+
**Screenshot**
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
**Data Sources**
|
|
46
|
+
|
|
47
|
+
- Crypto: CoinGecko
|
|
48
|
+
- Stocks/ETFs: Yahoo Finance
|
|
49
|
+
|
|
50
|
+
Notes: Requests are paced and responses cached (`cache.json`). Crypto details cache ~30 min; price series cache ~1 min.
|
|
51
|
+
|
|
52
|
+
**License**
|
|
53
|
+
|
|
54
|
+
See [LICENSE](LICENSE).
|
package/assets/.gitkeep
ADDED
|
File without changes
|
|
Binary file
|