@adaptic/utils 0.0.982 → 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 +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2654,8 +2654,7 @@ const DEFAULT_ADJUSTMENT = "all";
|
|
|
2654
2654
|
// deployments with SIP entitlements set ALPACA_MARKET_DATA_FEED=sip in their
|
|
2655
2655
|
// environment to restore full data access. Per-call overrides (the optional
|
|
2656
2656
|
// `feed` argument on getOptions*/getLatestBars/etc.) still win.
|
|
2657
|
-
const DEFAULT_FEED$1 = (process.env.ALPACA_MARKET_DATA_FEED ||
|
|
2658
|
-
"iex");
|
|
2657
|
+
const DEFAULT_FEED$1 = (process.env.ALPACA_MARKET_DATA_FEED || "iex");
|
|
2659
2658
|
const DEFAULT_CURRENCY$1 = "USD";
|
|
2660
2659
|
/**
|
|
2661
2660
|
* Singleton class for interacting with Alpaca Market Data API
|
|
@@ -9379,7 +9378,11 @@ async function getRiskFreeRate() {
|
|
|
9379
9378
|
catch (error) {
|
|
9380
9379
|
const message = error instanceof Error ? error.message : String(error);
|
|
9381
9380
|
if (cache !== null) {
|
|
9382
|
-
getLogger().warn("Failed to refresh risk-free rate; using last-known-good cached value", {
|
|
9381
|
+
getLogger().warn("Failed to refresh risk-free rate; using last-known-good cached value", {
|
|
9382
|
+
error: message,
|
|
9383
|
+
cachedRate: cache.rate,
|
|
9384
|
+
cacheAgeMs: Date.now() - cache.fetchedAt,
|
|
9385
|
+
});
|
|
9383
9386
|
return cache.rate;
|
|
9384
9387
|
}
|
|
9385
9388
|
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 });
|