Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fxcm.fix
Class Instrument

    java.lang.Object
      com.fxcm.fix.Instrument

Direct Known Subclasses:
  TradingSecurity

    public class Instrument

extends Object

Instrument - Common component block of FIX messages.

Field Summary
`static com.fxcm.entity.ICode` | `OBJ_TYPE` Instrument object type

Constructor Summary
`Instrument()` Empty constructor.
`Instrument(String aSymbol)` Constructor with given currency pair symbol.
`Instrument(String aSymbol, int aFXCMSymID, int aFXCMSymPrecision)` Constructor with full set of fields.
`Instrument(String aSymbol, int aFXCMSymID, int aFXCMSymPrecision, double aFXCMSymPointSize, int aFXCMSymSortOrder)` Constructs a new Instrument

Method Summary
`boolean` | `equals(Object aObj)` Checks if a object is equal to this object.
`boolean` | `fill(Instrument aOrig)` Fills out object state.
`String` | `getCFICode()` Indicates the type of security using ISO 10962 standard, Classification of Financial Instruments (CFI code) values.
`int` | `getContractMultiplier()` Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100, 1000, etc).
`int` | `getFactor()` Factor by which quantity multiples
`double` | `getFXCMCondDistEntryLimit()`
`double` | `getFXCMCondDistEntryStop()`
`double` | `getFXCMCondDistLimit()`
`double` | `getFXCMCondDistStop()`
`double` | `getFXCMMaxQuantity()`
`double` | `getFXCMMinQuantity()`
`int` | `getFXCMProductID()` Product id (1-Forex, 2-Index, 3-Commodity, 4-Treasury, 5-Bullion)
`int` | `getFXCMSymID()` Obtains FXCM ID of currency offer.
`double` | `getFXCMSymPointSize()` Retrieves the FXCM Sym Point Size
`int` | `getFXCMSymPrecision()` Obtains precision of currency offer.
`int` | `getFXCMSymSortOrder()` Retrieves the FXCM Sym Sort Order
`String` | `getFXCMTradingStatus()`
`int` | `getProduct()` Indicates the type of product the security is associated with (high-level category) Valid values: '2' COMMODITY '4' CURRENCY '6' GOVERNMENT '7' INDEX
`String` | `getSecurityType()` Indicates type of security.
`String` | `getSymbol()` Obtains currency symbol.
`com.fxcm.entity.ICode` | `getType()` Returns the type of the entity.
`boolean` | `isBullion()` If instrument is bullion
`boolean` | `isCommodity()` If instrument is commodity
`boolean` | `isForex()` If instrument is forex
`boolean` | `isIndex()` If instrument is index
`boolean` | `isTreasury()` If instrument is treasury
`boolean` | `isValid()` Determines whether entity state is valid.
`String` | `priceToString(double aPx)` Converts price number onto string.
`void` | `printState(PrintStream aOut)` Deprecated. printState is no longer supported. Use toString instead
`void` | `setCFICode(String aCFICode)` Indicates the type of security using ISO 10962 standard, Classification of Financial Instruments (CFI code) values.
`void` | `setContractMultiplier(int aContractMultiplier)` Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100, 1000, etc).
`void` | `setFactor(int aFactor)` Factor by which quantity multiples
`void` | `setFXCMCondDistEntryLimit(double aFXCMCondDistEntryLimit)`
`void` | `setFXCMCondDistEntryStop(double aFXCMCondDistEntryStop)`
`void` | `setFXCMCondDistLimit(double aFXCMCondDistLimit)`
`void` | `setFXCMCondDistStop(double aFXCMCondDistStop)`
`void` | `setFXCMMaxQuantity(double aFXCMMaxQuantity)`
`void` | `setFXCMMinQuantity(double aFXCMMinQuantity)`
`void` | `setFXCMProductID(int aFXCMProductID)` Product id (1-Forex, 2-Index, 3-Commodity, 4-Treasury, 5-Bullion)
`void` | `setFXCMSymID(int aFXCMSymID)` Updates FXCM ID of currency offer.
`void` | `setFXCMSymPointSize(double aFXCMSymPointSize)` Sets the FXCM Sym Point Size
`void` | `setFXCMSymPrecision(int aFXCMSymPrecision)` Updates Precision of cPrices (pip size)
`void` | `setFXCMSymSortOrder(int aFXCMSymSortOrder)` Sets the FXCM Sym Sort Order
`void` | `setFXCMTradingStatus(String aFXCMTradingStatus)`
`void` | `setProduct(int aProduct)` Indicates the type of product the security is associated with (high-level category) Valid values: '2' COMMODITY '4' CURRENCY '6' GOVERNMENT '7' INDEX
`void` | `setSecurityType(String aSecurityType)` Indicates type of security.
`void` | `setSymbol(String aSymbol)` Updates currency symbol.
`String` | `toString()` String representation of the class

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### OBJ_TYPE

    public static final com.fxcm.entity.ICode OBJ_TYPE

  Instrument object type

