Class TransactionAPI

TransactionAPI is a class extending the BaseAPI class, providing methods for interacting with transactions and vault transactions. It includes methods for getting a single transaction or vault transaction and for getting multiple transactions or vault transactions with optional parameters for more specific queries.

Hierarchy

  • BaseAPI
    • TransactionAPI

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>

  • Get a single optionPS transaction given its hash.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • hash: string

      The hash of the optionPS transaction to retrieve.

    Returns Promise<OptionPSTransaction>

    A promise that resolves to the requested optionPS transaction.

  • Get a list of optionPS transactions with optional filter, search, order, and pagination parameters.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • search: string

      The search query.

    • Optional orderBy: string = 'timestamp'

      The attribute by which to order the optionPS transactions.

    • Optional order: string = 'ASC'

      The order in which to return the vault transactions (ASC, DESC).

    • Optional limit: number = 100

      The maximum number of optionPS transactions to return.

    • Optional skip: number = 0

      The number of optionPS transactions to skip.

    • Optional account: string

      The account associated with the optionPS transactions to return.

    • Optional startTime: number

      The start time for the optionPS transactions to return.

    • Optional endTime: number

      The end time for the optionPS transactions to return.

    • Optional searchInput: string

      An additional search input.

    Returns Promise<OptionPSTransaction[]>

    A promise that resolves to a list of optionPS transactions.

  • Get a single transaction given its hash.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • hash: string

      The hash of the transaction to retrieve.

    Returns Promise<Transaction>

    A promise that resolves to the requested transaction.

  • Get a list of transactions with optional filter, search, order, and pagination parameters.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • filter: string

      The filter for the transaction search. (all, add, remove)

    • search: string

      The search query.

    • Optional orderBy: string = 'timestamp'

      The attribute by which to order the transactions.

    • Optional order: string = 'ASC'

      The order in which to return the transactions (ASC, DESC).

    • Optional limit: number = 100

      The maximum number of transactions to return.

    • Optional skip: number = 0

      The number of transactions to skip.

    • Optional type: string

      The type of transactions to return. (token, vault)

    • Optional poolAddress: string
    • Optional account: string

      The account associated with the transactions to return.

    • Optional startTime: number

      The start time for the transactions to return.

    • Optional endTime: number

      The end time for the transactions to return.

    • Optional searchInput: string

      An additional search input.

    Returns Promise<Transaction[]>

    A promise that resolves to a list of transactions.

  • Get a single vault transaction given its hash.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • hash: string

      The hash of the vault transaction to retrieve.

    Returns Promise<VaultTransaction>

    A promise that resolves to the requested vault transaction.

  • Get a list of vault transactions with optional filter, search, order, and pagination parameters.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • filter: string

      The filter for the vault transaction search. (all, add, remove)

    • search: string

      The search query.

    • Optional orderBy: string = 'timestamp'

      The attribute by which to order the vault transactions.

    • Optional order: string = 'ASC'

      The order in which to return the vault transactions (ASC, DESC).

    • Optional limit: number = 100

      The maximum number of vault transactions to return.

    • Optional skip: number = 0

      The number of vault transactions to skip.

    • Optional type: string

      The type of vault transactions to return.

    • Optional vaultAddress: string

      The address of the vault associated with the vault transactions to return.

    • Optional account: string

      The account associated with the vault transactions to return.

    • Optional startTime: number

      The start time for the vault transactions to return.

    • Optional endTime: number

      The end time for the vault transactions to return.

    • Optional searchInput: string

      An additional search input.

    Returns Promise<VaultTransaction[]>

    A promise that resolves to a list of vault transactions.

Generated using TypeDoc