Record Class OnChainSnapshot

java.lang.Object
java.lang.Record
com.wualabs.qtsurfer.engine.indicators.onchain.model.OnChainSnapshot
Record Components:
timestamp - snapshot timestamp
spentOutputs - list of spent outputs in this period (for SOPR)
marketCap - total market capitalization in USD
realizedCap - realized capitalization in USD (sum of all UTXOs valued at last move)
transactionVolume - total on-chain transaction volume in USD

public record OnChainSnapshot(Instant timestamp, List<SpentOutput> spentOutputs, double marketCap, double realizedCap, double transactionVolume) extends Record
Aggregated on-chain data for a specific point in time (block or daily).
  • Constructor Details

    • OnChainSnapshot

      public OnChainSnapshot(Instant timestamp, List<SpentOutput> spentOutputs, double marketCap, double realizedCap, double transactionVolume)
      Creates an instance of a OnChainSnapshot record class.
      Parameters:
      timestamp - the value for the timestamp record component
      spentOutputs - the value for the spentOutputs record component
      marketCap - the value for the marketCap record component
      realizedCap - the value for the realizedCap record component
      transactionVolume - the value for the transactionVolume record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • spentOutputs

      public List<SpentOutput> spentOutputs()
      Returns the value of the spentOutputs record component.
      Returns:
      the value of the spentOutputs record component
    • marketCap

      public double marketCap()
      Returns the value of the marketCap record component.
      Returns:
      the value of the marketCap record component
    • realizedCap

      public double realizedCap()
      Returns the value of the realizedCap record component.
      Returns:
      the value of the realizedCap record component
    • transactionVolume

      public double transactionVolume()
      Returns the value of the transactionVolume record component.
      Returns:
      the value of the transactionVolume record component