@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/index.cjs
CHANGED
|
@@ -18141,7 +18141,7 @@ class AlpacaTradingAPI {
|
|
|
18141
18141
|
}
|
|
18142
18142
|
handleTradeUpdate(data) {
|
|
18143
18143
|
if (this.tradeUpdateCallback) {
|
|
18144
|
-
this.log(`Trade update: ${data.event} to ${data.order.side} ${data.order.qty} shares, type ${data.order.type}`, {
|
|
18144
|
+
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}`, {
|
|
18145
18145
|
symbol: data.order.symbol,
|
|
18146
18146
|
type: 'debug',
|
|
18147
18147
|
});
|
|
@@ -18259,7 +18259,9 @@ class AlpacaTradingAPI {
|
|
|
18259
18259
|
try {
|
|
18260
18260
|
this.ws.terminate();
|
|
18261
18261
|
}
|
|
18262
|
-
catch {
|
|
18262
|
+
catch {
|
|
18263
|
+
/* no-op */
|
|
18264
|
+
}
|
|
18263
18265
|
}
|
|
18264
18266
|
this.ws = null;
|
|
18265
18267
|
}
|
|
@@ -18899,7 +18901,7 @@ class AlpacaTradingAPI {
|
|
|
18899
18901
|
const hourlyParams = { timeframe: '1Min', period: '1D' };
|
|
18900
18902
|
const [dailyHistory, hourlyHistory] = await Promise.all([
|
|
18901
18903
|
this.getPortfolioHistory(dailyParams),
|
|
18902
|
-
this.getPortfolioHistory(hourlyParams)
|
|
18904
|
+
this.getPortfolioHistory(hourlyParams),
|
|
18903
18905
|
]);
|
|
18904
18906
|
// If no hourly history, return daily as-is
|
|
18905
18907
|
if (!hourlyHistory.timestamp || hourlyHistory.timestamp.length === 0) {
|