Constructor Detail

### Instrument

    public Instrument()

  Empty constructor.

### Instrument

    public Instrument(String aSymbol)

  Constructor with given currency pair symbol.

  Parameters:
    `aSymbol` - Symbol is defined in "EBS" (Electronic Banking System) format: "CCY1/CCY2"

### Instrument

    public Instrument(String aSymbol,
                      int aFXCMSymID,
                      int aFXCMSymPrecision)

  Constructor with full set of fields.

  Parameters:
    `aSymbol` - Symbol is defined in "EBS" (Electronic Banking System) format: "CCY1/CCY2"
    `aFXCMSymID` - FXCM ID of currency offer
    `aFXCMSymPrecision` - Number of digits after decimal point

### Instrument

    public Instrument(String aSymbol,
                      int aFXCMSymID,
                      int aFXCMSymPrecision,
                      double aFXCMSymPointSize,
                      int aFXCMSymSortOrder)

  Constructs a new Instrument

  Parameters:
    `aSymbol` - symbol
    `aFXCMSymID` - symid
    `aFXCMSymPrecision` - symprecision
    `aFXCMSymPointSize` - sympointsize
    `aFXCMSymSortOrder` - symsortorder

Method Detail

### equals

    public boolean equals(Object aObj)

  Checks if a object is equal to this object.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `aObj` - Code object to compare.
  Returns:
    `true` if codes are the same; `false` otherwise.

### fill

    public boolean fill(Instrument aOrig)

  Fills out object state.

  Parameters:
    `aOrig` - Object to copy state from.
  Returns:
    `true` if state is updated; `false` otherwise.

### getCFICode

    public String getCFICode()

  Indicates the type of security using ISO 10962 standard, Classification of Financial Instruments (CFI code) values.

  Returns:
    CFICode

### setCFICode

    public void setCFICode(String aCFICode)

  Indicates the type of security using ISO 10962 standard, Classification of Financial Instruments (CFI code) values.

  Parameters:
    `aCFICode` - CFICode

### getContractMultiplier

    public int getContractMultiplier()

  Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100, 1000, etc).

  Returns:
    contract multiplier

### setContractMultiplier

    public void setContractMultiplier(int aContractMultiplier)

  Specifies the ratio or multiply factor to convert from "nominal" units (e.g. contracts) to total units (e.g. shares) (e.g. 1.0, 100, 1000, etc).

  Parameters:
    `aContractMultiplier` - multiplier

### getFactor

    public int getFactor()

  Factor by which quantity multiples

  Returns:
    factor

### setFactor

    public void setFactor(int aFactor)

  Factor by which quantity multiples

  Parameters:
    `aFactor` - factor

### getFXCMCondDistEntryLimit

    public double getFXCMCondDistEntryLimit()

### setFXCMCondDistEntryLimit

    public void setFXCMCondDistEntryLimit(double aFXCMCondDistEntryLimit)

### getFXCMCondDistEntryStop

    public double getFXCMCondDistEntryStop()

### setFXCMCondDistEntryStop

    public void setFXCMCondDistEntryStop(double aFXCMCondDistEntryStop)

### getFXCMCondDistLimit

    public double getFXCMCondDistLimit()

### setFXCMCondDistLimit

    public void setFXCMCondDistLimit(double aFXCMCondDistLimit)

### getFXCMCondDistStop

    public double getFXCMCondDistStop()

### setFXCMCondDistStop

    public void setFXCMCondDistStop(double aFXCMCondDistStop)

### getFXCMMaxQuantity

    public double getFXCMMaxQuantity()

### setFXCMMaxQuantity

    public void setFXCMMaxQuantity(double aFXCMMaxQuantity)

### getFXCMMinQuantity

    public double getFXCMMinQuantity()

### setFXCMMinQuantity

    public void setFXCMMinQuantity(double aFXCMMinQuantity)

### getFXCMProductID

    public int getFXCMProductID()

  Product id (1-Forex, 2-Index, 3-Commodity, 4-Treasury, 5-Bullion)

  Returns:
    fxcm product id

