Update app.js
Browse files
app.js
CHANGED
@@ -18,20 +18,20 @@ app.get('/', (req, res) => {
|
|
18 |
res.end('Quote : /api/quote/:<symbol>')
|
19 |
res.end('Chart : /api/chart/:<symbol>?interval=<interval>&range=<range>')
|
20 |
res.end('Summary : /api/summary/:<symbol>')
|
21 |
-
res.end('AssetProfile : /api/
|
22 |
-
res.end('
|
23 |
res.end('Calendar events : /api/calendar/:<symbol>')
|
24 |
res.end('Cashflow statements : /api/cashflow/:<symbol>')
|
25 |
res.end('Statistic : /api/statistic/:<symbol>')
|
26 |
res.end('Earnings : /api/earnings/:<symbol>')
|
27 |
-
res.end('
|
28 |
-
res.end('
|
29 |
-
res.end('
|
30 |
-
res.end('
|
31 |
-
res.end('
|
32 |
-
res.end('
|
33 |
-
res.end('
|
34 |
-
res.end('
|
35 |
})
|
36 |
|
37 |
app.get('/api/search/:query', async (req, res) => {
|
@@ -54,7 +54,7 @@ app.get('/api/quote/:symbol', async (req, res) => {
|
|
54 |
}
|
55 |
});
|
56 |
|
57 |
-
app.get('/api/
|
58 |
const symbol = req.params.symbol;
|
59 |
const interval = req.query.interval || '1d'; // Default to 1 day
|
60 |
const range = req.query.range || '1y'; // Default to 1 year
|
@@ -105,7 +105,7 @@ app.get('/api/summary/:symbol', async (req, res) => {
|
|
105 |
}
|
106 |
})
|
107 |
|
108 |
-
app.get('/api/
|
109 |
const symbol = req.params.symbol;
|
110 |
try {
|
111 |
const queryOptions = { modules: ['assetProfile'] };
|
@@ -116,7 +116,7 @@ app.get('/api/assetProfile/:symbol', async (req, res) => {
|
|
116 |
}
|
117 |
})
|
118 |
|
119 |
-
app.get('/api/
|
120 |
const symbol = req.params.symbol;
|
121 |
try {
|
122 |
const queryOptions = { modules: ['balanceSheetHistory', 'balanceSheetHistoryQuarterly'] };
|
|
|
18 |
res.end('Quote : /api/quote/:<symbol>')
|
19 |
res.end('Chart : /api/chart/:<symbol>?interval=<interval>&range=<range>')
|
20 |
res.end('Summary : /api/summary/:<symbol>')
|
21 |
+
res.end('AssetProfile : /api/assetprofile/:<symbol>')
|
22 |
+
res.end('Balancesheet : /api/balancesheet/:<symbol>')
|
23 |
res.end('Calendar events : /api/calendar/:<symbol>')
|
24 |
res.end('Cashflow statements : /api/cashflow/:<symbol>')
|
25 |
res.end('Statistic : /api/statistic/:<symbol>')
|
26 |
res.end('Earnings : /api/earnings/:<symbol>')
|
27 |
+
res.end('Financial : /api/financial/:<symbol>')
|
28 |
+
res.end('Fund : /api/fund/:<symbol>')
|
29 |
+
res.end('Income statements : /api/ income/:<symbol>')
|
30 |
+
res.end('Trending : /api/trend/:<symbol>')
|
31 |
+
res.end('Insider : /api/insider/:<symbol>')
|
32 |
+
res.end('Major holders : /api/major/:<symbol>')
|
33 |
+
res.end('Netshare : /api/netshare/:<symbol>')
|
34 |
+
res.end('Recommendation trend : /api/recommend/:<symbol>')
|
35 |
})
|
36 |
|
37 |
app.get('/api/search/:query', async (req, res) => {
|
|
|
54 |
}
|
55 |
});
|
56 |
|
57 |
+
app.get('/api/chart/:symbol', async (req, res) => {
|
58 |
const symbol = req.params.symbol;
|
59 |
const interval = req.query.interval || '1d'; // Default to 1 day
|
60 |
const range = req.query.range || '1y'; // Default to 1 year
|
|
|
105 |
}
|
106 |
})
|
107 |
|
108 |
+
app.get('/api/assetprofile/:symbol', async (req, res) => {
|
109 |
const symbol = req.params.symbol;
|
110 |
try {
|
111 |
const queryOptions = { modules: ['assetProfile'] };
|
|
|
116 |
}
|
117 |
})
|
118 |
|
119 |
+
app.get('/api/balancesheet/:symbol', async (req, res) => {
|
120 |
const symbol = req.params.symbol;
|
121 |
try {
|
122 |
const queryOptions = { modules: ['balanceSheetHistory', 'balanceSheetHistoryQuarterly'] };
|