Class AnalyticsAPI

Represents a class for handling operations related to making analytics queries from the voidnode server.

Hierarchy

  • BaseAPI
    • AnalyticsAPI

Constructors

Properties

premia: Premia

The Premia SDK instance.

streamIndex: number = 0

The current index of quote streams. Used to cancel stale streams.

Methods

  • Cancels all ongoing streams.

    Returns Promise<void>

  • Retrieves daily data for a specific vault using its address.

    Parameters

    • vaultAddress: string

      The address of the vault for which daily data should be retrieved.

    • Optional startTime: number = 0

      The timestamp (in seconds) from when the data should start being retrieved (default is 0).

    • Optional limit: number = 1000

      The maximum number of data points to return (default is 1000).

    • Optional skip: number = 0

      The number of data points to skip from the start of the results (default is 0).

    Returns Promise<VaultDayData[]>

    A promise that resolves to an array of VaultDayData objects, containing daily information about the vault at the specified address.

Generated using TypeDoc