DatafeedConfiguration
Datafeed configuration data.
Pass the resulting array of properties as a parameter to OnReadyCallback of the onReady
method.
Properties
currency_codes
OptionalSupported 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
OptionalList 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
OptionalList 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
supports_marks
OptionalDoes the datafeed supports marks on bars (true
), or not (false | undefined
).
Type
boolean
supports_time
OptionalSet 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
OptionalDoes the datafeed supports marks on the timescale (true
), or not (false | undefined
).
Type
boolean
symbols_grouping
OptionalSet 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. Refer to Symbol grouping for more information.
Type
Record<string, string>
symbols_types
OptionalList 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
units
OptionalSupported 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[]>