TradePrice

public struct TradePrice : Decodable, Sendable

Represents a trade price as a fraction with numerator and denominator.

  • n

    Numerator of price fraction.

    Declaration

    Swift

    public let n: String
  • d

    Denominator of price fraction.

    Declaration

    Swift

    public let d: String
  • Creates a trade price from numerator and denominator strings.

    Declaration

    Swift

    public init(numerator: String, denominator: String)
  • Initializer - creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder containing the data