Skip to main content
Version: v25

DatafeedConfiguration

Interface
Types Module: Datafeed

Properties

currency_codes

Optional

Supported currencies for currency conversion.

When a currency code is supplied as a string then the library will automatically convert it to { id: value, code: value } object.

Example

`["USD", "EUR", "GBP"]`

Example

`[{ id: "USD", code: "USD", description: "$" }, { id: "EUR", code: "EUR", description: "€" }]`

Type

(string | CurrencyItem)[]


exchanges

Optional

List of exchange descriptors. An empty array leads to an absence of the exchanges filter in the Symbol Search list. Use value='' if you wish to include all exchanges.

Type

Exchange[]


supported_resolutions

Optional

List of supported resolutions. Resolution string format is described here: ResolutionString Setting this property to undefined or an empty array will result in the resolution widget displaying the content.

Example

`["1", "15", "240", "D", "6M"]` will give you "1 minute, 15 minutes, 4 hours, 1 day, 6 months" in resolution widget.

Type

ResolutionString[]


supports_marks

Optional

Does the datafeed supports marks on bars (true), or not (false | undefined).

Type

boolean


supports_time

Optional

Set this one to true if your datafeed provides server time (unix time). It is used to adjust Countdown on the Price scale.

Type

boolean


supports_timescale_marks

Optional

Does the datafeed supports marks on the timescale (true), or not (false | undefined).

Type

boolean


symbols_grouping

Optional

Set it if you want to group symbols in the symbol search. Represents an object where keys are symbol types SymbolType and values are regular expressions (each regular expression should divide an instrument name into 2 parts: a root and an expiration).

Sample:

{
"futures": `/^(.+)([12]!|[FGHJKMNQUVXZ]\d{1,2})$/`,
"stock": `/^(.+)([12]!|[FGHJKMNQUVXZ]\d{1,2})$/`,
}

It will be applied to the instruments with futures and stock as a type.

Type

Record<string, string>


symbols_types

Optional

List of filter descriptors.

Setting this property to undefined or an empty array leads to the absence of filter types in Symbol Search list. Use value = '' if you wish to include all filter types. value within the descriptor will be passed as symbolType argument to IDatafeedChartApi.searchSymbols

Type

DatafeedSymbolType[]


units

Optional

Supported unit groups. Each group can have several unit objects.

Example

{
weight: [
{ id: 'kg', name: 'kg', description: 'Kilograms' },
{ id: 'lb', name: 'lb', description: 'Pounds'},
]
}

Type

Record<string, Unit[]>