Immutable executed trade: a (price, quantity) pair.

Constructors

Properties

Methods

Constructors

  • Constructs a trade from a price and quantity.

    Each argument accepts a value object or a DecimalInput.

    Errors

    Throws ParamError on an invalid price or quantity.

    Parameters

    • price:
          | string
          | number
          | bigint
          | Price
    • quantity:
          | string
          | number
          | bigint
          | Quantity

    Returns Trade

Properties

price: Price

The trade price.

quantity: Quantity

The trade quantity.

Methods

  • Returns void

  • Returns a fresh Trade holding the same price and quantity.

    Returns Trade

  • Returns void