Function getChartLogs

  • Retrieves chart logs for a specific market within a specified time interval.

    Parameters

    • __namedParameters: {
          chainId: CHAIN_IDS;
          quote: `0x${string}`;
          base: `0x${string}`;
          intervalType: CHART_LOG_INTERVALS;
          from: number;
          to: number;
      }

    Returns Promise<ChartLog[]>

    A promise that resolves with an array of chart logs within the specified interval.

    Example

    import { getLatestChartLog, CHART_LOG_INTERVALS } from '@clober/v2-sdk'

    const logs = await getChartLogs({
    chainId: 421614,
    quote: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
    base: '0x0000000000000000000000000000000000000000',
    intervalType: CHART_LOG_INTERVALS.oneDay,
    from: 1687305600,
    to: 1713312000,
    })