@discomedia/utils 1.0.22 → 1.0.23
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-frontend.cjs +3 -7
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +3 -7
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +3 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -7
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/test.js +3 -7
- package/dist/test.js.map +1 -1
- package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-market-data-api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16309,9 +16309,7 @@ class AlpacaMarketDataAPI extends EventEmitter {
|
|
|
16309
16309
|
const dateRangeStr = earliestTimestamp && latestTimestamp
|
|
16310
16310
|
? `${earliestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })} to ${latestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })}`
|
|
16311
16311
|
: 'unknown range';
|
|
16312
|
-
log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${
|
|
16313
|
-
type: 'info',
|
|
16314
|
-
});
|
|
16312
|
+
log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${symbols.length} symbols, date range: ${dateRangeStr}${hasMorePages ? ', more pages available' : ', complete'}`);
|
|
16315
16313
|
// Prevent infinite loops
|
|
16316
16314
|
if (pageCount > 1000) {
|
|
16317
16315
|
log(`Stopping pagination after ${pageCount} pages to prevent infinite loop`, { type: 'warn' });
|
|
@@ -16319,12 +16317,10 @@ class AlpacaMarketDataAPI extends EventEmitter {
|
|
|
16319
16317
|
}
|
|
16320
16318
|
}
|
|
16321
16319
|
// Final summary
|
|
16322
|
-
const
|
|
16320
|
+
const symbolsJoined = Object.entries(allBars)
|
|
16323
16321
|
.map(([symbol, bars]) => `${symbol}: ${bars.length}`)
|
|
16324
16322
|
.join(', ');
|
|
16325
|
-
log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages
|
|
16326
|
-
type: 'info',
|
|
16327
|
-
});
|
|
16323
|
+
log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages for ${symbolsJoined.length} symbols'}`);
|
|
16328
16324
|
return {
|
|
16329
16325
|
bars: allBars,
|
|
16330
16326
|
next_page_token: null, // Always null since we fetch all pages
|