IPriceFormatter
Interface
Types Module: Broker
Specific formatter for numbers
Methods
format
Price formatter
Signature
format(price: number, options?: PriceFormatterFormatOptions) => string
Parameters
Name | Type |
---|---|
price | number |
options? | PriceFormatterFormatOptions |
Returns
string
Overrides
formatChange
OptionalPrice change formatter
Signature
formatChange(price: number, prevPrice: number, options?: PriceFormatterFormatOptions) => string
Parameters
Name | Type |
---|---|
price | number |
prevPrice | number |
options? | PriceFormatterFormatOptions |
Returns
string
Overrides
ISymbolValueFormatter.formatChange
parse
OptionalCheck if the input value satisfies the logic and return either an error or the result of the parsing
Signature
parse(value: string, options?: FormatterParseOptions) => ErrorFormatterParseResult | SuccessFormatterParseResult<number>
Parameters
Name | Type |
---|---|
value | string |
options? | FormatterParseOptions |
Returns
ErrorFormatterParseResult | SuccessFormatterParseResult<number>