reportify-sdk 0.2.2 → 0.2.3
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/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +25 -0
- package/dist/index.mjs +25 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -115,6 +115,16 @@ type Interval = '1d' | '1w' | '1m';
|
|
|
115
115
|
type PriceAdjust = 'forward' | 'backward' | 'none';
|
|
116
116
|
type Market = 'us' | 'hk' | 'cn';
|
|
117
117
|
type IPOStatus = 'Filing' | 'Hearing' | 'Priced';
|
|
118
|
+
interface IndustryConstituent {
|
|
119
|
+
symbol: string;
|
|
120
|
+
area: string;
|
|
121
|
+
name: string;
|
|
122
|
+
type_name?: string;
|
|
123
|
+
industry_one_level_name?: string;
|
|
124
|
+
industry_second_level_name?: string;
|
|
125
|
+
industry_third_level_name?: string;
|
|
126
|
+
[key: string]: unknown;
|
|
127
|
+
}
|
|
118
128
|
interface TimelineOptions {
|
|
119
129
|
num?: number;
|
|
120
130
|
}
|
|
@@ -272,6 +282,24 @@ declare class StockModule {
|
|
|
272
282
|
* Get Hong Kong IPO calendar
|
|
273
283
|
*/
|
|
274
284
|
ipoCalendarHK(status?: IPOStatus): Promise<IPOEvent[]>;
|
|
285
|
+
/**
|
|
286
|
+
* Get constituent stocks of an industry
|
|
287
|
+
*
|
|
288
|
+
* @param market - Stock market ("cn", "hk", "us")
|
|
289
|
+
* @param name - Industry name
|
|
290
|
+
* @param type - Industry classification type (optional)
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```typescript
|
|
294
|
+
* // Get CN defense industry stocks
|
|
295
|
+
* const stocks = await client.stock.industryConstituent('cn', '军工');
|
|
296
|
+
* console.log(stocks);
|
|
297
|
+
*
|
|
298
|
+
* // Get US technology stocks
|
|
299
|
+
* const techStocks = await client.stock.industryConstituent('us', 'Technology');
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
industryConstituent(market: Market, name: string, type?: string): Promise<IndustryConstituent[]>;
|
|
275
303
|
private normalizeArrayResponse;
|
|
276
304
|
}
|
|
277
305
|
|
|
@@ -799,4 +827,4 @@ declare class Reportify {
|
|
|
799
827
|
searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
|
|
800
828
|
}
|
|
801
829
|
|
|
802
|
-
export { APIError, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Chunk, type CompanyInfo, type CompanyOverview, DocsModule, type Document, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type IPOEvent, type IPOStatus, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type Interval, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceAdjust, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions };
|
|
830
|
+
export { APIError, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Chunk, type CompanyInfo, type CompanyOverview, DocsModule, type Document, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type IPOEvent, type IPOStatus, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, type Interval, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceAdjust, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,16 @@ type Interval = '1d' | '1w' | '1m';
|
|
|
115
115
|
type PriceAdjust = 'forward' | 'backward' | 'none';
|
|
116
116
|
type Market = 'us' | 'hk' | 'cn';
|
|
117
117
|
type IPOStatus = 'Filing' | 'Hearing' | 'Priced';
|
|
118
|
+
interface IndustryConstituent {
|
|
119
|
+
symbol: string;
|
|
120
|
+
area: string;
|
|
121
|
+
name: string;
|
|
122
|
+
type_name?: string;
|
|
123
|
+
industry_one_level_name?: string;
|
|
124
|
+
industry_second_level_name?: string;
|
|
125
|
+
industry_third_level_name?: string;
|
|
126
|
+
[key: string]: unknown;
|
|
127
|
+
}
|
|
118
128
|
interface TimelineOptions {
|
|
119
129
|
num?: number;
|
|
120
130
|
}
|
|
@@ -272,6 +282,24 @@ declare class StockModule {
|
|
|
272
282
|
* Get Hong Kong IPO calendar
|
|
273
283
|
*/
|
|
274
284
|
ipoCalendarHK(status?: IPOStatus): Promise<IPOEvent[]>;
|
|
285
|
+
/**
|
|
286
|
+
* Get constituent stocks of an industry
|
|
287
|
+
*
|
|
288
|
+
* @param market - Stock market ("cn", "hk", "us")
|
|
289
|
+
* @param name - Industry name
|
|
290
|
+
* @param type - Industry classification type (optional)
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```typescript
|
|
294
|
+
* // Get CN defense industry stocks
|
|
295
|
+
* const stocks = await client.stock.industryConstituent('cn', '军工');
|
|
296
|
+
* console.log(stocks);
|
|
297
|
+
*
|
|
298
|
+
* // Get US technology stocks
|
|
299
|
+
* const techStocks = await client.stock.industryConstituent('us', 'Technology');
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
industryConstituent(market: Market, name: string, type?: string): Promise<IndustryConstituent[]>;
|
|
275
303
|
private normalizeArrayResponse;
|
|
276
304
|
}
|
|
277
305
|
|
|
@@ -799,4 +827,4 @@ declare class Reportify {
|
|
|
799
827
|
searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
|
|
800
828
|
}
|
|
801
829
|
|
|
802
|
-
export { APIError, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Chunk, type CompanyInfo, type CompanyOverview, DocsModule, type Document, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type IPOEvent, type IPOStatus, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type Interval, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceAdjust, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions };
|
|
830
|
+
export { APIError, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Chunk, type CompanyInfo, type CompanyOverview, DocsModule, type Document, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type IPOEvent, type IPOStatus, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, type Interval, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceAdjust, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions };
|
package/dist/index.js
CHANGED
|
@@ -255,6 +255,31 @@ var StockModule = class {
|
|
|
255
255
|
);
|
|
256
256
|
return this.normalizeArrayResponse(response);
|
|
257
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Get constituent stocks of an industry
|
|
260
|
+
*
|
|
261
|
+
* @param market - Stock market ("cn", "hk", "us")
|
|
262
|
+
* @param name - Industry name
|
|
263
|
+
* @param type - Industry classification type (optional)
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```typescript
|
|
267
|
+
* // Get CN defense industry stocks
|
|
268
|
+
* const stocks = await client.stock.industryConstituent('cn', '军工');
|
|
269
|
+
* console.log(stocks);
|
|
270
|
+
*
|
|
271
|
+
* // Get US technology stocks
|
|
272
|
+
* const techStocks = await client.stock.industryConstituent('us', 'Technology');
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
async industryConstituent(market, name, type) {
|
|
276
|
+
const body = { market, name };
|
|
277
|
+
if (type) {
|
|
278
|
+
body.type = type;
|
|
279
|
+
}
|
|
280
|
+
const response = await this.client.post("/v1/stock/industry-constituent", body);
|
|
281
|
+
return this.normalizeArrayResponse(response);
|
|
282
|
+
}
|
|
258
283
|
// ===========================================================================
|
|
259
284
|
// Helper Methods
|
|
260
285
|
// ===========================================================================
|
package/dist/index.mjs
CHANGED
|
@@ -219,6 +219,31 @@ var StockModule = class {
|
|
|
219
219
|
);
|
|
220
220
|
return this.normalizeArrayResponse(response);
|
|
221
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Get constituent stocks of an industry
|
|
224
|
+
*
|
|
225
|
+
* @param market - Stock market ("cn", "hk", "us")
|
|
226
|
+
* @param name - Industry name
|
|
227
|
+
* @param type - Industry classification type (optional)
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```typescript
|
|
231
|
+
* // Get CN defense industry stocks
|
|
232
|
+
* const stocks = await client.stock.industryConstituent('cn', '军工');
|
|
233
|
+
* console.log(stocks);
|
|
234
|
+
*
|
|
235
|
+
* // Get US technology stocks
|
|
236
|
+
* const techStocks = await client.stock.industryConstituent('us', 'Technology');
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
async industryConstituent(market, name, type) {
|
|
240
|
+
const body = { market, name };
|
|
241
|
+
if (type) {
|
|
242
|
+
body.type = type;
|
|
243
|
+
}
|
|
244
|
+
const response = await this.client.post("/v1/stock/industry-constituent", body);
|
|
245
|
+
return this.normalizeArrayResponse(response);
|
|
246
|
+
}
|
|
222
247
|
// ===========================================================================
|
|
223
248
|
// Helper Methods
|
|
224
249
|
// ===========================================================================
|