### setFXCMProductID

    public void setFXCMProductID(int aFXCMProductID)

  Product id (1-Forex, 2-Index, 3-Commodity, 4-Treasury, 5-Bullion)

  Parameters:
    `aFXCMProductID` - FXCMProductID

### getFXCMSymID

    public int getFXCMSymID()

  Obtains FXCM ID of currency offer.

  Returns:
    currency offer id

### setFXCMSymID

    public void setFXCMSymID(int aFXCMSymID)

  Updates FXCM ID of currency offer.

  Parameters:
    `aFXCMSymID` - Offer ID

### getFXCMSymPointSize

    public double getFXCMSymPointSize()

  Retrieves the FXCM Sym Point Size

  Returns:
    pointsize

### setFXCMSymPointSize

    public void setFXCMSymPointSize(double aFXCMSymPointSize)

  Sets the FXCM Sym Point Size

  Parameters:
    `aFXCMSymPointSize` - pointsize

### getFXCMSymPrecision

    public int getFXCMSymPrecision()
                            throws NotDefinedException

  Obtains precision of currency offer.

  Returns:
    Number of digits after decimal point
  Throws:
    `NotDefinedException` - when field not specified

### setFXCMSymPrecision

    public void setFXCMSymPrecision(int aFXCMSymPrecision)

  Updates Precision of cPrices (pip size)

  Parameters:
    `aFXCMSymPrecision` - Precision of cPrices

### getFXCMSymSortOrder

    public int getFXCMSymSortOrder()

  Retrieves the FXCM Sym Sort Order

  Returns:
    symsortorder

### setFXCMSymSortOrder

    public void setFXCMSymSortOrder(int aFXCMSymSortOrder)

  Sets the FXCM Sym Sort Order

  Parameters:
    `aFXCMSymSortOrder` - symsortorder

### getFXCMTradingStatus

    public String getFXCMTradingStatus()

### setFXCMTradingStatus

    public void setFXCMTradingStatus(String aFXCMTradingStatus)

### getProduct

    public int getProduct()

  Indicates the type of product the security is associated with (high-level category)

       Valid values:
       '2'  COMMODITY
       '4'  CURRENCY
       '6'  GOVERNMENT
       '7'  INDEX

  Returns:
    product

### setProduct

    public void setProduct(int aProduct)

  Indicates the type of product the security is associated with (high-level category)

       Valid values:
       '2'  COMMODITY
       '4'  CURRENCY
       '6'  GOVERNMENT
       '7'  INDEX

  Parameters:
    `aProduct` - product

### getSecurityType

    public String getSecurityType()

  Indicates type of security.

  Returns:
    security type

### setSecurityType

    public void setSecurityType(String aSecurityType)

  Indicates type of security.

  Parameters:
    `aSecurityType` - security type

### getSymbol

    public String getSymbol()
                     throws NotDefinedException

  Obtains currency symbol.

  Returns:
    Symbol is defined in "EBS" (Electronic Banking System) format: "CCY1/CCY2"
  Throws:
    `NotDefinedException` - when field not specified

### setSymbol

    public void setSymbol(String aSymbol)

  Updates currency symbol.

  Parameters:
    `aSymbol` - Symbol is defined in "EBS" (Electronic Banking System) format: "CCY1/CCY2"

### getType

    public com.fxcm.entity.ICode getType()

  Returns the type of the entity.

  Returns:
    code of entity type.

### isForex

    public boolean isForex()

  If instrument is forex

  Returns:
    true or false

### isIndex

    public boolean isIndex()

  If instrument is index

  Returns:
    true or false

### isCommodity

    public boolean isCommodity()

  If instrument is commodity

  Returns:
    true or false

### isTreasury

    public boolean isTreasury()

  If instrument is treasury

  Returns:
    true or false

### isBullion

    public boolean isBullion()

  If instrument is bullion

  Returns:
    true or false

### isValid

    public boolean isValid()

  Determines whether entity state is valid.

  Returns:
    `true` alwais

### priceToString

    public String priceToString(double aPx)

  Converts price number onto string. Cares about rounding.

  Parameters:
    `aPx` - price to proceed.
  Returns:
    Formatted string.

### printState

    public void printState(PrintStream aOut)

  Deprecated. printState is no longer supported. Use toString instead

  Prints entity state.

  Parameters:
    `aOut` - Stream to print out.

### toString

    public String toString()

  String representation of the class

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 FXCM, LLC. All Rights Reserved.