Skip to main content
Version: v25

IBrokerConnectionAdapterFactory

Interface
Types Module: Broker

Methods

createDelegate

Creates a Delegate object

Signature

createDelegate<T>() => IDelegate<T>

Type parameters

NameType
Textends Function

Returns

IDelegate<T>


createPriceFormatter

Creates a price formatter.

Signature

createPriceFormatter(priceScale?: number, minMove?: number, fractional?: boolean, minMove2?: number, variableMinTick?: string) => IPriceFormatter

Parameters

NameTypeDescription
priceScale?numberdefines the number of decimal places. It is 10^number-of-decimal-places. If a price is displayed as 1.01, pricescale is 100; If it is displayed as 1.005, pricescale is 1000.
minMove?numberthe amount of price precision steps for 1 tick. For example, since the tick size for U.S. equities is 0.01, minmov is 1. But the price of the E-mini S&P futures contract moves upward or downward by 0.25 increments, so the minmov is 25.
fractional?booleanfor common prices is false or it can be skipped.
minMove2?numberfor common prices is 0 or it can be skipped.
variableMinTick?stringfor common prices is string (for example, 0.01 10 0.02 25 0.05) or it can be skipped. Example: 1. Typical stock with 0.01 price increment: minmov = 1, pricescale = 100, minmove2 = 0. 2. If minmov = 1, pricescale = 100, minmove2 = 0, variableMinTick = "0.01 10 0.02 25 0.05": - for price = 9: minmov = 1, pricescale = 100, minmove2 = 0. - for price = 13: minmov = 2, pricescale = 100, minmove2 = 0. - for price = 27: minmov = 5, pricescale = 100, minmove2 = 0. For more information on fractional prices, see this article

Returns

IPriceFormatter


createWatchedValue

Creates a WatchedValue object

Signature

createWatchedValue<T>(value?: T) => IWatchedValue<T>

Type parameters

Name
T

Parameters

NameType
value?T

Returns

IWatchedValue<T>