reportify-sdk 0.2.4 → 0.2.6
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 +48 -5
- package/dist/index.d.ts +48 -5
- package/dist/index.js +42 -4
- package/dist/index.mjs +42 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -117,7 +117,7 @@ type Market = 'us' | 'hk' | 'cn';
|
|
|
117
117
|
type IPOStatus = 'Filing' | 'Hearing' | 'Priced';
|
|
118
118
|
interface IndustryConstituent {
|
|
119
119
|
symbol: string;
|
|
120
|
-
|
|
120
|
+
market: string;
|
|
121
121
|
name: string;
|
|
122
122
|
type_name?: string;
|
|
123
123
|
industry_one_level_name?: string;
|
|
@@ -125,6 +125,17 @@ interface IndustryConstituent {
|
|
|
125
125
|
industry_third_level_name?: string;
|
|
126
126
|
[key: string]: unknown;
|
|
127
127
|
}
|
|
128
|
+
interface IndexConstituent {
|
|
129
|
+
market: string;
|
|
130
|
+
symbol: string;
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
}
|
|
133
|
+
interface IndexFund {
|
|
134
|
+
short_name: string;
|
|
135
|
+
name: string;
|
|
136
|
+
symbol: string;
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
}
|
|
128
139
|
interface TimelineOptions {
|
|
129
140
|
num?: number;
|
|
130
141
|
}
|
|
@@ -292,14 +303,46 @@ declare class StockModule {
|
|
|
292
303
|
* @example
|
|
293
304
|
* ```typescript
|
|
294
305
|
* // Get CN defense industry stocks
|
|
295
|
-
* const stocks = await client.stock.
|
|
306
|
+
* const stocks = await client.stock.industryConstituents('cn', '军工');
|
|
296
307
|
* console.log(stocks);
|
|
297
308
|
*
|
|
298
309
|
* // Get US technology stocks
|
|
299
|
-
* const techStocks = await client.stock.
|
|
310
|
+
* const techStocks = await client.stock.industryConstituents('us', 'Technology');
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
industryConstituents(market: Market, name: string, type?: string): Promise<IndustryConstituent[]>;
|
|
314
|
+
/**
|
|
315
|
+
* Get constituent stocks of an index
|
|
316
|
+
*
|
|
317
|
+
* @param symbol - Index symbol
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```typescript
|
|
321
|
+
* // Get CSI 300 constituent stocks
|
|
322
|
+
* const stocks = await client.stock.indexConstituents('000300');
|
|
323
|
+
* console.log(stocks);
|
|
324
|
+
*
|
|
325
|
+
* // Get ChiNext constituent stocks
|
|
326
|
+
* const stocks = await client.stock.indexConstituents('399006');
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
indexConstituents(symbol: string): Promise<IndexConstituent[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Get tracking funds of an index
|
|
332
|
+
*
|
|
333
|
+
* @param symbol - Index symbol
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```typescript
|
|
337
|
+
* // Get CSI 300 tracking funds
|
|
338
|
+
* const funds = await client.stock.indexTrackingFunds('000300');
|
|
339
|
+
* console.log(funds);
|
|
340
|
+
*
|
|
341
|
+
* // Get SSE 50 tracking funds
|
|
342
|
+
* const funds = await client.stock.indexTrackingFunds('000016');
|
|
300
343
|
* ```
|
|
301
344
|
*/
|
|
302
|
-
|
|
345
|
+
indexTrackingFunds(symbol: string): Promise<IndexFund[]>;
|
|
303
346
|
private normalizeArrayResponse;
|
|
304
347
|
}
|
|
305
348
|
|
|
@@ -827,4 +870,4 @@ declare class Reportify {
|
|
|
827
870
|
searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
|
|
828
871
|
}
|
|
829
872
|
|
|
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 };
|
|
873
|
+
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 IndexConstituent, type IndexFund, 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
|
@@ -117,7 +117,7 @@ type Market = 'us' | 'hk' | 'cn';
|
|
|
117
117
|
type IPOStatus = 'Filing' | 'Hearing' | 'Priced';
|
|
118
118
|
interface IndustryConstituent {
|
|
119
119
|
symbol: string;
|
|
120
|
-
|
|
120
|
+
market: string;
|
|
121
121
|
name: string;
|
|
122
122
|
type_name?: string;
|
|
123
123
|
industry_one_level_name?: string;
|
|
@@ -125,6 +125,17 @@ interface IndustryConstituent {
|
|
|
125
125
|
industry_third_level_name?: string;
|
|
126
126
|
[key: string]: unknown;
|
|
127
127
|
}
|
|
128
|
+
interface IndexConstituent {
|
|
129
|
+
market: string;
|
|
130
|
+
symbol: string;
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
}
|
|
133
|
+
interface IndexFund {
|
|
134
|
+
short_name: string;
|
|
135
|
+
name: string;
|
|
136
|
+
symbol: string;
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
}
|
|
128
139
|
interface TimelineOptions {
|
|
129
140
|
num?: number;
|
|
130
141
|
}
|
|
@@ -292,14 +303,46 @@ declare class StockModule {
|
|
|
292
303
|
* @example
|
|
293
304
|
* ```typescript
|
|
294
305
|
* // Get CN defense industry stocks
|
|
295
|
-
* const stocks = await client.stock.
|
|
306
|
+
* const stocks = await client.stock.industryConstituents('cn', '军工');
|
|
296
307
|
* console.log(stocks);
|
|
297
308
|
*
|
|
298
309
|
* // Get US technology stocks
|
|
299
|
-
* const techStocks = await client.stock.
|
|
310
|
+
* const techStocks = await client.stock.industryConstituents('us', 'Technology');
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
industryConstituents(market: Market, name: string, type?: string): Promise<IndustryConstituent[]>;
|
|
314
|
+
/**
|
|
315
|
+
* Get constituent stocks of an index
|
|
316
|
+
*
|
|
317
|
+
* @param symbol - Index symbol
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```typescript
|
|
321
|
+
* // Get CSI 300 constituent stocks
|
|
322
|
+
* const stocks = await client.stock.indexConstituents('000300');
|
|
323
|
+
* console.log(stocks);
|
|
324
|
+
*
|
|
325
|
+
* // Get ChiNext constituent stocks
|
|
326
|
+
* const stocks = await client.stock.indexConstituents('399006');
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
indexConstituents(symbol: string): Promise<IndexConstituent[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Get tracking funds of an index
|
|
332
|
+
*
|
|
333
|
+
* @param symbol - Index symbol
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```typescript
|
|
337
|
+
* // Get CSI 300 tracking funds
|
|
338
|
+
* const funds = await client.stock.indexTrackingFunds('000300');
|
|
339
|
+
* console.log(funds);
|
|
340
|
+
*
|
|
341
|
+
* // Get SSE 50 tracking funds
|
|
342
|
+
* const funds = await client.stock.indexTrackingFunds('000016');
|
|
300
343
|
* ```
|
|
301
344
|
*/
|
|
302
|
-
|
|
345
|
+
indexTrackingFunds(symbol: string): Promise<IndexFund[]>;
|
|
303
346
|
private normalizeArrayResponse;
|
|
304
347
|
}
|
|
305
348
|
|
|
@@ -827,4 +870,4 @@ declare class Reportify {
|
|
|
827
870
|
searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
|
|
828
871
|
}
|
|
829
872
|
|
|
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 };
|
|
873
|
+
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 IndexConstituent, type IndexFund, 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
|
@@ -265,19 +265,57 @@ var StockModule = class {
|
|
|
265
265
|
* @example
|
|
266
266
|
* ```typescript
|
|
267
267
|
* // Get CN defense industry stocks
|
|
268
|
-
* const stocks = await client.stock.
|
|
268
|
+
* const stocks = await client.stock.industryConstituents('cn', '军工');
|
|
269
269
|
* console.log(stocks);
|
|
270
270
|
*
|
|
271
271
|
* // Get US technology stocks
|
|
272
|
-
* const techStocks = await client.stock.
|
|
272
|
+
* const techStocks = await client.stock.industryConstituents('us', 'Technology');
|
|
273
273
|
* ```
|
|
274
274
|
*/
|
|
275
|
-
async
|
|
275
|
+
async industryConstituents(market, name, type) {
|
|
276
276
|
const body = { market, name };
|
|
277
277
|
if (type) {
|
|
278
278
|
body.type = type;
|
|
279
279
|
}
|
|
280
|
-
const response = await this.client.post("/v1/stock/industry-
|
|
280
|
+
const response = await this.client.post("/v1/stock/industry-constituents", body);
|
|
281
|
+
return this.normalizeArrayResponse(response);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Get constituent stocks of an index
|
|
285
|
+
*
|
|
286
|
+
* @param symbol - Index symbol
|
|
287
|
+
*
|
|
288
|
+
* @example
|
|
289
|
+
* ```typescript
|
|
290
|
+
* // Get CSI 300 constituent stocks
|
|
291
|
+
* const stocks = await client.stock.indexConstituents('000300');
|
|
292
|
+
* console.log(stocks);
|
|
293
|
+
*
|
|
294
|
+
* // Get ChiNext constituent stocks
|
|
295
|
+
* const stocks = await client.stock.indexConstituents('399006');
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
async indexConstituents(symbol) {
|
|
299
|
+
const response = await this.client.post("/v1/stock/index-constituents", { symbol });
|
|
300
|
+
return this.normalizeArrayResponse(response);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Get tracking funds of an index
|
|
304
|
+
*
|
|
305
|
+
* @param symbol - Index symbol
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* // Get CSI 300 tracking funds
|
|
310
|
+
* const funds = await client.stock.indexTrackingFunds('000300');
|
|
311
|
+
* console.log(funds);
|
|
312
|
+
*
|
|
313
|
+
* // Get SSE 50 tracking funds
|
|
314
|
+
* const funds = await client.stock.indexTrackingFunds('000016');
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
async indexTrackingFunds(symbol) {
|
|
318
|
+
const response = await this.client.post("/v1/stock/index-tracking-funds", { symbol });
|
|
281
319
|
return this.normalizeArrayResponse(response);
|
|
282
320
|
}
|
|
283
321
|
// ===========================================================================
|
package/dist/index.mjs
CHANGED
|
@@ -229,19 +229,57 @@ var StockModule = class {
|
|
|
229
229
|
* @example
|
|
230
230
|
* ```typescript
|
|
231
231
|
* // Get CN defense industry stocks
|
|
232
|
-
* const stocks = await client.stock.
|
|
232
|
+
* const stocks = await client.stock.industryConstituents('cn', '军工');
|
|
233
233
|
* console.log(stocks);
|
|
234
234
|
*
|
|
235
235
|
* // Get US technology stocks
|
|
236
|
-
* const techStocks = await client.stock.
|
|
236
|
+
* const techStocks = await client.stock.industryConstituents('us', 'Technology');
|
|
237
237
|
* ```
|
|
238
238
|
*/
|
|
239
|
-
async
|
|
239
|
+
async industryConstituents(market, name, type) {
|
|
240
240
|
const body = { market, name };
|
|
241
241
|
if (type) {
|
|
242
242
|
body.type = type;
|
|
243
243
|
}
|
|
244
|
-
const response = await this.client.post("/v1/stock/industry-
|
|
244
|
+
const response = await this.client.post("/v1/stock/industry-constituents", body);
|
|
245
|
+
return this.normalizeArrayResponse(response);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Get constituent stocks of an index
|
|
249
|
+
*
|
|
250
|
+
* @param symbol - Index symbol
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```typescript
|
|
254
|
+
* // Get CSI 300 constituent stocks
|
|
255
|
+
* const stocks = await client.stock.indexConstituents('000300');
|
|
256
|
+
* console.log(stocks);
|
|
257
|
+
*
|
|
258
|
+
* // Get ChiNext constituent stocks
|
|
259
|
+
* const stocks = await client.stock.indexConstituents('399006');
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
async indexConstituents(symbol) {
|
|
263
|
+
const response = await this.client.post("/v1/stock/index-constituents", { symbol });
|
|
264
|
+
return this.normalizeArrayResponse(response);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Get tracking funds of an index
|
|
268
|
+
*
|
|
269
|
+
* @param symbol - Index symbol
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```typescript
|
|
273
|
+
* // Get CSI 300 tracking funds
|
|
274
|
+
* const funds = await client.stock.indexTrackingFunds('000300');
|
|
275
|
+
* console.log(funds);
|
|
276
|
+
*
|
|
277
|
+
* // Get SSE 50 tracking funds
|
|
278
|
+
* const funds = await client.stock.indexTrackingFunds('000016');
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
async indexTrackingFunds(symbol) {
|
|
282
|
+
const response = await this.client.post("/v1/stock/index-tracking-funds", { symbol });
|
|
245
283
|
return this.normalizeArrayResponse(response);
|
|
246
284
|
}
|
|
247
285
|
// ===========================================================================
|