@adaptic/utils 0.0.983 → 0.0.984
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 +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/dist/test.js +1 -2
- package/dist/test.js.map +1 -1
- package/dist/types/alpaca/client.d.ts.map +1 -1
- package/dist/types/alpaca/market-data/bars.d.ts.map +1 -1
- package/dist/types/alpaca/market-data/news.d.ts.map +1 -1
- package/dist/types/alpaca/market-data/quotes.d.ts.map +1 -1
- package/dist/types/alpaca/market-data/trades.d.ts.map +1 -1
- package/dist/types/alpaca/trading/clock.d.ts.map +1 -1
- package/dist/types/alpaca/trading/positions.d.ts.map +1 -1
- package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/massive-indices.d.ts.map +1 -1
- package/dist/types/massive.d.ts.map +1 -1
- package/dist/types/price-utils.d.ts.map +1 -1
- package/dist/types/risk-free-rate.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2652,8 +2652,7 @@ const DEFAULT_ADJUSTMENT = "all";
|
|
|
2652
2652
|
// deployments with SIP entitlements set ALPACA_MARKET_DATA_FEED=sip in their
|
|
2653
2653
|
// environment to restore full data access. Per-call overrides (the optional
|
|
2654
2654
|
// `feed` argument on getOptions*/getLatestBars/etc.) still win.
|
|
2655
|
-
const DEFAULT_FEED$1 = (process.env.ALPACA_MARKET_DATA_FEED ||
|
|
2656
|
-
"iex");
|
|
2655
|
+
const DEFAULT_FEED$1 = (process.env.ALPACA_MARKET_DATA_FEED || "iex");
|
|
2657
2656
|
const DEFAULT_CURRENCY$1 = "USD";
|
|
2658
2657
|
/**
|
|
2659
2658
|
* Singleton class for interacting with Alpaca Market Data API
|
|
@@ -9377,7 +9376,11 @@ async function getRiskFreeRate() {
|
|
|
9377
9376
|
catch (error) {
|
|
9378
9377
|
const message = error instanceof Error ? error.message : String(error);
|
|
9379
9378
|
if (cache !== null) {
|
|
9380
|
-
getLogger().warn("Failed to refresh risk-free rate; using last-known-good cached value", {
|
|
9379
|
+
getLogger().warn("Failed to refresh risk-free rate; using last-known-good cached value", {
|
|
9380
|
+
error: message,
|
|
9381
|
+
cachedRate: cache.rate,
|
|
9382
|
+
cacheAgeMs: Date.now() - cache.fetchedAt,
|
|
9383
|
+
});
|
|
9381
9384
|
return cache.rate;
|
|
9382
9385
|
}
|
|
9383
9386
|
getLogger().warn("Failed to fetch risk-free rate and no cached value available; falling back to DEFAULT_RISK_FREE_RATE", { error: message, fallback: DEFAULT_RISK_FREE_RATE });
|