nse-bse-api 0.1.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/LICENSE +21 -0
- package/README.md +194 -0
- package/dist/bse/BSE.d.ts +141 -0
- package/dist/bse/BSE.d.ts.map +1 -0
- package/dist/bse/BSE.js +453 -0
- package/dist/bse/BSE.js.map +1 -0
- package/dist/bse/constants/index.d.ts +341 -0
- package/dist/bse/constants/index.d.ts.map +1 -0
- package/dist/bse/constants/index.js +341 -0
- package/dist/bse/constants/index.js.map +1 -0
- package/dist/bse/index.d.ts +12 -0
- package/dist/bse/index.d.ts.map +1 -0
- package/dist/bse/index.js +16 -0
- package/dist/bse/index.js.map +1 -0
- package/dist/bse/types/index.d.ts +120 -0
- package/dist/bse/types/index.d.ts.map +1 -0
- package/dist/bse/types/index.js +20 -0
- package/dist/bse/types/index.js.map +1 -0
- package/dist/bse/utils/SymbolParser.d.ts +16 -0
- package/dist/bse/utils/SymbolParser.d.ts.map +1 -0
- package/dist/bse/utils/SymbolParser.js +58 -0
- package/dist/bse/utils/SymbolParser.js.map +1 -0
- package/dist/bse/utils/helpers.d.ts +21 -0
- package/dist/bse/utils/helpers.d.ts.map +1 -0
- package/dist/bse/utils/helpers.js +77 -0
- package/dist/bse/utils/helpers.js.map +1 -0
- package/dist/bse/utils/throttle.d.ts +4 -0
- package/dist/bse/utils/throttle.d.ts.map +1 -0
- package/dist/bse/utils/throttle.js +38 -0
- package/dist/bse/utils/throttle.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/nse/api/corporate-api.d.ts +30 -0
- package/dist/nse/api/corporate-api.d.ts.map +1 -0
- package/dist/nse/api/corporate-api.js +90 -0
- package/dist/nse/api/corporate-api.js.map +1 -0
- package/dist/nse/api/download-api.d.ts +42 -0
- package/dist/nse/api/download-api.d.ts.map +1 -0
- package/dist/nse/api/download-api.js +144 -0
- package/dist/nse/api/download-api.js.map +1 -0
- package/dist/nse/api/equity-api.d.ts +50 -0
- package/dist/nse/api/equity-api.d.ts.map +1 -0
- package/dist/nse/api/equity-api.js +103 -0
- package/dist/nse/api/equity-api.js.map +1 -0
- package/dist/nse/api/historical-api.d.ts +34 -0
- package/dist/nse/api/historical-api.d.ts.map +1 -0
- package/dist/nse/api/historical-api.js +126 -0
- package/dist/nse/api/historical-api.js.map +1 -0
- package/dist/nse/api/index.d.ts +11 -0
- package/dist/nse/api/index.d.ts.map +1 -0
- package/dist/nse/api/index.js +11 -0
- package/dist/nse/api/index.js.map +1 -0
- package/dist/nse/api/ipo-api.d.ts +26 -0
- package/dist/nse/api/ipo-api.d.ts.map +1 -0
- package/dist/nse/api/ipo-api.js +46 -0
- package/dist/nse/api/ipo-api.js.map +1 -0
- package/dist/nse/api/market-api.d.ts +34 -0
- package/dist/nse/api/market-api.d.ts.map +1 -0
- package/dist/nse/api/market-api.js +58 -0
- package/dist/nse/api/market-api.js.map +1 -0
- package/dist/nse/api/options-api.d.ts +35 -0
- package/dist/nse/api/options-api.d.ts.map +1 -0
- package/dist/nse/api/options-api.js +207 -0
- package/dist/nse/api/options-api.js.map +1 -0
- package/dist/nse/constants/index.d.ts +29 -0
- package/dist/nse/constants/index.d.ts.map +1 -0
- package/dist/nse/constants/index.js +43 -0
- package/dist/nse/constants/index.js.map +1 -0
- package/dist/nse/http/http-client.d.ts +38 -0
- package/dist/nse/http/http-client.d.ts.map +1 -0
- package/dist/nse/http/http-client.js +164 -0
- package/dist/nse/http/http-client.js.map +1 -0
- package/dist/nse/index.d.ts +19 -0
- package/dist/nse/index.d.ts.map +1 -0
- package/dist/nse/index.js +24 -0
- package/dist/nse/index.js.map +1 -0
- package/dist/nse/nse/nse-client.d.ts +85 -0
- package/dist/nse/nse/nse-client.d.ts.map +1 -0
- package/dist/nse/nse/nse-client.js +105 -0
- package/dist/nse/nse/nse-client.js.map +1 -0
- package/dist/nse/types/index.d.ts +123 -0
- package/dist/nse/types/index.d.ts.map +1 -0
- package/dist/nse/types/index.js +5 -0
- package/dist/nse/types/index.js.map +1 -0
- package/dist/nse/utils/date-formatter.d.ts +36 -0
- package/dist/nse/utils/date-formatter.d.ts.map +1 -0
- package/dist/nse/utils/date-formatter.js +70 -0
- package/dist/nse/utils/date-formatter.js.map +1 -0
- package/dist/nse/utils/file-operations.d.ts +16 -0
- package/dist/nse/utils/file-operations.d.ts.map +1 -0
- package/dist/nse/utils/file-operations.js +74 -0
- package/dist/nse/utils/file-operations.js.map +1 -0
- package/dist/nse/utils/index.d.ts +6 -0
- package/dist/nse/utils/index.d.ts.map +1 -0
- package/dist/nse/utils/index.js +6 -0
- package/dist/nse/utils/index.js.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist-cjs/bse/BSE.js +493 -0
- package/dist-cjs/bse/BSE.js.map +1 -0
- package/dist-cjs/bse/constants/index.js +352 -0
- package/dist-cjs/bse/constants/index.js.map +1 -0
- package/dist-cjs/bse/index.js +36 -0
- package/dist-cjs/bse/index.js.map +1 -0
- package/dist-cjs/bse/types/index.js +26 -0
- package/dist-cjs/bse/types/index.js.map +1 -0
- package/dist-cjs/bse/utils/SymbolParser.js +62 -0
- package/dist-cjs/bse/utils/SymbolParser.js.map +1 -0
- package/dist-cjs/bse/utils/helpers.js +117 -0
- package/dist-cjs/bse/utils/helpers.js.map +1 -0
- package/dist-cjs/bse/utils/throttle.js +42 -0
- package/dist-cjs/bse/utils/throttle.js.map +1 -0
- package/dist-cjs/index.js +54 -0
- package/dist-cjs/index.js.map +1 -0
- package/dist-cjs/nse/api/corporate-api.js +94 -0
- package/dist-cjs/nse/api/corporate-api.js.map +1 -0
- package/dist-cjs/nse/api/download-api.js +151 -0
- package/dist-cjs/nse/api/download-api.js.map +1 -0
- package/dist-cjs/nse/api/equity-api.js +107 -0
- package/dist-cjs/nse/api/equity-api.js.map +1 -0
- package/dist-cjs/nse/api/historical-api.js +130 -0
- package/dist-cjs/nse/api/historical-api.js.map +1 -0
- package/dist-cjs/nse/api/index.js +21 -0
- package/dist-cjs/nse/api/index.js.map +1 -0
- package/dist-cjs/nse/api/ipo-api.js +50 -0
- package/dist-cjs/nse/api/ipo-api.js.map +1 -0
- package/dist-cjs/nse/api/market-api.js +62 -0
- package/dist-cjs/nse/api/market-api.js.map +1 -0
- package/dist-cjs/nse/api/options-api.js +211 -0
- package/dist-cjs/nse/api/options-api.js.map +1 -0
- package/dist-cjs/nse/constants/index.js +46 -0
- package/dist-cjs/nse/constants/index.js.map +1 -0
- package/dist-cjs/nse/http/http-client.js +171 -0
- package/dist-cjs/nse/http/http-client.js.map +1 -0
- package/dist-cjs/nse/index.js +50 -0
- package/dist-cjs/nse/index.js.map +1 -0
- package/dist-cjs/nse/nse/nse-client.js +109 -0
- package/dist-cjs/nse/nse/nse-client.js.map +1 -0
- package/dist-cjs/nse/types/index.js +6 -0
- package/dist-cjs/nse/types/index.js.map +1 -0
- package/dist-cjs/nse/utils/date-formatter.js +80 -0
- package/dist-cjs/nse/utils/date-formatter.js.map +1 -0
- package/dist-cjs/nse/utils/file-operations.js +82 -0
- package/dist-cjs/nse/utils/file-operations.js.map +1 -0
- package/dist-cjs/nse/utils/index.js +22 -0
- package/dist-cjs/nse/utils/index.js.map +1 -0
- package/dist-cjs/package.json +3 -0
- package/dist-cjs/types/index.js +47 -0
- package/dist-cjs/types/index.js.map +1 -0
- package/package.json +99 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 NSE-BSE API
|
|
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,194 @@
|
|
|
1
|
+
# NSE-BSE API
|
|
2
|
+
|
|
3
|
+
A unified TypeScript API for both NSE (National Stock Exchange) and BSE (Bombay Stock Exchange) India. This package combines the functionality of both exchanges while keeping their APIs separate and isolated.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### NSE API Features
|
|
8
|
+
- 📈 **Real-time Stock Quotes** - Get live stock prices and market data
|
|
9
|
+
- 📊 **Historical Data** - Fetch historical stock prices and indices
|
|
10
|
+
- 🔍 **Symbol Lookup** - Search for stocks and securities
|
|
11
|
+
- 📋 **Option Chain Data** - Complete options data with Greeks
|
|
12
|
+
- 🏢 **Corporate Actions** - Dividends, splits, bonuses, and more
|
|
13
|
+
- 📰 **Corporate Announcements** - Latest company announcements
|
|
14
|
+
- 💹 **Market Status** - Live market status and trading hours
|
|
15
|
+
- 📁 **Data Downloads** - Bhavcopy and other reports
|
|
16
|
+
- 🎯 **IPO Information** - Current, past, and upcoming IPOs
|
|
17
|
+
|
|
18
|
+
### BSE API Features
|
|
19
|
+
- 📈 **Stock Quotes** - Real-time BSE stock prices
|
|
20
|
+
- 📊 **Historical Data** - Historical price data and indices
|
|
21
|
+
- 🔍 **Symbol Search** - Find BSE listed companies
|
|
22
|
+
- 🏆 **Gainers/Losers** - Top performing stocks
|
|
23
|
+
- 📋 **Corporate Actions** - Dividend, bonus, rights issues
|
|
24
|
+
- 📰 **Announcements** - Corporate announcements and news
|
|
25
|
+
- 📁 **Reports** - Bhavcopy and delivery reports
|
|
26
|
+
- 🎯 **Result Calendar** - Earnings announcement dates
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install nse-bse-api
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### Using Both APIs
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { NSE, BSE } from 'nse-bse-api';
|
|
40
|
+
|
|
41
|
+
// Initialize clients
|
|
42
|
+
const nse = new NSE();
|
|
43
|
+
const bse = new BSE();
|
|
44
|
+
|
|
45
|
+
// Get NSE quote
|
|
46
|
+
const nseQuote = await nse.equityQuote('RELIANCE');
|
|
47
|
+
console.log('NSE RELIANCE:', nseQuote);
|
|
48
|
+
|
|
49
|
+
// Get BSE quote
|
|
50
|
+
const bseQuote = await bse.quote('500325'); // RELIANCE BSE code
|
|
51
|
+
console.log('BSE RELIANCE:', bseQuote);
|
|
52
|
+
|
|
53
|
+
// Clean up
|
|
54
|
+
await nse.exit();
|
|
55
|
+
await bse.close();
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Using Individual APIs
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// Import only NSE
|
|
62
|
+
import { NSE } from 'nse-bse-api/nse';
|
|
63
|
+
|
|
64
|
+
const nse = new NSE();
|
|
65
|
+
const quote = await nse.equityQuote('TCS');
|
|
66
|
+
|
|
67
|
+
// Import only BSE
|
|
68
|
+
import { BSE } from 'nse-bse-api/bse';
|
|
69
|
+
|
|
70
|
+
const bse = new BSE();
|
|
71
|
+
const quote = await bse.quote('532540'); // TCS BSE code
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## API Documentation
|
|
75
|
+
|
|
76
|
+
### NSE API
|
|
77
|
+
|
|
78
|
+
#### Basic Usage
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import { NSE } from 'nse-bse-api';
|
|
82
|
+
|
|
83
|
+
const nse = new NSE('./downloads');
|
|
84
|
+
|
|
85
|
+
// Get stock quote
|
|
86
|
+
const quote = await nse.equityQuote('RELIANCE');
|
|
87
|
+
|
|
88
|
+
// Get historical data
|
|
89
|
+
const historical = await nse.historical.fetchEquityHistoricalData({
|
|
90
|
+
symbol: 'RELIANCE',
|
|
91
|
+
from_date: new Date('2024-01-01'),
|
|
92
|
+
to_date: new Date('2024-01-31')
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Get option chain
|
|
96
|
+
const optionChain = await nse.options.getOptionChain('NIFTY');
|
|
97
|
+
|
|
98
|
+
// Search symbols
|
|
99
|
+
const results = await nse.market.lookup('reliance');
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### Available Methods
|
|
103
|
+
|
|
104
|
+
- `equityQuote(symbol)` - Get equity quote
|
|
105
|
+
- `market.lookup(query)` - Search symbols
|
|
106
|
+
- `market.getStatus()` - Market status
|
|
107
|
+
- `historical.fetchEquityHistoricalData(params)` - Historical data
|
|
108
|
+
- `options.getOptionChain(symbol)` - Option chain
|
|
109
|
+
- `corporate.getActions(params)` - Corporate actions
|
|
110
|
+
- `ipo.listCurrentIPO()` - Current IPOs
|
|
111
|
+
|
|
112
|
+
### BSE API
|
|
113
|
+
|
|
114
|
+
#### Basic Usage
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { BSE } from 'nse-bse-api';
|
|
118
|
+
|
|
119
|
+
const bse = new BSE();
|
|
120
|
+
|
|
121
|
+
// Get stock quote
|
|
122
|
+
const quote = await bse.quote('500325'); // RELIANCE
|
|
123
|
+
|
|
124
|
+
// Get gainers
|
|
125
|
+
const gainers = await bse.gainers();
|
|
126
|
+
|
|
127
|
+
// Get corporate actions
|
|
128
|
+
const actions = await bse.actions({
|
|
129
|
+
fromDate: new Date('2024-01-01'),
|
|
130
|
+
toDate: new Date('2024-01-31')
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// Search symbol
|
|
134
|
+
const results = await bse.lookupSymbol('reliance');
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Available Methods
|
|
138
|
+
|
|
139
|
+
- `quote(scripcode)` - Get stock quote
|
|
140
|
+
- `gainers(options)` - Top gainers
|
|
141
|
+
- `losers(options)` - Top losers
|
|
142
|
+
- `actions(options)` - Corporate actions
|
|
143
|
+
- `announcements(options)` - Corporate announcements
|
|
144
|
+
- `lookupSymbol(text)` - Search symbols
|
|
145
|
+
- `fetchHistoricalIndexData(options)` - Historical index data
|
|
146
|
+
|
|
147
|
+
## Configuration
|
|
148
|
+
|
|
149
|
+
### NSE Configuration
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
const nse = new NSE('./downloads', {
|
|
153
|
+
server: false, // Use server mode
|
|
154
|
+
timeout: 10000 // Request timeout in ms
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### BSE Configuration
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
const bse = new BSE({
|
|
162
|
+
downloadFolder: './downloads',
|
|
163
|
+
timeout: 10000
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Error Handling
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { NSE, BSE } from 'nse-bse-api';
|
|
171
|
+
|
|
172
|
+
try {
|
|
173
|
+
const nse = new NSE();
|
|
174
|
+
const quote = await nse.equityQuote('INVALID');
|
|
175
|
+
} catch (error) {
|
|
176
|
+
console.error('NSE Error:', error.message);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
const bse = new BSE();
|
|
181
|
+
const quote = await bse.quote('INVALID');
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.error('BSE Error:', error.message);
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
194
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { BSEConfig, QuoteData, ActionData, AnnouncementsResponse, ResultCalendarData, AdvanceDeclineData, GainerLoserData, Near52WeekData, WeeklyHighLowData, SecurityData, LookupResult, IndexData, Segment, ByDateType, ByType, PctChange, Period, Status } from './types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Unofficial TypeScript API for BSE India
|
|
4
|
+
*/
|
|
5
|
+
export declare class BSE {
|
|
6
|
+
static readonly version = "1.0.0";
|
|
7
|
+
static readonly baseUrl = "https://www.bseindia.com/";
|
|
8
|
+
static readonly apiUrl = "https://api.bseindia.com/BseIndiaAPI/api";
|
|
9
|
+
static readonly validGroups: string[];
|
|
10
|
+
private session;
|
|
11
|
+
private dir;
|
|
12
|
+
private symbolParser;
|
|
13
|
+
constructor(config?: BSEConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Close the HTTP session
|
|
16
|
+
*/
|
|
17
|
+
close(): void;
|
|
18
|
+
private download;
|
|
19
|
+
private request;
|
|
20
|
+
private lookup;
|
|
21
|
+
/**
|
|
22
|
+
* Download the daily bhavcopy report for specified date
|
|
23
|
+
*/
|
|
24
|
+
bhavcopyReport(date: Date, folder?: string): Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Download the daily delivery report for specified date
|
|
27
|
+
*/
|
|
28
|
+
deliveryReport(date: Date, folder?: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* All corporate announcements
|
|
31
|
+
*/
|
|
32
|
+
announcements(options?: {
|
|
33
|
+
pageNo?: number;
|
|
34
|
+
fromDate?: Date;
|
|
35
|
+
toDate?: Date;
|
|
36
|
+
segment?: Segment;
|
|
37
|
+
scripcode?: string;
|
|
38
|
+
category?: string;
|
|
39
|
+
subcategory?: string;
|
|
40
|
+
}): Promise<AnnouncementsResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* All forthcoming corporate actions
|
|
43
|
+
*/
|
|
44
|
+
actions(options?: {
|
|
45
|
+
segment?: Segment;
|
|
46
|
+
fromDate?: Date;
|
|
47
|
+
toDate?: Date;
|
|
48
|
+
byDate?: ByDateType;
|
|
49
|
+
scripcode?: string;
|
|
50
|
+
sector?: string;
|
|
51
|
+
purposeCode?: string;
|
|
52
|
+
}): Promise<ActionData[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Corporate result calendar
|
|
55
|
+
*/
|
|
56
|
+
resultCalendar(options?: {
|
|
57
|
+
fromDate?: Date;
|
|
58
|
+
toDate?: Date;
|
|
59
|
+
scripcode?: string;
|
|
60
|
+
}): Promise<ResultCalendarData[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Advance decline values for all BSE indices
|
|
63
|
+
*/
|
|
64
|
+
advanceDecline(): Promise<AdvanceDeclineData[]>;
|
|
65
|
+
/**
|
|
66
|
+
* List of top gainers
|
|
67
|
+
*/
|
|
68
|
+
gainers(options?: {
|
|
69
|
+
by?: ByType;
|
|
70
|
+
name?: string;
|
|
71
|
+
pctChange?: PctChange;
|
|
72
|
+
}): Promise<GainerLoserData[]>;
|
|
73
|
+
/**
|
|
74
|
+
* List of top losers
|
|
75
|
+
*/
|
|
76
|
+
losers(options?: {
|
|
77
|
+
by?: ByType;
|
|
78
|
+
name?: string;
|
|
79
|
+
pctChange?: PctChange;
|
|
80
|
+
}): Promise<GainerLoserData[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Get stocks near 52 week highs and lows
|
|
83
|
+
*/
|
|
84
|
+
near52WeekHighLow(options?: {
|
|
85
|
+
by?: ByType;
|
|
86
|
+
name?: string;
|
|
87
|
+
}): Promise<Near52WeekData>;
|
|
88
|
+
/**
|
|
89
|
+
* Get OHLC quotes for given scripcode
|
|
90
|
+
*/
|
|
91
|
+
quote(scripcode: string): Promise<QuoteData>;
|
|
92
|
+
/**
|
|
93
|
+
* Get 52 week and monthly high & low data for given stock
|
|
94
|
+
*/
|
|
95
|
+
quoteWeeklyHL(scripcode: string): Promise<WeeklyHighLowData>;
|
|
96
|
+
/**
|
|
97
|
+
* List securities and their meta info
|
|
98
|
+
*/
|
|
99
|
+
listSecurities(options?: {
|
|
100
|
+
industry?: string;
|
|
101
|
+
scripcode?: string;
|
|
102
|
+
group?: string;
|
|
103
|
+
segment?: string;
|
|
104
|
+
status?: Status;
|
|
105
|
+
}): Promise<SecurityData[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Search by Company name, stock symbol, ISIN or BSE code
|
|
108
|
+
*/
|
|
109
|
+
lookupSymbol(text: string): Promise<LookupResult | null>;
|
|
110
|
+
/**
|
|
111
|
+
* Get stock symbol name for BSE scrip code
|
|
112
|
+
*/
|
|
113
|
+
getScripName(scripcode: string): Promise<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Get BSE scrip code for stock symbol name
|
|
116
|
+
*/
|
|
117
|
+
getScripCode(scripname: string): Promise<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Fetch daily data for all indices for a given date
|
|
120
|
+
*/
|
|
121
|
+
fetchAllIndicesDataByDate(date: Date): Promise<Record<string, IndexData[]>>;
|
|
122
|
+
/**
|
|
123
|
+
* Download historical data for the specified index for the given date range
|
|
124
|
+
*/
|
|
125
|
+
fetchHistoricalIndexData(options: {
|
|
126
|
+
index: string;
|
|
127
|
+
fromDate: Date;
|
|
128
|
+
toDate: Date;
|
|
129
|
+
period?: Period;
|
|
130
|
+
folder?: string;
|
|
131
|
+
}): Promise<string | null>;
|
|
132
|
+
/**
|
|
133
|
+
* Fetch the list of Indices
|
|
134
|
+
*/
|
|
135
|
+
fetchIndexNames(): Promise<Record<string, IndexData[]>>;
|
|
136
|
+
/**
|
|
137
|
+
* Returns metadata about AllIndices report
|
|
138
|
+
*/
|
|
139
|
+
fetchIndexReportMetadata(): Promise<Record<string, IndexData[]>>;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=BSE.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BSE.d.ts","sourceRoot":"","sources":["../../src/bse/BSE.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EAIP,MAAM,kBAAkB,CAAC;AAK1B;;GAEG;AACH,qBAAa,GAAG;IACd,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAClC,MAAM,CAAC,QAAQ,CAAC,OAAO,+BAA+B;IACtD,MAAM,CAAC,QAAQ,CAAC,MAAM,8CAA8C;IAEpE,MAAM,CAAC,QAAQ,CAAC,WAAW,WAGzB;IAEF,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,GAAE,SAAc;IAmBlC;;OAEG;IACH,KAAK,IAAI,IAAI;YAIC,QAAQ;YAqCR,OAAO;YAwBP,MAAM;IAUpB;;OAEG;IACG,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAclE;;OAEG;IACG,cAAc,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