@discomedia/utils 1.0.53 → 1.0.54

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.53",
6
+ "version": "1.0.54",
7
7
  "author": "Disco Media",
8
8
  "description": "Utility functions used in Disco Media apps",
9
9
  "always-build-npm": true,
package/dist/test.js CHANGED
@@ -14533,7 +14533,7 @@ class AlpacaTradingAPI {
14533
14533
  }
14534
14534
  handleTradeUpdate(data) {
14535
14535
  if (this.tradeUpdateCallback) {
14536
- this.log(`Trade update: ${data.event} to ${data.order.side} ${data.order.qty} shares, type ${data.order.type}`, {
14536
+ this.log(`Trade update: ${data.event} to ${data.order.side} ${data.order.qty} shares${data.event === 'partial_fill' ? ` (filled shares: ${data.order.filled_qty})` : ''}, type ${data.order.type}`, {
14537
14537
  symbol: data.order.symbol,
14538
14538
  type: 'debug',
14539
14539
  });
@@ -14651,7 +14651,9 @@ class AlpacaTradingAPI {
14651
14651
  try {
14652
14652
  this.ws.terminate();
14653
14653
  }
14654
- catch { /* no-op */ }
14654
+ catch {
14655
+ /* no-op */
14656
+ }
14655
14657
  }
14656
14658
  this.ws = null;
14657
14659
  }
@@ -15291,7 +15293,7 @@ class AlpacaTradingAPI {
15291
15293
  const hourlyParams = { timeframe: '1Min', period: '1D' };
15292
15294
  const [dailyHistory, hourlyHistory] = await Promise.all([
15293
15295
  this.getPortfolioHistory(dailyParams),
15294
- this.getPortfolioHistory(hourlyParams)
15296
+ this.getPortfolioHistory(hourlyParams),
15295
15297
  ]);
15296
15298
  // If no hourly history, return daily as-is
15297
15299
  if (!hourlyHistory.timestamp || hourlyHistory.timestamp.length === 0) {