Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Statistics

Statistics are data points describing states of the Tezos blockchain. For more information see the Statistics API documentation on tzKT.

Hierarchy

  • Statistics

Index

Constructors

constructor

  • new Statistics(cycle: null | number, date: null | Date, level: number, timestamp: Date, totalSupply: number, circulatingSupply: number, totalBootstrapped: number, totalCommitments: number, totalActivated: number, totalCreated: number, totalBurned: number, totalVested: number, totalFrozen: number, quote: null | BalanceShort): Statistics
  • internal

    Parameters

    • cycle: null | number
    • date: null | Date
    • level: number
    • timestamp: Date
    • totalSupply: number
    • circulatingSupply: number
    • totalBootstrapped: number
    • totalCommitments: number
    • totalActivated: number
    • totalCreated: number
    • totalBurned: number
    • totalVested: number
    • totalFrozen: number
    • quote: null | BalanceShort

    Returns Statistics

Properties

circulatingSupply

circulatingSupply: number

cycle

cycle: null | number

date

date: null | Date

level

level: number

quote

quote: null | BalanceShort

timestamp

timestamp: Date

totalActivated

totalActivated: number

totalBootstrapped

totalBootstrapped: number

totalBurned

totalBurned: number

totalCommitments

totalCommitments: number

totalCreated

totalCreated: number

totalFrozen

totalFrozen: number

totalSupply

totalSupply: number

totalVested

totalVested: number

Methods

Static current

  • current(select: null | string, quote: null | string, domain?: string): Promise<Statistics>
  • Fetches statistics at the end of a head block from tzKT.

    see

    get current statistics.

    example

    Fetch Current Statistics

    let statistics: Statistics = await Statistics.current();
    

    Parameters

    • select: null | string
    • quote: null | string
    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Statistics>

    Returns statistics at the end of a head block.

Static cyclic

Static daily

  • Fetches end-of-day statistics from tzKT.

    see

    get daily statistics.

    example

    Fetch Daily Statistics

    Fetch list of daily Statistics

    let lowerBound: Date = new Date(2021, 0, 1);
    let upperBound: Date = new Date(2021, 5, 1);
    let parameters: GetStatisticParameters = {'timestamp.gt': lowerBound, 'timestamp.lt': upperBound};
    let statistics: Statistics[] = await Statistics.daily(parameters);
    

    Parameters

    Returns Promise<Statistics[]>

    Returns a list of end-of-day statistics.

Static fromAPI

Static get

  • Fetches end-of-block statistics from tzKT.

    see

    get statistics.

    example

    Fetch Statistics

    Fetch list of Statistics

    let lowerBound: Date = new Date(2021, 0, 1);
    let upperBound: Date = new Date(2021, 5, 1);
    let parameters: GetStatisticParameters = {'timestamp.gt': lowerBound, 'timestamp.lt': upperBound};
    let statistics: Statistics[] = await Statistics.get(parameters);
    

    Parameters

    Returns Promise<Statistics[]>

    Returns a list of end-of-block statistics.

Generated using TypeDoc