public interface IDataService
Modifier and Type | Method and Description |
---|---|
void |
addDailyHighLowListener(Instrument instrument,
IDailyHighLowListener listener)
The method adds daily high/low listener.
|
void |
addHighLowListener(Period period,
Instrument instrument,
IHighLowListener listener)
The method adds high/low listener.
After addition, listener will be notified with the current best period's high/low (If in progress candle exists in the system) If in progress candle doesn't exist in the system listener will be notified as soon as candle arrives |
Map<Instrument,Collection<IDailyHighLowListener>> |
getDailyHighLowListeners()
Returns all daily high/low listeners
This method equals to getHighLowListeners(Period.DAILY)
|
Collection<IDailyHighLowListener> |
getDailyHighLowListeners(Instrument instrument)
Returns all daily high/low listeners subscribed on the passed instrument.
|
IFXSentimentIndex |
getFXSentimentIndex(Currency currency)
Deprecated.
Use
getFXSentimentIndex(ICurrency) instead |
IFXSentimentIndex |
getFXSentimentIndex(Currency currency,
long time)
Deprecated.
Use
getFXSentimentIndex(ICurrency, long) instead |
List<IFXSentimentIndexBar> |
getFXSentimentIndex(Currency currency,
Period period,
long from,
long to)
Deprecated.
|
IFXSentimentIndex |
getFXSentimentIndex(ICurrency currency)
Returns last updated Forex Sentiment Index for specified
ICurrency .Equivalent to the getFXSentimentIndex(ICurrency, System.currentTimeMillis) for live data and getFXSentimentIndex(ICurrency, pseudo_current_historical_tester_time) for historical data. |
IFXSentimentIndex |
getFXSentimentIndex(ICurrency currency,
long time)
Returns Forex Sentiment Index which was most up-to-date at a point of specified
time |
List<IFXSentimentIndexBar> |
getFXSentimentIndex(ICurrency currency,
Period period,
long from,
long to)
Returns the list of sentiment indices which were most up-to-date at the specified time frame.
|
IFXSentimentIndex |
getFXSentimentIndex(Instrument instrument)
Returns last updated Forex Sentiment Index for specified
Instrument .Equivalent to the getFXSentimentIndex(instrument, System.currentTimeMillis) for live data and getFXSentimentIndex(instrument, pseudo_current_historical_tester_time) for historical data. |
IFXSentimentIndex |
getFXSentimentIndex(Instrument instrument,
long time)
Returns Forex Sentiment Index which was most up-to-date at a point of specified
time |
List<IFXSentimentIndexBar> |
getFXSentimentIndex(Instrument instrument,
Period period,
long from,
long to)
Returns the list of sentiment indices which were most up-to-date at the specified time frame.
|
Map<Period,Map<Instrument,Collection<IHighLowListener>>> |
getHighLowListeners()
Returns all high/low listeners
|
Map<Instrument,Collection<IHighLowListener>> |
getHighLowListeners(Period period)
Returns all high/low listeners subscribed to the passed period and grouped by instrument
|
Collection<IHighLowListener> |
getHighLowListeners(Period period,
Instrument instrument)
Returns all high/low listeners subscribed to the passed period and instrument
|
ITimeDomain |
getOfflineTimeDomain()
Returns either present, current offline (weekend)
time interval or the next approximate upcoming one.The same as #getOfflineTimeDomain(shift) with shift == 0 |
ITimeDomain |
getOfflineTimeDomain(int shift)
Returns offline (weekend)
time interval that is shifted back or forward for number of offline intervals specified in shift parameter. |
Set<ITimeDomain> |
getOfflineTimeDomains(long from,
long to)
Returns the set of offline (weekend)
time intervals ascending ordered by time which are within the limits of from and to parameters. |
Map<String,Object> |
getServerProperties()
Return unmodifiable map of server properties
|
long |
getTimeOfFirstCandle(IFeedDescriptor feedDescriptor)
Returns the time of first feed data specified in
IFeedDescriptor . |
long |
getTimeOfFirstCandle(Instrument instrument,
Period period)
|
long |
getTimeOfFirstLineBreak(Instrument instrument,
Period timeSession)
|
long |
getTimeOfFirstPointAndFigure(Instrument instrument,
PriceRange priceRange,
ReversalAmount reversalAmount)
|
long |
getTimeOfFirstPointAndFigure(Instrument instrument,
PriceRange priceRange,
ReversalAmount reversalAmount,
DataInterpolationDescriptor dataInterpolationDescriptor)
Returns the time of first
point & figures for specified Instrument , PriceRange , ReversalAmount and DataInterpolationDescriptor |
long |
getTimeOfFirstRangeBar(Instrument instrument,
PriceRange priceRange)
|
long |
getTimeOfFirstRangeBar(Instrument instrument,
PriceRange priceRange,
DataInterpolationDescriptor dataInterpolationDescriptor)
Returns the time of first
price range bars for specified Instrument , PriceRange and DataInterpolationDescriptor |
long |
getTimeOfFirstRenko(Instrument instrument,
Period timeSession)
|
long |
getTimeOfFirstRenko(Instrument instrument,
PriceRange priceRange)
Deprecated.
|
long |
getTimeOfFirstTick(Instrument instrument)
Returns the time of first
ticks for specified Instrument |
long |
getTimeOfFirstTickBar(Instrument instrument)
Returns the time of first
tick bars for specified Instrument |
IWLabelData |
getWhiteLabelData() |
boolean |
isOfflineTime(long time)
Returns true if specified time is within the limits of offline (weekend) period.
|
void |
removeAllDailyHighLowListeners()
Removes all high/low listeners
|
void |
removeAllHighLowListeners()
Removes all high/low listeners
NOTE: shared instance of listeners will be unsubscribed from every period and/or instrument.
|
void |
removeDailyHighLowListener(IDailyHighLowListener listener)
Removes daily high/low listener
|
void |
removeHighLowListener(IHighLowListener listener)
Removes high/low listener.
NOTE: shared instance of listener will be unsubscribed from every period and/or instrument. |
void addDailyHighLowListener(Instrument instrument, IDailyHighLowListener listener)
instrument
- Instrument to listen for high/lowlistener
- listener to addaddHighLowListener(Period, Instrument, IHighLowListener)
void removeDailyHighLowListener(IDailyHighLowListener listener)
listener
- listener to removeremoveHighLowListener(IHighLowListener)
Collection<IDailyHighLowListener> getDailyHighLowListeners(Instrument instrument)
instrument
- Instrument to get listeners forgetHighLowListeners(Period, Instrument)
Map<Instrument,Collection<IDailyHighLowListener>> getDailyHighLowListeners()
getHighLowListeners(Period)
void removeAllDailyHighLowListeners()
removeAllHighLowListeners()
void addHighLowListener(Period period, Instrument instrument, IHighLowListener listener)
period
- Candles' Period
to listen to. Period.TICK
isn't supported.instrument
- Candles Instrument
to listen to.listener
- instance of IHighLowListener
void removeHighLowListener(IHighLowListener listener)
listener
- instance of IHighLowListener
Collection<IHighLowListener> getHighLowListeners(Period period, Instrument instrument)
period
- listener's Period
instrument
- listener's Instrument
Map<Instrument,Collection<IHighLowListener>> getHighLowListeners(Period period)
period
- listener's Period
Map<Period,Map<Instrument,Collection<IHighLowListener>>> getHighLowListeners()
void removeAllHighLowListeners()
long getTimeOfFirstCandle(IFeedDescriptor feedDescriptor)
IFeedDescriptor
.feedDescriptor
- the IFeedDescriptor
specifies the feed data the first time must be returned.IFeedDescriptor.getDataType()
determines the required properties of IFeedDescriptor
must be set andInstrument
, equals to getTimeOfFirstTick(Instrument)
Instrument
, equals to getTimeOfFirstTickBar(Instrument)
Instrument
and Period
, equals to getTimeOfFirstCandle(Instrument, Period)
Instrument
and PriceRange
, equals to getTimeOfFirstRangeBar(Instrument, PriceRange)
Instrument
, PriceRange
and and ReversalAmount
, equals to getTimeOfFirstPointAndFigure(Instrument, PriceRange, ReversalAmount)
Instrument
and PriceRange
, equals to getTimeOfFirstRenko(Instrument, PriceRange)
Instrument
and Period
, equals to getTimeOfFirstLineBreak(Instrument, Period)
IFeedDescriptor
or Long.MAX_VALUE
if there is no one.long getTimeOfFirstTick(Instrument instrument)
ticks
for specified Instrument
instrument
- the Instrument
the first tick's time must be returned.ticks
for specified Instrument
or Long.MAX_VALUE
if there is no one.DataType.TICKS
long getTimeOfFirstTickBar(Instrument instrument)
tick bars
for specified Instrument
instrument
- the Instrument
the first Tick Bars' time must be returned.tick bars
for specified Instrument
or Long.MAX_VALUE
if there is no one.DataType.TICK_BAR
long getTimeOfFirstCandle(Instrument instrument, Period period)
instrument
- the Instrument
the first candles
' time must be returned.period
- the Period
the first candles
' time must be returned.candles
for specified Instrument
and Period
or Long.MAX_VALUE
if there is no one.DataType.TIME_PERIOD_AGGREGATION
@Deprecated long getTimeOfFirstRangeBar(Instrument instrument, PriceRange priceRange)
getTimeOfFirstRangeBar(Instrument, PriceRange, com.dukascopy.api.feed.DataInterpolationDescriptor)
instrument
- the Instrument
the first price range bars
' time must be returned.priceRange
- the PriceRange
the first price range bars
' time must be returned.price range bars
for specified Instrument
and PriceRange
or Long.MAX_VALUE
if there is no one.DataType.PRICE_RANGE_AGGREGATION
long getTimeOfFirstRangeBar(Instrument instrument, PriceRange priceRange, DataInterpolationDescriptor dataInterpolationDescriptor)
price range bars
for specified Instrument
, PriceRange
and DataInterpolationDescriptor
instrument
- the Instrument
the first price range bars
' time must be returned.priceRange
- the PriceRange
the first price range bars
' time must be returned.dataInterpolationDescriptor
- the DataInterpolationDescriptor
the first price range bars
' time must be returned.price range bars
for specified Instrument
and PriceRange
or Long.MAX_VALUE
if there is no one.DataType.PRICE_RANGE_AGGREGATION
@Deprecated long getTimeOfFirstPointAndFigure(Instrument instrument, PriceRange priceRange, ReversalAmount reversalAmount)
getTimeOfFirstPointAndFigure(Instrument, PriceRange, ReversalAmount, com.dukascopy.api.feed.DataInterpolationDescriptor)
instrument
- the Instrument
the first point & figures
' time must be returned.priceRange
- the PriceRange
the first point & figures
' time must be returned.reversalAmount
- the ReversalAmount
the first point & figures
' time must be returned.point & figures
for specified Instrument
, PriceRange
and ReversalAmount
or Long.MAX_VALUE
if there is no one.DataType.POINT_AND_FIGURE
long getTimeOfFirstPointAndFigure(Instrument instrument, PriceRange priceRange, ReversalAmount reversalAmount, DataInterpolationDescriptor dataInterpolationDescriptor)
point & figures
for specified Instrument
, PriceRange
, ReversalAmount
and DataInterpolationDescriptor
instrument
- the Instrument
the first point & figures
' time must be returned.priceRange
- the PriceRange
the first point & figures
' time must be returned.reversalAmount
- the ReversalAmount
the first point & figures
' time must be returned.dataInterpolationDescriptor
- the DataInterpolationDescriptor
the first point & figures
' time must be returned.point & figures
for specified Instrument
, PriceRange
and ReversalAmount
or Long.MAX_VALUE
if there is no one.DataType.POINT_AND_FIGURE
@Deprecated long getTimeOfFirstRenko(Instrument instrument, PriceRange priceRange)
getTimeOfFirstRenko(Instrument, Period)
instrument
- the Instrument
the first renko
' time must be returned.priceRange
- the PriceRange
the first renko
' time must be returned.renko
for specified Instrument
and PriceRange
or Long.MAX_VALUE
if there is no one.DataType.RENKO
long getTimeOfFirstRenko(Instrument instrument, Period timeSession)
instrument
- the Instrument
the first renko
' time must be returned.timeSession
- the Period
(renko session) the first renko
' time must be returned.renko
for specified Instrument
and time session
or Long.MAX_VALUE
if there is no one.DataType.RENKO
long getTimeOfFirstLineBreak(Instrument instrument, Period timeSession)
instrument
- the Instrument
the first N-Line Break
' time must be returned.timeSession
- the Period
(time session) the first N-Line Break
' time must be returned.N-Line Break
for specified Instrument
and time session
or Long.MAX_VALUE
if there is no one.DataType.LINE_BREAK
IFXSentimentIndex getFXSentimentIndex(Instrument instrument)
Instrument
.instrument
- Instrument
of sentiment indexnull
if there is no suchgetFXSentimentIndex(Instrument, long)
IFXSentimentIndex getFXSentimentIndex(Instrument instrument, long time)
time
instrument
- Instrument
of sentiment indextime
- the point of time in the past in milliseconds.Calendar
/Date
/TimeUnit
/DateFormat
or
JFUtils.getTimeForNPeriodsBack(Period, long, int)
/ JFUtils.getTimeForNPeriodsForward(Period, long, int)
or
time
or null
if there is no such.JFUtils.getTimeForNPeriodsBack(Period, long, int)
,
JFUtils.getTimeForNPeriodsForward(Period, long, int)
List<IFXSentimentIndexBar> getFXSentimentIndex(Instrument instrument, Period period, long from, long to) throws JFException
instrument
- Instrument
of sentiment indexperiod
- period between the sentiment indicesfrom
- start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See IHistory.getBarStart(Period, long)
description if you want to get bar starting time for candle that includes specific timeto
- end time of the time interval for which bars should be loaded. This is the starting time of the last candle to be loadednull
if there is no such.JFException
- if time
is not divisible by the interval of period
or the period is not among
Period.THIRTY_MINS, Period.ONE_HOUR, Period.FOUR_HOURS, Period.DAILY, Period.WEEKLY@Deprecated IFXSentimentIndex getFXSentimentIndex(Currency currency)
getFXSentimentIndex(ICurrency)
insteadIFXSentimentIndex getFXSentimentIndex(ICurrency currency)
ICurrency
.currency
- ICurrency
of sentiment index.null
if there is no suchgetFXSentimentIndex(ICurrency, long)
@Deprecated IFXSentimentIndex getFXSentimentIndex(Currency currency, long time)
getFXSentimentIndex(ICurrency, long)
insteadIFXSentimentIndex getFXSentimentIndex(ICurrency currency, long time)
time
currency
- ICurrency
of sentiment index.time
- the point of time in the past in milliseconds.Calendar
/Date
/TimeUnit
/DateFormat
or
JFUtils.getTimeForNPeriodsBack(Period, long, int)
/ JFUtils.getTimeForNPeriodsForward(Period, long, int)
or
time
or null
if there is no such.JFUtils.getTimeForNPeriodsBack(Period, long, int)
,
JFUtils.getTimeForNPeriodsForward(Period, long, int)
@Deprecated List<IFXSentimentIndexBar> getFXSentimentIndex(Currency currency, Period period, long from, long to) throws JFException
getFXSentimentIndex(ICurrency, Period, long, long)
insteadJFException
List<IFXSentimentIndexBar> getFXSentimentIndex(ICurrency currency, Period period, long from, long to) throws JFException
currency
- ICurrency
of sentiment indexperiod
- period between the sentiment indicesfrom
- start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See IHistory.getBarStart(Period, long)
description if you want to get bar starting time for candle that includes specific timeto
- end time of the time interval for which bars should be loaded. This is the starting time of the last candle to be loadednull
if there is no such.JFException
- if time
is not divisible by the interval of period
or the period is not among
Period.THIRTY_MINS, Period.ONE_HOUR, Period.FOUR_HOURS, Period.DAILY, Period.WEEKLYboolean isOfflineTime(long time)
time
- time in millisecondsITimeDomain getOfflineTimeDomain() throws JFException
time interval
or the next approximate upcoming one.time interval
or the next approximate upcoming one.JFException
- when some error occursgetOfflineTimeDomain(int)
ITimeDomain getOfflineTimeDomain(int shift) throws JFException
time interval
that is shifted back or forward for number of offline intervals specified in shift
parameter.shift
- number of offline intervals back or forward in time staring from current one. E.g.:
time interval
that is shifted back or forward for number of offline intervals specified in shift
parameterJFException
- when some error occursSet<ITimeDomain> getOfflineTimeDomains(long from, long to) throws JFException
time intervals
ascending ordered by time which are within the limits of from and to parameters.from
- start of the time interval for which offline periods should be loaded. If start time is within the limits of offline period - this period will be returned as first element of resulting set.to
- end of the time interval for which offline periods should be loaded. If end time is within the limits of offline period - this period will be returned as last element of resulting set.time intervals
ascending ordered by time which are within the limits of from and to parameters.JFException
- when some error occursMap<String,Object> getServerProperties()
IWLabelData getWhiteLabelData()
IWLabelData
informationCopyright © 2016. All rights reserved.