|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RateTable
The RateTable object holds all incoming rate information. A ratetable is used to obtain rate info (quotes for currency pairs) and history data for these as well.
User
Method Summary | |
---|---|
Instrument |
get(java.lang.String symbol)
Deprecated. use getInstrument instead |
java.util.Collection<FXPair> |
getAllSymbols()
Deprecated. Use getAllSymbols(homeCurrency) instead |
java.util.Collection<FXPair> |
getAllSymbols(java.lang.String homeCurrency)
Retrieves all pairs both tradeable and non-tradable with respect to a home currency. |
java.util.Vector<? extends CandlePoint> |
getCandles(FXPair pair,
long intervalInMillisec,
int numberOfCandles)
Obtain the current history (in terms of CandlePoints) of a given currency pair at a given millisecond interval of a particular length (numberOfCandles). |
java.util.Vector<? extends CandlePoint> |
getCandles(FXPair pair,
long intervalInMillisec,
int numberOfCandles,
long startTime,
long endTime)
Obtain the current history (in terms of CandlePoints) of a given currency pair at a given millisecond interval of a particular length (numberOfCandles). |
FXEventManager |
getEventManager()
Get the event manager for this RateTable |
java.util.Vector<? extends FXHistoryPoint> |
getHistory(FXPair pair,
long intervalInMillisec,
int numberOfPoints)
Obtain the current history (in terms of FXHistoryPoints) of a given currency pair at a given millisecond interval of a particular length (numberOfPoints). |
java.util.Vector<? extends FXHistoryPoint> |
getHistory(FXPair pair,
long intervalInMillisec,
int numberOfPoints,
CacheMode cacheMode)
Obtain the current history (in terms of FXHistoryPoints) of a given currency pair at a given millisecond interval of a particular length (numberOfPoints). |
java.util.Vector<? extends FXHistoryPoint> |
getHistory(FXPair pair,
long intervalInMillisec,
int numberOfPoints,
long startTime,
long endTime,
CacheMode cacheMode)
Obtain the current history (in terms of FXHistoryPoints) of a given currency pair at a given millisecond interval of a particular length (numberOfPoints). |
Instrument |
getInstrument(java.lang.String symbol)
Retrieves instrument object for given symbol |
java.util.Vector<? extends MinMaxPoint> |
getMinMaxs(FXPair pair,
long interval,
int numberOfPoints)
Obtain the current history (in terms of MinMaxPoints) of a given currency pair at a given millisecond interval of a particular length (numberOfPoints). |
java.util.Vector<? extends MinMaxPoint> |
getMinMaxs(FXPair pair,
long interval,
int numberOfPoints,
long startTime,
long endTime)
Obtain the current history (in terms of MinMaxPoints) of a given currency pair at a given millisecond interval of a particular length (numberOfPoints). |
java.util.Vector<FXPair> |
getPairs()
Deprecated. Use getAllSymbols(homeCurrency) instead |
FXTick |
getRate(FXPair pair)
Returns the most recent FXTick for the given FXPair without ladder markup. |
FXTick |
getRateForUnits(FXPair pair,
long units)
Returns the most recent FXTick for the given FXPair in the correct rung. |
java.util.Collection<FXTick> |
getRatesForAllUnits(FXPair pair)
Returns the most recent FXTick for the given FXPair in all ladders. |
boolean |
loggedIn()
Check whether the session is active. |
Method Detail |
---|
java.util.Vector<? extends CandlePoint> getCandles(FXPair pair, long intervalInMillisec, int numberOfCandles) throws OAException
pair
- intervalInMillisec
- interval specified in milliseconds, FXClient.getHistory(FXPair, long, int)
numberOfCandles
- number of candles to be requested.
OAException
CandlePoint
java.util.Vector<? extends CandlePoint> getCandles(FXPair pair, long intervalInMillisec, int numberOfCandles, long startTime, long endTime) throws OAException
pair
- intervalInMillisec
- interval specified in milliseconds, FXClient.getHistory(FXPair, long, int)
numberOfCandles
- number of candles to be requested.startTime
- start of the range in unix time. 0 to disable.endTime
- end of the range in unix time. 0 to disable.
OAException
CandlePoint
java.util.Vector<? extends FXHistoryPoint> getHistory(FXPair pair, long intervalInMillisec, int numberOfPoints) throws OAException
For example, to get the history for the last 20 hourly bars:
RateTable rateTableInstance = ...; //obtain an instance of the RateTable
FXPair pair = ...; //choose an interesting currency pair
Vector history = rateTableInstance.getHistory( pair, FXClient.INTERVAL_1_HOUR, 20 );
The Vector of FXHistoryPoint
is in ascending order by unix
timestamp i.e. oldest to newest.
Result vector length should not be relied upon to be numberOfPoints - since unreasonably large requests are truncated.
Since the internet may delay the tick's update, it is possible that the last candles can not show you the correct data.
pair
- pair to request history forintervalInMillisec
- interval specified in millisecondsnumberOfPoints
- number of ticks in query result
OAException
FXHistoryPoint
,
FXClient.getHistory(FXPair, long, int)
java.util.Vector<? extends FXHistoryPoint> getHistory(FXPair pair, long intervalInMillisec, int numberOfPoints, CacheMode cacheMode) throws OAException
For example, to get the history for the last 20 hourly bars:
RateTable rateTableInstance = ...; //obtain an instance of the RateTable
FXPair pair = ...; //choose an interesting currency pair
Vector history = rateTableInstance.getHistory( pair, FXClient.INTERVAL_1_HOUR, 20 );
The Vector of FXHistoryPoint
is in ascending order by unix
timestamp i.e. oldest to newest.
Result vector length should not be relied upon to be numberOfPoints - since unreasonably large requests are truncated.
Since the internet may delay the tick's update, it is possible that the last candles can not show you the correct data.
pair
- pair to request history forintervalInMillisec
- interval specified in millisecondsnumberOfPoints
- number of ticks in query resultcacheMode
- the caching policy to use for the lookup
OAException
FXHistoryPoint
,
FXClient.getHistory(FXPair, long, int)
java.util.Vector<? extends FXHistoryPoint> getHistory(FXPair pair, long intervalInMillisec, int numberOfPoints, long startTime, long endTime, CacheMode cacheMode) throws OAException
For example, to get the history for the last 20 hourly bars:
RateTable rateTableInstance = ...; //obtain an instance of the RateTable
FXPair pair = ...; //choose an interesting currency pair
Vector history = rateTableInstance.getHistory( pair, FXClient.INTERVAL_1_HOUR, 20 );
The Vector of FXHistoryPoint
is in ascending order by unix
timestamp i.e. oldest to newest.
Result vector length should not be relied upon to be numberOfPoints - since unreasonably large requests are truncated.
Since the internet may delay the tick's update, it is possible that the last candles can not show you the correct data.
start and end time can specified for time range without numberOfPoints.
pair
- pair to request history forintervalInMillisec
- interval specified in millisecondsnumberOfPoints
- number of ticks in query resultcacheMode
- the caching policy to use for the lookupstartTime
- start of the range in unix time. 0 to disable.endTime
- end of the range in unix time. 0 to disable.
OAException
FXHistoryPoint
,
FXClient.getHistory(FXPair, long, int)
java.util.Vector<? extends MinMaxPoint> getMinMaxs(FXPair pair, long interval, int numberOfPoints) throws OAException
pair
- interval
- numberOfPoints
-
OAException
MinMaxPoint
java.util.Vector<? extends MinMaxPoint> getMinMaxs(FXPair pair, long interval, int numberOfPoints, long startTime, long endTime) throws OAException
pair
- interval
- numberOfPoints
- startTime
- start of the range in unix time. 0 to disable.endTime
- end of the range in unix time. 0 to disable.
OAException
MinMaxPoint
FXTick getRateForUnits(FXPair pair, long units) throws RateTableException
pair
- the FXPair to retrieveunits
- the number of units used to determine the ladder
RateTableException
FXTick
,
FXPair
FXTick getRate(FXPair pair) throws RateTableException
pair
- the FXPair to retrieve using no ladder
RateTableException
FXTick
,
FXPair
java.util.Collection<FXTick> getRatesForAllUnits(FXPair pair) throws RateTableException
pair
- the pair to get a rate from all ladders for
RateTableException
boolean loggedIn()
FXEventManager getEventManager()
Instrument get(java.lang.String symbol)
Instrument getInstrument(java.lang.String symbol)
java.util.Vector<FXPair> getPairs() throws RateTableException
RateTableException
FXPair
java.util.Collection<FXPair> getAllSymbols() throws RateTableException
RateTableException
java.util.Collection<FXPair> getAllSymbols(java.lang.String homeCurrency) throws RateTableException
homeCurrency
- a home currencies for which to retrieve symbols
RateTableException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |