Skip to main content
Version: 2.0

Chart

A context type representing details of a Chart, which may be used to request plotting of a particular chart or to otherwise share details of its composition, such as:

  • A list of instruments for comparison
  • The time period to plot the chart over
  • The style of chart (line, bar, mountain, candle etc.)
  • Other settings such as indicators to calculate, or data representing drawings and annotations

In addition to handling requests to plot charts, a charting application may use this type to output a representation of what it is currently displaying so that it can be recorded by another application.

Type

fdc3.chart

Schema

https://fdc3.finos.org/schemas/2.0/chart.schema.json

Details

danger

The fdc3.timeRange context type is inconsistently used in FDC3 2.0, occasionally appearing as fdc3.timerange. This has been corrected in FDC3 2.1 to always use the camel case form fdc3.timeRange.

PropertyTypeRequiredExample Value
typestringYes'fdc3.chart'
instrumentsInstrument[]Yes
[
{
"type": "fdc3.instrument",
"id": {
"ticker": "AAPL"
}
},
{
"type": "fdc3.instrument",
"id": {
"ticker": "MSFT"
}
}
]
rangeTimeRangeNo
{
"type": "fdc3.timeRange",
"startTime": "2022-03-30T15:44:44+00:00",
"endTime": "2022-04-30T23:59:59+00:00"
}
stylestringNoone of: 'line', 'bar', 'stacked-bar', 'mountain', 'candle', 'pie', 'scatter', 'histogram', 'heatmap', 'custom'
otherConfig*objectNo{ /* unstandardized additional config */}

* It is common for charts to support other configuration, such as indicators, annotations etc., which do not have standarized formats, but may be included in the otherConfig element.

Example

const chart = {
type: "fdc3.chart",
instruments: [
{
type: "fdc3.instrument",
id: {
ticker: "AAPL"
}
},
{
type: "fdc3.instrument",
id: {
ticker: "GOOG"
}
}
],
range: {
type: "fdc3.timeRange",
startTime: "2020-09-01T08:00:00.000Z",
endTime: "2020-10-31T08:00:00.000Z"
},
style: "line",
otherConfig: {
indicators: [
{
name: "ma",
parameters: {
period: 14,
type: "ema"
}
},
{
name: "volume"
}
]
}
};

fdc3.raiseIntent("ViewChart", chart);

See Also

Other Types

Intents