Availability is provider knowledge, not inferred from the next observed candle.

interface TimeframeProviderOptions {
    historicalSnapshot?: (
        request: IndicatorSnapshotRequest,
    ) => Promise<RequestedBarsSnapshot>;
    now?: () => number;
    availability(
        bar: Readonly<Bar>,
        request: IndicatorSnapshotRequest,
    ): { at: null | number; confirmed: boolean };
}

Properties

historicalSnapshot?: (
    request: IndicatorSnapshotRequest,
) => Promise<RequestedBarsSnapshot>

Supply historical value versions, or replay requests are rejected.

now?: () => number

UTC seconds, also used for the five-minute closed-history cache lifetime.

Methods