public class Instrument extends java.lang.Object implements IFinancialInstrument, java.lang.Comparable<Instrument>
fromString(String instrumentStr)
method.IFinancialInstrument.Type
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Instrument another) |
static boolean |
contains(java.lang.String instrumentString)
Returns true if specified Instrument is one of the traded Instruments
|
boolean |
equals(java.lang.String symbol)
Returns true if the string value represents the Instrument
|
static Instrument |
fromInvertedString(java.lang.String instrumentStr)
Returns corresponding inverted Instrument for string in "CUR2/CUR1" format, e.g., string USD/EUR returns Instrument EUR/USD, but string EUR/USD returns null
|
static Instrument |
fromString(java.lang.String instrumentStr)
Returns corresponding Instrument for string in "CUR1/CUR2" format
|
static java.util.Set<Instrument> |
fromStringSet(java.util.Set<java.lang.String> instrumentsAsString) |
double |
getAmountPerContract() |
java.lang.String |
getCountry() |
java.lang.String |
getDescription()
Returns the description of the instrument
|
IInstrumentGroup |
getGroup()
Returns the instrument's group
|
double |
getLeverageUse() |
IMarketInfo |
getMarketInfo() |
double |
getMaxTradeAmount() |
double |
getMinTradeAmount()
Minimal trade amount in contracts.
|
java.lang.String |
getName()
Returns the name of the instrument
|
static java.lang.String |
getPairsSeparator()
Returns currency separator
|
int |
getPipScale()
Returns decimal place count of one pip for the currency pair
|
double |
getPipValue()
Returns value of one pip for this currency pair
|
java.util.Currency |
getPrimaryCurrency()
Deprecated.
Use
getPrimaryJFCurrency() instead |
ICurrency |
getPrimaryJFCurrency()
Returns primary currency of the Instrument
|
java.util.Currency |
getSecondaryCurrency()
Deprecated.
Use
getSecondaryJFCurrency() instead |
ICurrency |
getSecondaryJFCurrency()
Returns secondary currency of the Instrument
|
int |
getTickScale()
Returns decimal place count of instrument's tick size
|
double |
getTradeAmountIncrement() |
IFinancialInstrument.Type |
getType()
Instrument's type
|
boolean |
isExotic() |
static boolean |
isInverted(java.lang.String instrumentStr)
Returns true if Instrument is inverted (such as USD/EUR or JPY/USD)
|
boolean |
isReducedExp() |
boolean |
isTradable()
Checks whether instrument is currently tradable.
|
java.lang.String |
name() |
int |
ordinal() |
static int |
size() |
java.lang.String |
toString() |
static java.util.Set<java.lang.String> |
toStringSet(java.util.Collection<Instrument> instruments)
Returns set of strings, which are Instruments in "CUR1/CUR2" format
|
static Instrument |
valueOf(java.lang.String name) |
static Instrument[] |
values() |
public static final java.util.Comparator<Instrument> COMPARATOR
public static final Instrument AUDJPY
public static final Instrument AUDCAD
public static final Instrument AUDCHF
public static final Instrument AUDNZD
public static final Instrument AUDSGD
public static final Instrument AUDUSD
public static final Instrument CADCHF
public static final Instrument CADHKD
public static final Instrument CADJPY
public static final Instrument CHFJPY
public static final Instrument CHFPLN
public static final Instrument CHFSGD
public static final Instrument EURAUD
public static final Instrument EURBRL
public static final Instrument EURCAD
public static final Instrument EURCHF
public static final Instrument EURCZK
public static final Instrument EURDKK
public static final Instrument EURGBP
public static final Instrument EURHKD
public static final Instrument EURHUF
public static final Instrument EURJPY
public static final Instrument EURMXN
public static final Instrument EURNOK
public static final Instrument EURNZD
public static final Instrument EURPLN
public static final Instrument EURRUB
public static final Instrument EURSEK
public static final Instrument EURSGD
public static final Instrument EURTHB
public static final Instrument EURTRY
public static final Instrument EURUSD
public static final Instrument EURZAR
public static final Instrument GBPAUD
public static final Instrument GBPCAD
public static final Instrument GBPCHF
public static final Instrument GBPJPY
public static final Instrument GBPNZD
public static final Instrument GBPUSD
public static final Instrument HKDJPY
public static final Instrument HUFJPY
public static final Instrument MXNJPY
public static final Instrument NZDCAD
public static final Instrument NZDCHF
public static final Instrument NZDJPY
public static final Instrument NZDSGD
public static final Instrument NZDUSD
public static final Instrument SGDJPY
public static final Instrument USDBRL
public static final Instrument USDCAD
public static final Instrument USDCHF
public static final Instrument USDCNH
public static final Instrument USDCZK
public static final Instrument USDDKK
public static final Instrument USDHKD
public static final Instrument USDHUF
public static final Instrument USDILS
public static final Instrument USDJPY
public static final Instrument USDMXN
public static final Instrument USDNOK
public static final Instrument USDPLN
public static final Instrument USDRON
public static final Instrument USDRUB
public static final Instrument USDSEK
public static final Instrument USDSGD
public static final Instrument USDTHB
public static final Instrument USDTRY
public static final Instrument USDZAR
public static final Instrument ZARJPY
public static final Instrument TRYJPY
public static final Instrument XAGUSD
public static final Instrument XAUUSD
public static final Instrument BTCUSD
public static final Instrument ETHUSD
@Deprecated public static final Instrument BRENTCMDUSD
fromString(String instrumentStr)
instead.fromString("MMM.US/USD")
@Deprecated public static final Instrument LIGHTCMDUSD
@Deprecated public static final Instrument DIESELCMDUSD
@Deprecated public static final Instrument COTTONCMDUSD
@Deprecated public static final Instrument SUGARCMDUSD
@Deprecated public static final Instrument OJUICECMDUSD
@Deprecated public static final Instrument COFFEECMDUSD
@Deprecated public static final Instrument COCOACMDUSD
@Deprecated public static final Instrument DEUIDXEUR
@Deprecated public static final Instrument FRAIDXEUR
@Deprecated public static final Instrument CHEIDXCHF
@Deprecated public static final Instrument GBRIDXGBP
@Deprecated public static final Instrument JPNIDXJPY
@Deprecated public static final Instrument USA30IDXUSD
@Deprecated public static final Instrument USATECHIDXUSD
@Deprecated public static final Instrument USA500IDXUSD
@Deprecated public static final Instrument AUSIDXAUD
@Deprecated public static final Instrument EUSIDXEUR
@Deprecated public static final Instrument NLDIDXEUR
@Deprecated public static final Instrument ITAIDXEUR
@Deprecated public static final Instrument ESPIDXEUR
@Deprecated public static final Instrument HKGIDXHKD
@Deprecated public static final Instrument PRTIDXEUR
@Deprecated public static final Instrument COPPERCMDUSD
@Deprecated public static final Instrument GASCMDUSD
@Deprecated public static final Instrument MMMUSUSD
@Deprecated public static final Instrument TUSUSD
@Deprecated public static final Instrument BAUSUSD
@Deprecated public static final Instrument CATUSUSD
@Deprecated public static final Instrument CVXUSUSD
@Deprecated public static final Instrument CSCOUSUSD
@Deprecated public static final Instrument XOMUSUSD
@Deprecated public static final Instrument GEUSUSD
@Deprecated public static final Instrument GSUSUSD
@Deprecated public static final Instrument INTCUSUSD
@Deprecated public static final Instrument JPMUSUSD
@Deprecated public static final Instrument MSFTUSUSD
@Deprecated public static final Instrument PGUSUSD
@Deprecated public static final Instrument UNHUSUSD
@Deprecated public static final Instrument VZUSUSD
@Deprecated public static final Instrument VUSUSD
@Deprecated public static final Instrument DISUSUSD
@Deprecated public static final Instrument TSLAUSUSD
@Deprecated public static final Instrument AMZNUSUSD
@Deprecated public static final Instrument FBUSUSD
@Deprecated public static final Instrument ADBEUSUSD
@Deprecated public static final Instrument AAPLUSUSD
@Deprecated public static final Instrument GOOGLUSUSD
@Deprecated public static final Instrument NVDAUSUSD
@Deprecated public static final Instrument WYNNUSUSD
@Deprecated public static final Instrument INTUUSUSD
@Deprecated public static final Instrument QCOMUSUSD
@Deprecated public static final Instrument CMEUSUSD
@Deprecated public static final Instrument ATVIUSUSD
@Deprecated public static final Instrument NFLXUSUSD
@Deprecated public static final Instrument SYMCUSUSD
@Deprecated public static final Instrument ORLYUSUSD
@Deprecated public static final Instrument WDCUSUSD
@Deprecated public static final Instrument SPYUSUSD
@Deprecated public static final Instrument BABAUSUSD
@Deprecated public static final Instrument BACUSUSD
@Deprecated public static final Instrument EEMUSUSD
@Deprecated public static final Instrument IWMUSUSD
@Deprecated public static final Instrument JNKUSUSD
@Deprecated public static final Instrument TLTUSUSD
@Deprecated public static final Instrument WFCUSUSD
@Deprecated public static final Instrument XLFUSUSD
@Deprecated public static final Instrument XLIUSUSD
@Deprecated public static final Instrument XLPUSUSD
@Deprecated public static final Instrument VXXUSUSD
@Deprecated public static final Instrument EWZUSUSD
@Deprecated public static final Instrument AUSUSD
@Deprecated public static final Instrument ABTUSUSD
@Deprecated public static final Instrument BKUSUSD
@Deprecated public static final Instrument BMYUSUSD
@Deprecated public static final Instrument CMGUSUSD
@Deprecated public static final Instrument CRMUSUSD
@Deprecated public static final Instrument DEUSUSD
@Deprecated public static final Instrument DIAUSUSD
@Deprecated public static final Instrument ITWUSUSD
@Deprecated public static final Instrument IVWUSUSD
@Deprecated public static final Instrument LUSUSD
@Deprecated public static final Instrument LENUSUSD
@Deprecated public static final Instrument LLYUSUSD
@Deprecated public static final Instrument LMTUSUSD
@Deprecated public static final Instrument MAUSUSD
@Deprecated public static final Instrument NBLUSUSD
@Deprecated public static final Instrument TWTRUSUSD
@Deprecated public static final Instrument ADSDEEUR
@Deprecated public static final Instrument SAPDEEUR
@Deprecated public static final Instrument BMWDEEUR
@Deprecated public static final Instrument IFXDEEUR
@Deprecated public static final Instrument DAIDEEUR
@Deprecated public static final Instrument DPWDEEUR
@Deprecated public static final Instrument LRFREUR
@Deprecated public static final Instrument CSFREUR
@Deprecated public static final Instrument SAFFREUR
@Deprecated public static final Instrument LSEGBGBX
@Deprecated public static final Instrument GSKGBGBX
@Deprecated public static final Instrument AKZANLEUR
@Deprecated public static final Instrument RANDNLEUR
@Deprecated public static final Instrument ASMLNLEUR
@Deprecated public static final Instrument PHIANLEUR
@Deprecated public static final Instrument MTNLEUR
@Deprecated public static final Instrument UNANLEUR
@Deprecated public static final Instrument RDSANLEUR
public static Instrument[] values()
public static int size()
public static Instrument valueOf(java.lang.String name)
public int ordinal()
public java.lang.String name()
public java.lang.String getName()
IFinancialInstrument
getName
in interface IFinancialInstrument
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getPairsSeparator()
public static Instrument fromString(java.lang.String instrumentStr)
instrumentStr
- string in "CUR1/CUR2" formatpublic static Instrument fromInvertedString(java.lang.String instrumentStr)
instrumentStr
- string in "CUR2/CUR1" formatpublic static boolean isInverted(java.lang.String instrumentStr)
instrumentStr
- Instrument string representationpublic static java.util.Set<java.lang.String> toStringSet(java.util.Collection<Instrument> instruments)
instruments
- collection of Instrumentspublic static java.util.Set<Instrument> fromStringSet(java.util.Set<java.lang.String> instrumentsAsString)
public static boolean contains(java.lang.String instrumentString)
instrumentString
- Instrument to check@Deprecated public java.util.Currency getPrimaryCurrency()
getPrimaryJFCurrency()
insteadIFinancialInstrument
getPrimaryCurrency
in interface IFinancialInstrument
@Deprecated public java.util.Currency getSecondaryCurrency()
getSecondaryJFCurrency()
insteadIFinancialInstrument
getSecondaryCurrency
in interface IFinancialInstrument
public ICurrency getPrimaryJFCurrency()
getPrimaryJFCurrency
in interface IFinancialInstrument
public ICurrency getSecondaryJFCurrency()
getSecondaryJFCurrency
in interface IFinancialInstrument
public double getPipValue()
getPipValue
in interface IFinancialInstrument
public int getPipScale()
getPipScale
in interface IFinancialInstrument
public int getTickScale()
IFinancialInstrument
getTickScale
in interface IFinancialInstrument
public IFinancialInstrument.Type getType()
IFinancialInstrument
getType
in interface IFinancialInstrument
public IInstrumentGroup getGroup()
IFinancialInstrument
getGroup
in interface IFinancialInstrument
public double getMinTradeAmount()
getMinTradeAmount
in interface IFinancialInstrument
public double getMaxTradeAmount()
public double getTradeAmountIncrement()
getTradeAmountIncrement
in interface IFinancialInstrument
public double getAmountPerContract()
getAmountPerContract
in interface IFinancialInstrument
public java.lang.String getDescription()
IFinancialInstrument
getDescription
in interface IFinancialInstrument
public double getLeverageUse()
getLeverageUse
in interface IFinancialInstrument
public java.lang.String getCountry()
getCountry
in interface IFinancialInstrument
public IMarketInfo getMarketInfo()
public boolean isExotic()
isExotic
in interface IFinancialInstrument
public boolean isTradable()
public boolean isReducedExp()
public boolean equals(java.lang.String symbol)
symbol
- String representationpublic int compareTo(Instrument another)
compareTo
in interface java.lang.Comparable<Instrument>
Copyright © 2024. All rights reserved.