@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/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/test.js +5 -3
- package/dist/test.js.map +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/package.json
CHANGED
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 {
|
|
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) {
|