reportify-sdk 0.3.6 → 0.3.8
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/README.md +8 -11
- package/dist/index.d.mts +7 -13
- package/dist/index.d.ts +7 -13
- package/dist/index.js +13 -27
- package/dist/index.mjs +13 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,19 +44,16 @@ const transcripts = await client.searchTranscripts('guidance', { symbols: ['US:T
|
|
|
44
44
|
|
|
45
45
|
```typescript
|
|
46
46
|
// Financial statements
|
|
47
|
-
const income = await client.stock.incomeStatement('
|
|
48
|
-
const balance = await client.stock.balanceSheet('
|
|
49
|
-
const cashflow = await client.stock.cashflowStatement('
|
|
47
|
+
const income = await client.stock.incomeStatement('AAPL', { period: 'quarterly' });
|
|
48
|
+
const balance = await client.stock.balanceSheet('AAPL');
|
|
49
|
+
const cashflow = await client.stock.cashflowStatement('AAPL');
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
const
|
|
51
|
+
// Stock quote (price data)
|
|
52
|
+
const quote = await client.stock.quote('AAPL', { startDate: '2024-01-01' });
|
|
53
53
|
|
|
54
|
-
//
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
// Company info
|
|
58
|
-
const overview = await client.stock.overview('US:AAPL');
|
|
59
|
-
const shareholders = await client.stock.shareholders('US:AAPL');
|
|
54
|
+
// Company info (symbols without market prefix)
|
|
55
|
+
const overview = await client.stock.overview({ symbols: 'AAPL' });
|
|
56
|
+
const shareholders = await client.stock.shareholders('AAPL');
|
|
60
57
|
|
|
61
58
|
// Earnings calendar
|
|
62
59
|
const earnings = await client.stock.earningsCalendar({ market: 'us', startDate: '2024-01-01', endDate: '2024-01-31' });
|
package/dist/index.d.mts
CHANGED
|
@@ -289,12 +289,12 @@ declare class StockModule {
|
|
|
289
289
|
*
|
|
290
290
|
* @example
|
|
291
291
|
* ```typescript
|
|
292
|
-
* // Single stock by symbol
|
|
293
|
-
* const info = await client.stock.overview({ symbols: '
|
|
292
|
+
* // Single stock by symbol (without market prefix)
|
|
293
|
+
* const info = await client.stock.overview({ symbols: 'AAPL' });
|
|
294
294
|
* console.log(info.name, info.sector);
|
|
295
295
|
*
|
|
296
296
|
* // Multiple stocks by symbols
|
|
297
|
-
* const infos = await client.stock.overview({ symbols: '
|
|
297
|
+
* const infos = await client.stock.overview({ symbols: '000001,600519' });
|
|
298
298
|
* for (const info of infos) {
|
|
299
299
|
* console.log(info.name);
|
|
300
300
|
* }
|
|
@@ -399,28 +399,22 @@ declare class StockModule {
|
|
|
399
399
|
fiscalYear?: string;
|
|
400
400
|
}): Promise<FinancialStatement[]>;
|
|
401
401
|
/**
|
|
402
|
-
* Get historical
|
|
402
|
+
* Get stock quote - current and historical prices with market data
|
|
403
403
|
*
|
|
404
404
|
* @param symbol - Stock symbol
|
|
405
405
|
* @param options - Query options
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
quote(symbol: string, options?: {
|
|
408
408
|
startDate?: string;
|
|
409
409
|
endDate?: string;
|
|
410
410
|
}): Promise<PriceData[]>;
|
|
411
411
|
/**
|
|
412
|
-
* Get
|
|
413
|
-
*
|
|
414
|
-
* @param symbol - Stock symbol
|
|
415
|
-
*/
|
|
416
|
-
quote(symbol: string): Promise<Quote>;
|
|
417
|
-
/**
|
|
418
|
-
* Get stock index prices
|
|
412
|
+
* Get stock index quote
|
|
419
413
|
*
|
|
420
414
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
421
415
|
* @param options - Query options
|
|
422
416
|
*/
|
|
423
|
-
|
|
417
|
+
indexQuote(symbol: string, options?: {
|
|
424
418
|
startDate?: string;
|
|
425
419
|
endDate?: string;
|
|
426
420
|
}): Promise<PriceData[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -289,12 +289,12 @@ declare class StockModule {
|
|
|
289
289
|
*
|
|
290
290
|
* @example
|
|
291
291
|
* ```typescript
|
|
292
|
-
* // Single stock by symbol
|
|
293
|
-
* const info = await client.stock.overview({ symbols: '
|
|
292
|
+
* // Single stock by symbol (without market prefix)
|
|
293
|
+
* const info = await client.stock.overview({ symbols: 'AAPL' });
|
|
294
294
|
* console.log(info.name, info.sector);
|
|
295
295
|
*
|
|
296
296
|
* // Multiple stocks by symbols
|
|
297
|
-
* const infos = await client.stock.overview({ symbols: '
|
|
297
|
+
* const infos = await client.stock.overview({ symbols: '000001,600519' });
|
|
298
298
|
* for (const info of infos) {
|
|
299
299
|
* console.log(info.name);
|
|
300
300
|
* }
|
|
@@ -399,28 +399,22 @@ declare class StockModule {
|
|
|
399
399
|
fiscalYear?: string;
|
|
400
400
|
}): Promise<FinancialStatement[]>;
|
|
401
401
|
/**
|
|
402
|
-
* Get historical
|
|
402
|
+
* Get stock quote - current and historical prices with market data
|
|
403
403
|
*
|
|
404
404
|
* @param symbol - Stock symbol
|
|
405
405
|
* @param options - Query options
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
quote(symbol: string, options?: {
|
|
408
408
|
startDate?: string;
|
|
409
409
|
endDate?: string;
|
|
410
410
|
}): Promise<PriceData[]>;
|
|
411
411
|
/**
|
|
412
|
-
* Get
|
|
413
|
-
*
|
|
414
|
-
* @param symbol - Stock symbol
|
|
415
|
-
*/
|
|
416
|
-
quote(symbol: string): Promise<Quote>;
|
|
417
|
-
/**
|
|
418
|
-
* Get stock index prices
|
|
412
|
+
* Get stock index quote
|
|
419
413
|
*
|
|
420
414
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
421
415
|
* @param options - Query options
|
|
422
416
|
*/
|
|
423
|
-
|
|
417
|
+
indexQuote(symbol: string, options?: {
|
|
424
418
|
startDate?: string;
|
|
425
419
|
endDate?: string;
|
|
426
420
|
}): Promise<PriceData[]>;
|
package/dist/index.js
CHANGED
|
@@ -57,12 +57,12 @@ var StockModule = class {
|
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* ```typescript
|
|
60
|
-
* // Single stock by symbol
|
|
61
|
-
* const info = await client.stock.overview({ symbols: '
|
|
60
|
+
* // Single stock by symbol (without market prefix)
|
|
61
|
+
* const info = await client.stock.overview({ symbols: 'AAPL' });
|
|
62
62
|
* console.log(info.name, info.sector);
|
|
63
63
|
*
|
|
64
64
|
* // Multiple stocks by symbols
|
|
65
|
-
* const infos = await client.stock.overview({ symbols: '
|
|
65
|
+
* const infos = await client.stock.overview({ symbols: '000001,600519' });
|
|
66
66
|
* for (const info of infos) {
|
|
67
67
|
* console.log(info.name);
|
|
68
68
|
* }
|
|
@@ -78,10 +78,11 @@ var StockModule = class {
|
|
|
78
78
|
const body = {};
|
|
79
79
|
if (options.symbols) body.symbols = options.symbols;
|
|
80
80
|
if (options.names) body.names = options.names;
|
|
81
|
-
|
|
81
|
+
const response = await this.client.post(
|
|
82
82
|
"/v1/stock/company-overview",
|
|
83
83
|
body
|
|
84
84
|
);
|
|
85
|
+
return response.data;
|
|
85
86
|
}
|
|
86
87
|
/**
|
|
87
88
|
* Get list of major shareholders
|
|
@@ -218,48 +219,33 @@ var StockModule = class {
|
|
|
218
219
|
// Price Data
|
|
219
220
|
// ===========================================================================
|
|
220
221
|
/**
|
|
221
|
-
* Get historical
|
|
222
|
+
* Get stock quote - current and historical prices with market data
|
|
222
223
|
*
|
|
223
224
|
* @param symbol - Stock symbol
|
|
224
225
|
* @param options - Query options
|
|
225
226
|
*/
|
|
226
|
-
async
|
|
227
|
+
async quote(symbol, options = {}) {
|
|
227
228
|
const body = { symbol };
|
|
228
229
|
if (options.startDate) body.start_date = options.startDate;
|
|
229
230
|
if (options.endDate) body.end_date = options.endDate;
|
|
230
231
|
const response = await this.client.post(
|
|
231
|
-
"/v1/stock/
|
|
232
|
+
"/v1/stock/stock-quote",
|
|
232
233
|
body
|
|
233
234
|
);
|
|
234
235
|
return this.normalizeArrayResponse(response);
|
|
235
236
|
}
|
|
236
237
|
/**
|
|
237
|
-
* Get
|
|
238
|
-
*
|
|
239
|
-
* @param symbol - Stock symbol
|
|
240
|
-
*/
|
|
241
|
-
async quote(symbol) {
|
|
242
|
-
const response = await this.client.post(
|
|
243
|
-
"/v1/stock/quote-realtime",
|
|
244
|
-
{ symbol }
|
|
245
|
-
);
|
|
246
|
-
if ("data" in response) {
|
|
247
|
-
return response.data;
|
|
248
|
-
}
|
|
249
|
-
return response;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Get stock index prices
|
|
238
|
+
* Get stock index quote
|
|
253
239
|
*
|
|
254
240
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
255
241
|
* @param options - Query options
|
|
256
242
|
*/
|
|
257
|
-
async
|
|
243
|
+
async indexQuote(symbol, options = {}) {
|
|
258
244
|
const body = { symbol };
|
|
259
245
|
if (options.startDate) body.start_date = options.startDate;
|
|
260
246
|
if (options.endDate) body.end_date = options.endDate;
|
|
261
247
|
const response = await this.client.post(
|
|
262
|
-
"/v1/stock/index-
|
|
248
|
+
"/v1/stock/index-quote",
|
|
263
249
|
body
|
|
264
250
|
);
|
|
265
251
|
return this.normalizeArrayResponse(response);
|
|
@@ -1684,7 +1670,7 @@ var Reportify = class {
|
|
|
1684
1670
|
headers: {
|
|
1685
1671
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1686
1672
|
"Content-Type": "application/json",
|
|
1687
|
-
"User-Agent": "reportify-sdk-js/0.3.
|
|
1673
|
+
"User-Agent": "reportify-sdk-js/0.3.8"
|
|
1688
1674
|
},
|
|
1689
1675
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
1690
1676
|
signal: controller.signal
|
|
@@ -1745,7 +1731,7 @@ var Reportify = class {
|
|
|
1745
1731
|
headers: {
|
|
1746
1732
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1747
1733
|
"Content-Type": "application/json",
|
|
1748
|
-
"User-Agent": "reportify-sdk-typescript/0.3.
|
|
1734
|
+
"User-Agent": "reportify-sdk-typescript/0.3.8"
|
|
1749
1735
|
}
|
|
1750
1736
|
});
|
|
1751
1737
|
if (!response.ok) {
|
package/dist/index.mjs
CHANGED
|
@@ -15,12 +15,12 @@ var StockModule = class {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|
|
18
|
-
* // Single stock by symbol
|
|
19
|
-
* const info = await client.stock.overview({ symbols: '
|
|
18
|
+
* // Single stock by symbol (without market prefix)
|
|
19
|
+
* const info = await client.stock.overview({ symbols: 'AAPL' });
|
|
20
20
|
* console.log(info.name, info.sector);
|
|
21
21
|
*
|
|
22
22
|
* // Multiple stocks by symbols
|
|
23
|
-
* const infos = await client.stock.overview({ symbols: '
|
|
23
|
+
* const infos = await client.stock.overview({ symbols: '000001,600519' });
|
|
24
24
|
* for (const info of infos) {
|
|
25
25
|
* console.log(info.name);
|
|
26
26
|
* }
|
|
@@ -36,10 +36,11 @@ var StockModule = class {
|
|
|
36
36
|
const body = {};
|
|
37
37
|
if (options.symbols) body.symbols = options.symbols;
|
|
38
38
|
if (options.names) body.names = options.names;
|
|
39
|
-
|
|
39
|
+
const response = await this.client.post(
|
|
40
40
|
"/v1/stock/company-overview",
|
|
41
41
|
body
|
|
42
42
|
);
|
|
43
|
+
return response.data;
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* Get list of major shareholders
|
|
@@ -176,48 +177,33 @@ var StockModule = class {
|
|
|
176
177
|
// Price Data
|
|
177
178
|
// ===========================================================================
|
|
178
179
|
/**
|
|
179
|
-
* Get historical
|
|
180
|
+
* Get stock quote - current and historical prices with market data
|
|
180
181
|
*
|
|
181
182
|
* @param symbol - Stock symbol
|
|
182
183
|
* @param options - Query options
|
|
183
184
|
*/
|
|
184
|
-
async
|
|
185
|
+
async quote(symbol, options = {}) {
|
|
185
186
|
const body = { symbol };
|
|
186
187
|
if (options.startDate) body.start_date = options.startDate;
|
|
187
188
|
if (options.endDate) body.end_date = options.endDate;
|
|
188
189
|
const response = await this.client.post(
|
|
189
|
-
"/v1/stock/
|
|
190
|
+
"/v1/stock/stock-quote",
|
|
190
191
|
body
|
|
191
192
|
);
|
|
192
193
|
return this.normalizeArrayResponse(response);
|
|
193
194
|
}
|
|
194
195
|
/**
|
|
195
|
-
* Get
|
|
196
|
-
*
|
|
197
|
-
* @param symbol - Stock symbol
|
|
198
|
-
*/
|
|
199
|
-
async quote(symbol) {
|
|
200
|
-
const response = await this.client.post(
|
|
201
|
-
"/v1/stock/quote-realtime",
|
|
202
|
-
{ symbol }
|
|
203
|
-
);
|
|
204
|
-
if ("data" in response) {
|
|
205
|
-
return response.data;
|
|
206
|
-
}
|
|
207
|
-
return response;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Get stock index prices
|
|
196
|
+
* Get stock index quote
|
|
211
197
|
*
|
|
212
198
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
213
199
|
* @param options - Query options
|
|
214
200
|
*/
|
|
215
|
-
async
|
|
201
|
+
async indexQuote(symbol, options = {}) {
|
|
216
202
|
const body = { symbol };
|
|
217
203
|
if (options.startDate) body.start_date = options.startDate;
|
|
218
204
|
if (options.endDate) body.end_date = options.endDate;
|
|
219
205
|
const response = await this.client.post(
|
|
220
|
-
"/v1/stock/index-
|
|
206
|
+
"/v1/stock/index-quote",
|
|
221
207
|
body
|
|
222
208
|
);
|
|
223
209
|
return this.normalizeArrayResponse(response);
|
|
@@ -1642,7 +1628,7 @@ var Reportify = class {
|
|
|
1642
1628
|
headers: {
|
|
1643
1629
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1644
1630
|
"Content-Type": "application/json",
|
|
1645
|
-
"User-Agent": "reportify-sdk-js/0.3.
|
|
1631
|
+
"User-Agent": "reportify-sdk-js/0.3.8"
|
|
1646
1632
|
},
|
|
1647
1633
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
1648
1634
|
signal: controller.signal
|
|
@@ -1703,7 +1689,7 @@ var Reportify = class {
|
|
|
1703
1689
|
headers: {
|
|
1704
1690
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1705
1691
|
"Content-Type": "application/json",
|
|
1706
|
-
"User-Agent": "reportify-sdk-typescript/0.3.
|
|
1692
|
+
"User-Agent": "reportify-sdk-typescript/0.3.8"
|
|
1707
1693
|
}
|
|
1708
1694
|
});
|
|
1709
1695
|
if (!response.ok) {
|