Class TokenPairAPI

Represents a class for handling TokenPair operations related to the subgraph.

Hierarchy

  • BaseAPI
    • TokenPairAPI

Constructors

Properties

premia: Premia

Methods

  • Fetches data for multiple token pairs. Uses caching with a one-day time-to-live.

    Parameters

    • pairs: TokenPairOrId[]

      An array of token pairs to fetch the data for.

    Returns Promise<TokenPair[]>

    The data for the specified token pairs.

  • Retrieves extended information for multiple token pairs. Uses caching with a one-minute time-to-live.

    Parameters

    • pairs: TokenPairOrId[]

      An array of token pairs to fetch the extended information for.

    Returns Promise<TokenPairExtended[]>

    The extended information for the specified token pairs.

  • Fetches the current spot price of a token pair from the price oracle. Uses caching with a one-minute time-to-live.

    Parameters

    • pair: TokenPairOrId

      The token pair to fetch the spot price for.

    Returns Promise<bigint>

    The current spot price of the token pair.

  • Gets the strike increment for a token pair based on its spot price.

    Parameters

    • pair: TokenPairOrId

      The token pair to fetch the strike increment for.

    Returns Promise<bigint>

    The strike increment for the token pair.

Generated using TypeDoc