SeriesRequest
object can be passed through to caplin.chart.service.StreamLinkChartService's
subscribe method in order to request a new OHLC(V) series.
Attributes | Name and Description |
---|---|
|
caplin.chart.series.SeriesRequest(Map config)
Constructs a new |
Attributes | Name and Description |
---|---|
<static>
|
caplin.chart.series.SeriesRequest.REQUEST_BOTH
Request both historic and real-time chart series data. |
<static>
|
caplin.chart.series.SeriesRequest.REQUEST_HISTORIC
Request historic chart series data. |
<static>
|
caplin.chart.series.SeriesRequest.REQUEST_REALTIME
Request real-time chart series data. |
Attributes | Name and Description |
---|---|
<static>
|
Object
deserialize(Element xml)
Creates a new instance of caplin.chart.series.SeriesRequest based on the values in the serialised XML. |
|
String
getBegin()
Returns the Unix time-stamp that indicates how far back historic data should be requested. |
|
Number
getCreationTimestamp()
|
|
String
getDisplayName()
|
|
String
getEnd()
Returns the Unix time-stamp that indicates the point in time up until which historic data should be requested. |
|
String
getId()
Returns the unique identifier for this request. |
|
String
getInstrument()
Returns the instrument that this request relates to. |
|
String
getInterval()
Returns the interval to be requested. |
|
String
getSeriesType()
Returns the series type required for the request. |
|
Number
getTimeout()
Returns the timeout (in milliseconds) for this request. |
|
String
getType()
Returns the type of this request. |
|
Boolean
isIntraperiod()
Returns |
<static>
|
Boolean
isValidRequestType(String requestType)
Checks if |
|
String
serialize()
Returns the serialised representation of the |
►
caplin.chart.series.SeriesRequest(Map config)
Constructs a new caplin.chart.series.SeriesRequest
.
Configuration should contain the following fields:
name | required | default | description |
---|---|---|---|
instrument | yes | The currency pair for which you wish to request chart series data | |
seriesType | no | Bid | Bid or Other depending on which series the chart is to render. |
interval | no | 1m | Tick interval. Possible values are configured on the backend. |
type | no | caplin.chart.series.SeriesRequest.REQUEST_HISTORIC | The type of data you wish to request (historic, real-time, both). |
begin | no | Only used if requesting historic data. Used to determine the beginning date of the data you wish to request. | |
end | no | Only used if requesting historic data. Used to determine the end date of the data you wish to request. | |
timeout | no | 3000 | Timeout (in milliseconds) for the request. |
intraperiod | no | false | If this is a real-time or combined request, this option controls whether to request intraperiod updates or to only request completed period updates. |
Map | config | The configuration properties for the request object. |
►
<static>
caplin.chart.series.SeriesRequest.REQUEST_BOTH
Request both historic and real-time chart series data.
►
<static>
caplin.chart.series.SeriesRequest.REQUEST_HISTORIC
Request historic chart series data.
►
<static>
caplin.chart.series.SeriesRequest.REQUEST_REALTIME
Request real-time chart series data.
►
<static>
Object
deserialize(Element xml)
Creates a new instance of caplin.chart.series.SeriesRequest based on the values in the serialised XML.
Element | xml | A XML element representing the state of the caplin.chart.series.SeriesRequest object. |
►
String
getBegin()
Returns the Unix time-stamp that indicates how far back historic data should be requested.
►
Number
getCreationTimestamp()
►
String
getDisplayName()
►
String
getEnd()
Returns the Unix time-stamp that indicates the point in time up until which historic data should be requested.
►
String
getId()
Returns the unique identifier for this request.
►
String
getInstrument()
Returns the instrument that this request relates to.
►
String
getInterval()
Returns the interval to be requested.
►
String
getSeriesType()
Returns the series type required for the request.
►
Number
getTimeout()
Returns the timeout (in milliseconds) for this request.
►
String
getType()
Returns the type of this request. Possible return values: caplin.chart.series.SeriesRequest.REQUEST_HISTORIC, caplin.chart.series.SeriesRequest.REQUEST_REALTIME or caplin.chart.series.SeriesRequest.REQUEST_BOTH.
►
Boolean
isIntraperiod()
Returns true
if this is a intraperiod request, false
otherwise..
►
<static>
Boolean
isValidRequestType(String requestType)
Checks if requestType
is valid. Valid request types are:
- caplin.chart.series.SeriesRequest.REQUEST_HISTORIC
- caplin.chart.series.SeriesRequest.REQUEST_REALTIME
- caplin.chart.series.SeriesRequest.REQUEST_BOTH
String | requestType | The request type to check. |
true
if the passed request type is valid, false
otherwise.
►
String
serialize()
Returns the serialised representation of the Request
object, which can be later used to recreate the
object (using caplin.chart.series.SeriesRequest.deserialize).