ENH - simulate live crypto markets

Drive market prices from randomized server intervals with per-market momentum, global trend, mean reversion, bounded shocks, and retained history. Stream authoritative market updates into live holdings, portfolio valuations, and real detail charts while invalidating stale quotes.
This commit is contained in:
smx.pusha
2026-08-18 11:41:56 +02:00
parent 3a5391c10d
commit 604d2b4084
11 changed files with 345 additions and 118 deletions
+8
View File
@@ -119,6 +119,14 @@ function verifyBrowserTestData(dataByEndpoint) {
assert.equal(typeof crypto.profile.priceAlerts, 'boolean')
assert.equal(typeof crypto.markets[0].issuedSupply, 'string')
assert(crypto.markets.every((market) => typeof market.logo === 'string'))
assert(
crypto.markets.every(
(market) =>
Array.isArray(market.priceHistory) &&
market.priceHistory.length >= 2 &&
market.priceHistory.at(-1) === Number(market.price).toFixed(2),
),
)
assert(
Math.max(...crypto.markets.map((market) => Number(market.price))) >=
1000000,