@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-frontend.mjs
CHANGED
|
@@ -13997,9 +13997,7 @@ class AlpacaMarketDataAPI extends EventEmitter {
|
|
|
13997
13997
|
const dateRangeStr = earliestTimestamp && latestTimestamp
|
|
13998
13998
|
? `${earliestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })} to ${latestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })}`
|
|
13999
13999
|
: 'unknown range';
|
|
14000
|
-
log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${
|
|
14001
|
-
type: 'info',
|
|
14002
|
-
});
|
|
14000
|
+
log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${symbols.length} symbols, date range: ${dateRangeStr}${hasMorePages ? ', more pages available' : ', complete'}`);
|
|
14003
14001
|
// Prevent infinite loops
|
|
14004
14002
|
if (pageCount > 1000) {
|
|
14005
14003
|
log(`Stopping pagination after ${pageCount} pages to prevent infinite loop`, { type: 'warn' });
|
|
@@ -14007,12 +14005,10 @@ class AlpacaMarketDataAPI extends EventEmitter {
|
|
|
14007
14005
|
}
|
|
14008
14006
|
}
|
|
14009
14007
|
// Final summary
|
|
14010
|
-
const
|
|
14008
|
+
const symbolsJoined = Object.entries(allBars)
|
|
14011
14009
|
.map(([symbol, bars]) => `${symbol}: ${bars.length}`)
|
|
14012
14010
|
.join(', ');
|
|
14013
|
-
log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages
|
|
14014
|
-
type: 'info',
|
|
14015
|
-
});
|
|
14011
|
+
log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages for ${symbolsJoined.length} symbols'}`);
|
|
14016
14012
|
return {
|
|
14017
14013
|
bars: allBars,
|
|
14018
14014
|
next_page_token: null, // Always null since we fetch all pages
|