Update app.js
Browse files
app.js
CHANGED
@@ -11,6 +11,29 @@ const HOST = '0.0.0.0';
|
|
11 |
app.use(cors());
|
12 |
app.use(express.json());
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
app.get('/api/search/:query', async (req, res) => {
|
15 |
const query = req.params.query;
|
16 |
try {
|
|
|
11 |
app.use(cors());
|
12 |
app.use(express.json());
|
13 |
|
14 |
+
app.get('/', (req, res) => {
|
15 |
+
res.setHeader('Content-Type', 'text/plain');
|
16 |
+
res.end('This is Yahoo finance api');
|
17 |
+
res.end('Search : /api/search/:<symbol/name>')
|
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) => {
|
38 |
const query = req.params.query;
|
39 |
try {
|