Read cached candles for the requested time window. Returns null if any candle in the window is missing (cache miss).
Number of candles requested
Aligned start timestamp (openTime of first candle)
Reserved for API compatibility, not used by default
Promise resolving to candles in order, or null on cache miss
Initialize storage for this candle context.
Whether this is the first initialization
Promise that resolves when initialization is complete
Write candles to cache. Implementations may skip incomplete candles (closeTime > now) and existing keys to avoid overwriting fully closed candles.
Array of candle data to cache
Promise that resolves when all writes are complete
Per-context candle cache persistence instance interface. Scoped to a specific (symbol, interval, exchangeName) triple.
Each candle is keyed by its timestamp inside the context-scoped storage.
readCandlesDatareturnsnullwhen ANY of the expected timestamps is missing (cache miss), so the caller can refetch from the exchange.Custom adapters should implement this interface to override the default file-based candle cache behavior.