2.5.1FXB.Instrument properties

The properties of the FXB.Instrument are as follows. Names marked with * are derived properties - using Object.defineProperty() in Javascript - and will not get included if you clone the object.

Prices do not automatically update. You need to request prices which you are interested in.

Property

Type

Description

instrumentId

Text

ID of the instrument, potentially the result of standardisation

caption

Text

Display-name of the market

tradeable

Boolean

Boolean indicating whether the market can be traded, or is included by the broker for information only

categoryId

Integer (FXB.InstrumentCategories)

Market category - forex, metal, index etc. To turn the numeric categoryId into the equivalent text, use TranslateInstrumentCategory().

underlyingCurrency

Text

Underlying/profit currency of the market, e.g. USD for the DJIA. For FX pairs AAA/BBB, it is reported as BBB. See note on spread-betting accounts.

isFX

Boolean

Boolean indicating whether the market is an FX pair

baseCurrency

Text (3-character code)

For FX pairs only, the AAA currency of the AAA/BBB pair

quoteCurrency

Text (3-character code)

For FX pairs only, the BBB currency of the AAA/BBB pair. See note on spread-betting accounts.

digits

Integer

Number of digits in the market's price

tickSize

Number

Minimum price movement in the market. Typically 10^-digits, but not necessarily so; a market may have digits=2 but tickSize=0.05

pipSize

Number

For FX pairs, the standard definition of a "pip": 0.01 on JPY and HUF pairs; 0.0001 on everything else. For other asset classes, there is no universal consensus on what constitutes a "pip". The framework will generally report a value of 1.00 on non-fx markets, with some special exceptions for markets such as gold and oil.

contractSize

Number

Market contract size, e.g. typically 100,000 on FX markets

minVolume

Number

Minimum trading volume (as cash/notional, such as 1000, rather than a value in lots, such as 0.01)

maxVolume

Number

Maximum trading volume (again cash/notional, not lots)

incrementVolume

Number

Minimum step in trading volume. Almost always the same as minVolume.

time

Integer (millisecond time value)

Time of the most recent quote

bid

Number

Latest bid price

ask

Number

Latest ask price

high

Number

High of the current period. Availability depends on account features.

low

Number

Low of the current period. Availability depends on account features.

change

Number

Change amount during the current period. Availability depends on account features.

changePc

Number

Change amount as a percentage. Availability depends on account features.

spread *

Number

Difference between ask and bid (as price amount such as 0.00023)

spreadPips *

Number

Spread in pips, i.e. spread divided by pipSize

midPrice *

Number

Mid price: (ask + bid) / 2

minLot *

Number

Minimum trade volume, in lots: minVolume / contractSize

maxLot *

Number

Maximum trade volume, in lots: maxVolume / contractSize

lotStep *

Number

Minimum trade increment, in lots: incrementVolume / contractSize

tickValue *

Number

Cash value, in the account's deposit currency, of a change in price by the tickSize when trading the contractSize. For example, if trading EUR/USD on a GBP account, with a contractSize of 100K and a tickSize of 0.00001, then tickValue will be the current GBP equivalent of USD 1.00.