Instrument definition: an underlying (traded) asset settled in another.

This is the canonical Instrument value object consumed by the market-data registration and resolution methods. Later stages reuse it via [JsInstrument::inner].

Constructors

  • Constructs an instrument from its underlying and settlement assets.

    underlyingAsset is the asset that is bought or sold; settlementAsset is the asset used for cash flow, fees, and P&L.

    Errors

    Throws AssetError when either asset is empty or whitespace-only.

    Parameters

    • underlying_asset: string
    • settlement_asset: string

    Returns Instrument

Properties

settlementAsset: string

Returns the settlement asset string.

underlyingAsset: string

Returns the underlying (traded) asset string.

Methods

  • Returns void

  • Returns a fresh Instrument holding the same asset pair.

    Returns Instrument

  • Returns true when both instruments have the same asset pair.

    Parameters

    Returns boolean

  • Returns void

  • Returns a human-readable Instrument(underlying/settlement) string.

    Returns string