com.oanda.fxtrade.api
Interface Instrument

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<FXPair>, FXPair

public interface Instrument
extends FXPair


Field Summary
static int BOND
           
static int COMMODITY
           
static int CURRENCY
           
static int INDEX
           
static int NO_MARGIN_INFO
           
 
Method Summary
 double getAsk()
          Get current ask rate
 double getBid()
          Get current bid rate
 int getCategory()
          Retrieves instrument category
 double getClosingRate(boolean buy)
          Give the closing rate based on trade type
 FXTick getCurrentTick()
          Get the latest tick for this instrument
 double getMaxMargin()
          Deprecated. 
 int getMaxTradeSize()
          Get max trade size
 int getMaxTrailingStop()
          Get largest allowable trailing stop
 double getMean()
          Get current mean rate
 int getMinTrailingStop()
          Get smallest allowable trailing stop
 double getOpeningRate(boolean buy)
          Give the opening rate based on trade type
 double getPIP()
          Get value of one pip
 int getPipettes()
          Get the number of pippettes
 int getPrecision()
          Get instrument precision
 int getStatus()
          Gets status of instrument.
 java.lang.String getSymbol()
          Get the symbol for this instrument
 int numDecimals()
          get number of decimals
 int numPipettes()
          Get number of pippettes
 
Methods inherited from interface com.oanda.fxtrade.api.FXPair
clone, compareTo, equals, getBase, getInverse, getPair, getQuote, hashCode, isHalted, setBase, setPair, setQuote, toString
 

Field Detail

NO_MARGIN_INFO

static final int NO_MARGIN_INFO
See Also:
Constant Field Values

BOND

static final int BOND
See Also:
Constant Field Values

CURRENCY

static final int CURRENCY
See Also:
Constant Field Values

INDEX

static final int INDEX
See Also:
Constant Field Values

COMMODITY

static final int COMMODITY
See Also:
Constant Field Values
Method Detail

getAsk

double getAsk()
Get current ask rate

Returns:
rate

getBid

double getBid()
Get current bid rate

Returns:
rate

getCategory

int getCategory()
Retrieves instrument category

Returns:
category code that could be: 1 - Bond 8 - Commodity 2 - Currency 4 - Index

getClosingRate

double getClosingRate(boolean buy)
Give the closing rate based on trade type

Parameters:
boolean - buy (as opposed to sell)
Returns:

getCurrentTick

FXTick getCurrentTick()
Get the latest tick for this instrument

Returns:
FXTick

getMaxMargin

@Deprecated
double getMaxMargin()
Deprecated. 


getMaxTradeSize

int getMaxTradeSize()
Get max trade size

Returns:
units

getMean

double getMean()
Get current mean rate

Returns:
rate

getOpeningRate

double getOpeningRate(boolean buy)
Give the opening rate based on trade type

Parameters:
boolean - buy (as opposed to sell)
Returns:

getPIP

double getPIP()
Get value of one pip

Returns:
pip value

getPipettes

int getPipettes()
Get the number of pippettes

Returns:
pippettes

getPrecision

int getPrecision()
Get instrument precision

Returns:
precision

getStatus

int getStatus()
Gets status of instrument. possible values: 0 = active && !halted 1 = active && halted 2 = !active && !halted 3 = !active && halted


getSymbol

java.lang.String getSymbol()
Get the symbol for this instrument

Returns:
String symbol

numDecimals

int numDecimals()
get number of decimals

Returns:
number of decimals

numPipettes

int numPipettes()
Get number of pippettes

Returns:
number of pippettes

getMaxTrailingStop

int getMaxTrailingStop()
Get largest allowable trailing stop

Returns:
largest allowable trailing stop in pips

getMinTrailingStop

int getMinTrailingStop()
Get smallest allowable trailing stop

Returns:
smallest allowable trailing stop in pips


Copyright © 2005 OANDA Corporation. All Rights Reserved.