dsteem
    Preparing search index...

    Class Price

    Represents quotation of the relative value of asset against another asset. Similar to 'currency pair' used to determine value of currencies.

    For example: 1 EUR / 1.25 USD where: 1 EUR is an asset specified as a base 1.25 USD us an asset specified as a qute

    can determine value of EUR against USD.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • base: Asset

        represents a value of the price object to be expressed relatively to quote asset. Cannot have amount == 0 if you want to build valid price.

      • quote: Asset

        represents an relative asset. Cannot have amount == 0, otherwise asertion fail.

        Both base and quote shall have different symbol defined.

      Returns Price

    Properties

    base: Asset

    represents a value of the price object to be expressed relatively to quote asset. Cannot have amount == 0 if you want to build valid price.

    quote: Asset

    represents an relative asset. Cannot have amount == 0, otherwise asertion fail.

    Both base and quote shall have different symbol defined.

    Methods

    • Return a new Asset with the price converted between the symbols in the pair. Throws if passed asset symbol is not base or quote.

      Parameters

      Returns Asset

    • Return a string representation of this price pair.

      Returns string