reportify-sdk 0.3.7 → 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 +2 -5
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +8 -23
- package/dist/index.mjs +8 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,11 +48,8 @@ const income = await client.stock.incomeStatement('AAPL', { period: 'quarterly'
|
|
|
48
48
|
const balance = await client.stock.balanceSheet('AAPL');
|
|
49
49
|
const cashflow = await client.stock.cashflowStatement('AAPL');
|
|
50
50
|
|
|
51
|
-
//
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
// Real-time quote
|
|
55
|
-
const quote = await client.stock.quote('AAPL');
|
|
51
|
+
// Stock quote (price data)
|
|
52
|
+
const quote = await client.stock.quote('AAPL', { startDate: '2024-01-01' });
|
|
56
53
|
|
|
57
54
|
// Company info (symbols without market prefix)
|
|
58
55
|
const overview = await client.stock.overview({ symbols: 'AAPL' });
|
package/dist/index.d.mts
CHANGED
|
@@ -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
|
@@ -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
|
@@ -219,48 +219,33 @@ var StockModule = class {
|
|
|
219
219
|
// Price Data
|
|
220
220
|
// ===========================================================================
|
|
221
221
|
/**
|
|
222
|
-
* Get historical
|
|
222
|
+
* Get stock quote - current and historical prices with market data
|
|
223
223
|
*
|
|
224
224
|
* @param symbol - Stock symbol
|
|
225
225
|
* @param options - Query options
|
|
226
226
|
*/
|
|
227
|
-
async
|
|
227
|
+
async quote(symbol, options = {}) {
|
|
228
228
|
const body = { symbol };
|
|
229
229
|
if (options.startDate) body.start_date = options.startDate;
|
|
230
230
|
if (options.endDate) body.end_date = options.endDate;
|
|
231
231
|
const response = await this.client.post(
|
|
232
|
-
"/v1/stock/
|
|
232
|
+
"/v1/stock/stock-quote",
|
|
233
233
|
body
|
|
234
234
|
);
|
|
235
235
|
return this.normalizeArrayResponse(response);
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
|
-
* Get
|
|
239
|
-
*
|
|
240
|
-
* @param symbol - Stock symbol
|
|
241
|
-
*/
|
|
242
|
-
async quote(symbol) {
|
|
243
|
-
const response = await this.client.post(
|
|
244
|
-
"/v1/stock/quote-realtime",
|
|
245
|
-
{ symbol }
|
|
246
|
-
);
|
|
247
|
-
if ("data" in response) {
|
|
248
|
-
return response.data;
|
|
249
|
-
}
|
|
250
|
-
return response;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Get stock index prices
|
|
238
|
+
* Get stock index quote
|
|
254
239
|
*
|
|
255
240
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
256
241
|
* @param options - Query options
|
|
257
242
|
*/
|
|
258
|
-
async
|
|
243
|
+
async indexQuote(symbol, options = {}) {
|
|
259
244
|
const body = { symbol };
|
|
260
245
|
if (options.startDate) body.start_date = options.startDate;
|
|
261
246
|
if (options.endDate) body.end_date = options.endDate;
|
|
262
247
|
const response = await this.client.post(
|
|
263
|
-
"/v1/stock/index-
|
|
248
|
+
"/v1/stock/index-quote",
|
|
264
249
|
body
|
|
265
250
|
);
|
|
266
251
|
return this.normalizeArrayResponse(response);
|
|
@@ -1685,7 +1670,7 @@ var Reportify = class {
|
|
|
1685
1670
|
headers: {
|
|
1686
1671
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1687
1672
|
"Content-Type": "application/json",
|
|
1688
|
-
"User-Agent": "reportify-sdk-js/0.3.
|
|
1673
|
+
"User-Agent": "reportify-sdk-js/0.3.8"
|
|
1689
1674
|
},
|
|
1690
1675
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
1691
1676
|
signal: controller.signal
|
|
@@ -1746,7 +1731,7 @@ var Reportify = class {
|
|
|
1746
1731
|
headers: {
|
|
1747
1732
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1748
1733
|
"Content-Type": "application/json",
|
|
1749
|
-
"User-Agent": "reportify-sdk-typescript/0.3.
|
|
1734
|
+
"User-Agent": "reportify-sdk-typescript/0.3.8"
|
|
1750
1735
|
}
|
|
1751
1736
|
});
|
|
1752
1737
|
if (!response.ok) {
|
package/dist/index.mjs
CHANGED
|
@@ -177,48 +177,33 @@ var StockModule = class {
|
|
|
177
177
|
// Price Data
|
|
178
178
|
// ===========================================================================
|
|
179
179
|
/**
|
|
180
|
-
* Get historical
|
|
180
|
+
* Get stock quote - current and historical prices with market data
|
|
181
181
|
*
|
|
182
182
|
* @param symbol - Stock symbol
|
|
183
183
|
* @param options - Query options
|
|
184
184
|
*/
|
|
185
|
-
async
|
|
185
|
+
async quote(symbol, options = {}) {
|
|
186
186
|
const body = { symbol };
|
|
187
187
|
if (options.startDate) body.start_date = options.startDate;
|
|
188
188
|
if (options.endDate) body.end_date = options.endDate;
|
|
189
189
|
const response = await this.client.post(
|
|
190
|
-
"/v1/stock/
|
|
190
|
+
"/v1/stock/stock-quote",
|
|
191
191
|
body
|
|
192
192
|
);
|
|
193
193
|
return this.normalizeArrayResponse(response);
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
|
-
* Get
|
|
197
|
-
*
|
|
198
|
-
* @param symbol - Stock symbol
|
|
199
|
-
*/
|
|
200
|
-
async quote(symbol) {
|
|
201
|
-
const response = await this.client.post(
|
|
202
|
-
"/v1/stock/quote-realtime",
|
|
203
|
-
{ symbol }
|
|
204
|
-
);
|
|
205
|
-
if ("data" in response) {
|
|
206
|
-
return response.data;
|
|
207
|
-
}
|
|
208
|
-
return response;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Get stock index prices
|
|
196
|
+
* Get stock index quote
|
|
212
197
|
*
|
|
213
198
|
* @param symbol - Index symbol (e.g., HSI, SPX, DJI)
|
|
214
199
|
* @param options - Query options
|
|
215
200
|
*/
|
|
216
|
-
async
|
|
201
|
+
async indexQuote(symbol, options = {}) {
|
|
217
202
|
const body = { symbol };
|
|
218
203
|
if (options.startDate) body.start_date = options.startDate;
|
|
219
204
|
if (options.endDate) body.end_date = options.endDate;
|
|
220
205
|
const response = await this.client.post(
|
|
221
|
-
"/v1/stock/index-
|
|
206
|
+
"/v1/stock/index-quote",
|
|
222
207
|
body
|
|
223
208
|
);
|
|
224
209
|
return this.normalizeArrayResponse(response);
|
|
@@ -1643,7 +1628,7 @@ var Reportify = class {
|
|
|
1643
1628
|
headers: {
|
|
1644
1629
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1645
1630
|
"Content-Type": "application/json",
|
|
1646
|
-
"User-Agent": "reportify-sdk-js/0.3.
|
|
1631
|
+
"User-Agent": "reportify-sdk-js/0.3.8"
|
|
1647
1632
|
},
|
|
1648
1633
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
1649
1634
|
signal: controller.signal
|
|
@@ -1704,7 +1689,7 @@ var Reportify = class {
|
|
|
1704
1689
|
headers: {
|
|
1705
1690
|
Authorization: `Bearer ${this.apiKey}`,
|
|
1706
1691
|
"Content-Type": "application/json",
|
|
1707
|
-
"User-Agent": "reportify-sdk-typescript/0.3.
|
|
1692
|
+
"User-Agent": "reportify-sdk-typescript/0.3.8"
|
|
1708
1693
|
}
|
|
1709
1694
|
});
|
|
1710
1695
|
if (!response.ok) {
|