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