Skip to main content
Version: v25

IPriceFormatter

Interface

Specific formatter for numbers

Methods

format

Price Formatter

Signature

format(price: number, signPositive?: boolean, tailSize?: number, signNegative?: boolean, useRtlFormat?: boolean, cutFractionalByPrecision?: boolean) => string

Parameters

NameTypeDescription
pricenumberprice
signPositive?boolean-
tailSize?number-
signNegative?boolean-
useRtlFormat?boolean-
cutFractionalByPrecision?boolean-

Returns

formatted price

string

Overrides

ISymbolValueFormatter.format


formatChange

Optional

Formatter for a price change

Signature

formatChange(currentPrice: number, prevPrice: number, signPositive?: boolean) => string

Parameters

NameTypeDescription
currentPricenumbercurrent price
prevPricenumberprevious price
signPositive?booleanis the sign of the number positive

Returns

string