Class PremiaSubgraphAlpha

The PremiaSubgraph class is the entry point for interacting with the Premia V3 subgraph to query on-chain and indexed data using various APIs and services

Hierarchy

  • PremiaSubgraph

Constructors

Properties

client: ApolloClient<NormalizedCacheObject>

The apollo subgraph client used to fetch data from the Premia subgraph.

Default Value

ApolloClient

queryParams?: QueryParams

The subgraph-specific parameters to be used for upcoming subgraph queries.

Default Value

{} (empty object)

uri: string

The subgraph URL to use for fetching indexed contract data.

Methods

  • Parameters

    Returns {
        base: string;
        priceOracleAddress: string;
        quote: string;
    }

    • base: string
    • priceOracleAddress: string
    • quote: string
  • Parameters

    • filter: string
    • search: string
    • orderBy: string = 'timestamp'
    • order: string = 'asc'
    • first: number = 100
    • skip: number = 0
    • Optional type: string
    • Optional poolAddress: string
    • Optional account: string
    • Optional startTime: number
    • Optional endTime: number
    • Optional searchInput: string

    Returns Promise<Transaction[]>

  • Parameters

    • address: string
    • startTime: BigNumberish
    • endTime: BigNumberish
    • orderBy: string = 'timestamp'
    • order: string = 'asc'
    • first: number = 100
    • skip: number = 0

    Returns Promise<UserSnapshot[]>

  • Parameters

    • user: string
    • timestampFrom: number
    • timestampTo: number
    • first: number = 100
    • skip: number = 0

    Returns Promise<VaultVote[]>

  • Parameters

    • filter: string
    • search: string
    • orderBy: string = 'timestamp'
    • order: string = 'asc'
    • first: number = 100
    • skip: number = 0
    • Optional type: string
    • Optional vaultAddress: string
    • Optional account: string
    • Optional startTime: number
    • Optional endTime: number
    • Optional searchInput: string

    Returns Promise<VaultTransaction[]>

Generated using TypeDoc