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.

### Hierarchy

- Price

## Index

### Constructors

- constructor

### Properties

- base
- quote

### Methods

- convert
- toString
- from

## Constructors

### constructor

- new Price(base: Asset, quote: Asset): Price

- - Defined in chain/asset.ts:237

  #### 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

base: Asset

- Defined in chain/asset.ts:246

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

quote: Asset

- Defined in chain/asset.ts:246

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

Both base and quote shall have different symbol defined.

## Methods

### convert

- convert(asset: Asset): Asset

- - Defined in chain/asset.ts:279

  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

  - ##### asset: Asset

  #### Returns Asset

### toString

- toString(): string

- - Defined in chain/asset.ts:271

  Return a string representation of this price pair.

  #### Returns string

### Static from

- from(value: PriceType): Price

- - Defined in chain/asset.ts:260

  Convenience to create new Price.

  #### Parameters

  - ##### value: PriceType

  #### Returns Price

Generated using TypeDoc