Skip to main content
Version: latest

ISymbolValueFormatter

Interface

Methods

format

Default formatter function used to assign the correct sign (+ or -) to a number

Signature

format(price: number, signPositive?: boolean) => string

Parameters

NameType
pricenumber
signPositive?boolean

Returns

string


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