@discomedia/utils 1.0.27 → 1.0.29
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/{alpaca-trading-api-6NxNgQBn.js → alpaca-trading-api-mpmauojY.js} +7 -6
- package/dist/{alpaca-trading-api-6NxNgQBn.js.map → alpaca-trading-api-mpmauojY.js.map} +1 -1
- package/dist/index-frontend.cjs +6 -5
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +6 -5
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/test.js +1 -1
- package/dist/types/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-trading-api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index-frontend.mjs
CHANGED
|
@@ -15405,12 +15405,13 @@ class AlpacaTradingAPI {
|
|
|
15405
15405
|
* @returns Portfolio history data with daily timeframe, including the most recent day if available from hourly data
|
|
15406
15406
|
*/
|
|
15407
15407
|
async getPortfolioDailyHistory(params) {
|
|
15408
|
-
// Get daily history
|
|
15408
|
+
// Get daily and hourly history in parallel
|
|
15409
15409
|
const dailyParams = { ...params, timeframe: '1D' };
|
|
15410
|
-
const
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15410
|
+
const hourlyParams = { timeframe: '1Min', period: '1D' };
|
|
15411
|
+
const [dailyHistory, hourlyHistory] = await Promise.all([
|
|
15412
|
+
this.getPortfolioHistory(dailyParams),
|
|
15413
|
+
this.getPortfolioHistory(hourlyParams)
|
|
15414
|
+
]);
|
|
15414
15415
|
// If no hourly history, return daily as-is
|
|
15415
15416
|
if (!hourlyHistory.timestamp || hourlyHistory.timestamp.length === 0) {
|
|
15416
15417
|
return dailyHistory;
|