ka1kuk commited on
Commit
48b4ed2
1 Parent(s): 0698504

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +13 -13
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/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,7 +54,7 @@ app.get('/api/quote/:symbol', async (req, res) => {
54
  }
55
  });
56
 
57
- app.get('/api/historical/: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,7 +105,7 @@ app.get('/api/summary/:symbol', async (req, res) => {
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,7 +116,7 @@ app.get('/api/assetProfile/:symbol', async (req, res) => {
116
  }
117
  })
118
 
119
- app.get('/api/balanceSheetHistory/:symbol', async (req, res) => {
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'] };