Release v28.0.0 (from 1e591f07)
This commit is contained in:
147
charting_library/datafeed-api.d.ts
vendored
147
charting_library/datafeed-api.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
* @packageDocumentation
|
||||
* @module Datafeed
|
||||
*/
|
||||
// Generated by dts-bundle-generator v7.0.0
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
/**
|
||||
* This is the generic type useful for declaring a nominal type,
|
||||
@@ -78,7 +78,7 @@ export interface DOMLevel {
|
||||
}
|
||||
/**
|
||||
* Datafeed configuration data.
|
||||
* Pass the resulting array of properties as a parameter to {@link OnReadyCallback} of the [`onReady`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API.md#onready) method.
|
||||
* Pass the resulting array of properties as a parameter to {@link OnReadyCallback} of the [`onReady`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API#onready) method.
|
||||
*/
|
||||
export interface DatafeedConfiguration {
|
||||
/**
|
||||
@@ -88,8 +88,8 @@ export interface DatafeedConfiguration {
|
||||
*/
|
||||
exchanges?: Exchange[];
|
||||
/**
|
||||
* List of [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md) that the chart should support.
|
||||
* Each item of the array is expected to be a string that has a specific [format](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-format).
|
||||
* List of [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution) that the chart should support.
|
||||
* Each item of the array is expected to be a string that has a specific [format](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-format).
|
||||
* If you set this property to `undefined` or an empty array, the _Resolution_ drop-down menu displays the list of resolutions available for
|
||||
* the current symbol ({@link LibrarySymbolInfo.supported_resolutions}).
|
||||
*
|
||||
@@ -134,7 +134,7 @@ export interface DatafeedConfiguration {
|
||||
*/
|
||||
symbols_types?: DatafeedSymbolType[];
|
||||
/**
|
||||
* Set it if you want to group symbols in the [Symbol Search](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search.md).
|
||||
* Set it if you want to group symbols in the [Symbol Search](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search).
|
||||
* Represents an object where keys are symbol types {@link SymbolType} and values are regular expressions (each regular expression should divide an instrument name into 2 parts: a root and an expiration).
|
||||
*
|
||||
* Sample:
|
||||
@@ -145,23 +145,40 @@ export interface DatafeedConfiguration {
|
||||
* }
|
||||
* ```
|
||||
* It will be applied to the instruments with futures and stock as a type.
|
||||
* Refer to [Symbol grouping](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search.md#symbol-grouping) for more information.
|
||||
* Refer to [Symbol grouping](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search#symbol-grouping) for more information.
|
||||
*/
|
||||
symbols_grouping?: Record<string, string>;
|
||||
}
|
||||
/** Symbol Quote Data Value */
|
||||
/**
|
||||
* This object contains symbol quote values, where a quote represents a set of data describing the current price.
|
||||
* The library uses quote data for various trading functionalities, including the [Order Ticket](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket), [Legend](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend),
|
||||
* and widgets, such as [Watchlist](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List), [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details),
|
||||
* [News](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/news/), and [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#depth-of-market).
|
||||
*
|
||||
* While all properties in this object are marked as optional, populating most of them is required for supporting trading functionalities.
|
||||
* See property descriptions for more information.
|
||||
*/
|
||||
export interface DatafeedQuoteValues {
|
||||
/** Price change (usually counts as an open price on a particular day) */
|
||||
/**
|
||||
* Price change (usually counts as an open price on a particular day).
|
||||
* Required for mobile apps. Otherwise, `NaN` values will appear in the [Legend](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend).
|
||||
*/
|
||||
ch?: number;
|
||||
/** Price change percentage */
|
||||
/**
|
||||
* Price change percentage.
|
||||
* Required for mobile apps. Otherwise, `NaN` values will appear in the [Legend](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend).
|
||||
*/
|
||||
chp?: number;
|
||||
/** Short name for the symbol */
|
||||
/** Short name for a symbol. Short name is used in the title for the [News](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/news/) widget. */
|
||||
short_name?: string;
|
||||
/** The name of the exchange */
|
||||
exchange?: string;
|
||||
/** A short description of the symbol */
|
||||
/** A short description of the symbol. This description is displayed in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget and the tooltip of the [Watchlist](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List) widget. */
|
||||
description?: string;
|
||||
/** Last traded price */
|
||||
/**
|
||||
* The price at which the most recent trade of a security occurred, regardless of whether it was a buy or sell.
|
||||
* Required for the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) and [Watchlist](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List) widgets.
|
||||
*/
|
||||
lp?: number;
|
||||
/** Ask price */
|
||||
ask?: number;
|
||||
@@ -175,7 +192,10 @@ export interface DatafeedQuoteValues {
|
||||
high_price?: number;
|
||||
/** Today's low price */
|
||||
low_price?: number;
|
||||
/** Yesterday's closing price */
|
||||
/**
|
||||
* Yesterday's closing price.
|
||||
* Required for mobile apps. Otherwise, `NaN` values will appear in the [Legend](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend).
|
||||
*/
|
||||
prev_close_price?: number;
|
||||
/** Today's trading volume */
|
||||
volume?: number;
|
||||
@@ -207,8 +227,11 @@ export interface HistoryMetadata {
|
||||
*/
|
||||
noData?: boolean;
|
||||
/**
|
||||
* Time of the next bar if there is no data in the requested period.
|
||||
* It should be set if the requested period represents a gap in the data. Hence there is available data prior to the requested period.
|
||||
* The time of the next available bar in history. The time value should be represented with a Unix timestamp in milliseconds.
|
||||
*
|
||||
* You can pass the `nextTime` value to the library if there is no data in the time range that the library requests.
|
||||
* Therefore, you notify the library about available data before the requested range and ensure that the next data request is for the right range.
|
||||
* For more information, refer to the [How nextTime works](https://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF#how-nexttime-works) section.
|
||||
*/
|
||||
nextTime?: number | null;
|
||||
}
|
||||
@@ -247,7 +270,7 @@ export interface IDatafeedChartApi {
|
||||
* The time is provided without milliseconds. Example: `1445324591`.
|
||||
*
|
||||
* `getServerTime` is used to display countdown on the price scale.
|
||||
* Note that the countdown can be displayed only for [intraday](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-in-minutes-intraday) resolutions.
|
||||
* Note that the countdown can be displayed only for [intraday](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-in-minutes-intraday) resolutions.
|
||||
*/
|
||||
getServerTime?(callback: ServerTimeCallback): void;
|
||||
/**
|
||||
@@ -267,7 +290,7 @@ export interface IDatafeedChartApi {
|
||||
* @param onError Callback function whose only argument is a text error message
|
||||
* @param extension An optional object with additional parameters
|
||||
*/
|
||||
resolveSymbol(symbolName: string, onResolve: ResolveCallback, onError: ErrorCallback, extension?: SymbolResolveExtension): void;
|
||||
resolveSymbol(symbolName: string, onResolve: ResolveCallback, onError: DatafeedErrorCallback, extension?: SymbolResolveExtension): void;
|
||||
/**
|
||||
* This function is called when the chart needs a history fragment defined by dates range.
|
||||
*
|
||||
@@ -277,7 +300,7 @@ export interface IDatafeedChartApi {
|
||||
* @param onResult Callback function for historical data
|
||||
* @param onError Callback function whose only argument is a text error message
|
||||
*/
|
||||
getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, periodParams: PeriodParams, onResult: HistoryCallback, onError: ErrorCallback): void;
|
||||
getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, periodParams: PeriodParams, onResult: HistoryCallback, onError: DatafeedErrorCallback): void;
|
||||
/**
|
||||
* The library calls this function when it wants to receive real-time updates for a symbol.
|
||||
* The library assumes that you will call the callback provided by the `onTick` parameter every time you want to update the most recent bar or to add a new one.
|
||||
@@ -296,16 +319,16 @@ export interface IDatafeedChartApi {
|
||||
*/
|
||||
unsubscribeBars(listenerGuid: string): void;
|
||||
/**
|
||||
* Trading Platform calls this function when it wants to receive real-time level 2 (DOM) for a symbol.
|
||||
* The library calls this function when it wants to receive real-time symbol data in the [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/depth-of-market) (DOM) widget.
|
||||
* Note that you should set the {@link BrokerConfigFlags.supportLevel2Data} configuration flag to `true`.
|
||||
*
|
||||
* @param symbol A SymbolInfo object
|
||||
* @param callback Function returning an object to update Depth Of Market (DOM) data
|
||||
* @param callback A function returning an object to update DOM data
|
||||
* @returns A unique identifier that will be used to unsubscribe from the data
|
||||
*/
|
||||
subscribeDepth?(symbol: string, callback: DOMCallback): string;
|
||||
/**
|
||||
* Trading Platform calls this function when it doesn't want to receive updates for this listener anymore.
|
||||
* The library calls this function to stop receiving real-time updates for the [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/depth-of-market) listener.
|
||||
* Note that you should set the {@link BrokerConfigFlags.supportLevel2Data} configuration flag to `true`.
|
||||
*
|
||||
* @param subscriberUID A string returned by `subscribeDepth`
|
||||
@@ -391,7 +414,7 @@ export interface LibrarySymbolInfo {
|
||||
* Note that it should not contain the exchange name.
|
||||
* This symbol name is visible to users and can be repeated.
|
||||
*
|
||||
* By default, `name` is used to resolve symbols in the [Datafeed API](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API.md).
|
||||
* By default, `name` is used to resolve symbols in the [Datafeed API](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API).
|
||||
* If you use {@link LibrarySymbolInfo.ticker}, the library will use the ticker for Datafeed API requests.
|
||||
*/
|
||||
name: string;
|
||||
@@ -403,7 +426,7 @@ export interface LibrarySymbolInfo {
|
||||
string
|
||||
];
|
||||
/**
|
||||
* It is an unique identifier for a particular symbol in your [symbology](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md).
|
||||
* It is an unique identifier for a particular symbol in your [symbology](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology).
|
||||
* If you specify this property, its value will be used for all data requests for this symbol.
|
||||
* `ticker` will be treated the same as {@link LibrarySymbolInfo.name} if not specified explicitly.
|
||||
* Note that it should not contain the exchange name.
|
||||
@@ -426,7 +449,7 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Trading hours for this symbol. See the [Trading sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Trading-Sessions.md) article to learn more details.
|
||||
* Trading hours for the symbol. The time should be in the **exchange** time zone specified in the {@link LibrarySymbolInfo.timezone} property. Refer to the [Trading sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Trading-Sessions) article for more information.
|
||||
* @example "1700-0200"
|
||||
*/
|
||||
session: string;
|
||||
@@ -446,7 +469,7 @@ export interface LibrarySymbolInfo {
|
||||
/**
|
||||
* List of corrections for a symbol. The corrections are days when the trading session differs from the default one set in {@link LibrarySymbolInfo.session}.
|
||||
* The `corrections` value is a string in the following format: `SESSION:YYYYMMDD`.
|
||||
* For more information, refer to [corrections](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#corrections).
|
||||
* For more information, refer to [corrections](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#corrections).
|
||||
*
|
||||
* The string below specifies corrections for two trading days:
|
||||
*
|
||||
@@ -471,25 +494,34 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
listed_exchange: string;
|
||||
/**
|
||||
* Time zone of the exchange for this symbol. We expect to get the name of the time zone in `olsondb` format.
|
||||
* See [Time zones](https://www.tradingview.com/charting-library-docs/latest/ui_elements/timezones.md) for a full list of supported time zones.
|
||||
* The time zone of the **exchange** where the symbol is listed. The time zone value should be in the OlsonDB format.
|
||||
* Refer to [Time zones](https://www.tradingview.com/charting-library-docs/latest/ui_elements/timezones) for a full list of supported time zones.
|
||||
*/
|
||||
timezone: Timezone;
|
||||
/**
|
||||
* Format of displaying labels on the price scale:
|
||||
*
|
||||
* `price` - formats decimal or fractional numbers based on `minmov`, `pricescale`, `minmove2`, `fractional` and `variableMinTick` values. See [Price format](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#price-format) for more details.
|
||||
* `price` - formats decimal or fractional numbers based on `minmov`, `pricescale`, `minmove2`, `fractional` and `variableMinTick` values. See [Price format](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#price-format) for more details.
|
||||
* `volume` - formats decimal numbers in thousands, millions, billions or trillions
|
||||
*/
|
||||
format: SeriesFormat;
|
||||
/**
|
||||
* Code (Tick)
|
||||
* @example 8/16/.../256 (1/8/100 1/16/100 ... 1/256/100) or 1/10/.../10000000 (1 0.1 ... 0.0000001)
|
||||
* A number of decimal places or fractions that the price has.
|
||||
*
|
||||
* The `pricescale` value depends on the [price format](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#price-format).
|
||||
* If you want to display the price in the decimal format, `pricescale` should be `10^n`, where `n` is the number of decimal places.
|
||||
* **Examples:** `1`, `10`, `10000000`.
|
||||
*
|
||||
* If you want to display the price in the fractional format, `pricescale` should be `2^n`.
|
||||
* This value represents the number of fractions.
|
||||
* **Examples:** `8`, `16`, `256`.
|
||||
*/
|
||||
pricescale: number;
|
||||
/**
|
||||
* The number of units that make up one tick.
|
||||
* @example For example, U.S. equities are quotes in decimals, and tick in decimals, and can go up +/- .01. So the tick increment is 1. But the e-mini S&P futures contract, though quoted in decimals, goes up in .25 increments, so the tick increment is 25. (see also Tick Size)
|
||||
* For example, U.S. equities are quotes in decimals, and tick in decimals, and can go up +/- `.01`.
|
||||
* Therefore, the tick increment is 1 and `minmov = 1`. But the e-mini S&P futures contract, though quoted in decimals, goes up in `.25` increments, so the tick increment is 25 and `minmov = 25`.
|
||||
* Refer to [Price format](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#price-format) for more information.
|
||||
*/
|
||||
minmov: number;
|
||||
/**
|
||||
@@ -520,8 +552,10 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
fractional?: boolean;
|
||||
/**
|
||||
* For common prices this can be skipped.
|
||||
* @example Quarters of 1/32: pricescale=128, minmovement=1, minmovement2=4
|
||||
* This property is used to display prices in the [fraction of a fraction](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#fraction-of-a-fraction-format) format.
|
||||
* For example, the ZBM2023 tick size is 1/4 of a 32nd. To display this security, set `minmov = 1`, `pricescale = 128`, `minmove2 = 4`.
|
||||
*
|
||||
* For common prices, `minmove2` can be skipped or set to `0`.
|
||||
*/
|
||||
minmove2?: number;
|
||||
/**
|
||||
@@ -543,8 +577,8 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
has_intraday?: boolean;
|
||||
/**
|
||||
* An array of [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md) which should be enabled in the _Resolution_ drop-down menu for this symbol.
|
||||
* Each item of the array is expected to be a string that has a specific [format](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-format).
|
||||
* An array of [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution) which should be enabled in the _Resolution_ drop-down menu for this symbol.
|
||||
* Each item of the array is expected to be a string that has a specific [format](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-format).
|
||||
*
|
||||
* If one changes the symbol and the new symbol does not support the selected resolution, the resolution will be switched to the first available one in the list.
|
||||
*
|
||||
@@ -562,7 +596,7 @@ export interface LibrarySymbolInfo {
|
||||
*
|
||||
* Note that the list of available time frames depends on supported resolutions.
|
||||
* Time frames that require resolutions that are unavailable for a particular symbol will be hidden.
|
||||
* Refer to [Time frame toolbar](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Time-Scale.md#time-frame-toolbar) for more information.
|
||||
* Refer to [Time frame toolbar](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Time-Scale#time-frame-toolbar) for more information.
|
||||
*/
|
||||
supported_resolutions?: ResolutionString[];
|
||||
/**
|
||||
@@ -610,7 +644,7 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
has_daily?: boolean;
|
||||
/**
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-format) (in days - without the suffix) supported by the datafeed. {@link ResolutionString}
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-format) (in days - without the suffix) supported by the datafeed. {@link ResolutionString}
|
||||
*
|
||||
* For example it could be something like
|
||||
*
|
||||
@@ -630,7 +664,7 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
has_weekly_and_monthly?: boolean;
|
||||
/**
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-in-weeks--months) (in weeks - without the suffix) supported by the data feed. {@link ResolutionString}
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-in-weeks--months) (in weeks - without the suffix) supported by the data feed. {@link ResolutionString}
|
||||
*
|
||||
* For example it could be something like
|
||||
*
|
||||
@@ -641,7 +675,7 @@ export interface LibrarySymbolInfo {
|
||||
*/
|
||||
weekly_multipliers?: string[];
|
||||
/**
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution.md#resolution-in-weeks--months) (in months - without the suffix) supported by the data feed. {@link ResolutionString}
|
||||
* Array (of strings) containing the [resolutions](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Resolution#resolution-in-weeks--months) (in months - without the suffix) supported by the data feed. {@link ResolutionString}
|
||||
*
|
||||
* For example it could be something like
|
||||
*
|
||||
@@ -678,8 +712,8 @@ export interface LibrarySymbolInfo {
|
||||
volume_precision?: number;
|
||||
/**
|
||||
* The status code of a series with this symbol.
|
||||
* For `delayed_streaming` and `endofday` type of data, the status is displayed as an icon and the *Data is delayed* section in the [_Legend_](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend.md#display-delayed-data-information), next to the market status icon.
|
||||
* Note that you should also enable the [`display_data_mode`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets.md#display_data_mode) featureset.
|
||||
* For `delayed_streaming` and `endofday` type of data, the status is displayed as an icon and the *Data is delayed* section in the [_Legend_](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Legend#display-delayed-data-information), next to the market status icon.
|
||||
* Note that you should also enable the [`display_data_mode`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#display_data_mode) featureset.
|
||||
*
|
||||
* When declaring `delayed_streaming` you also have to specify its {@link LibrarySymbolInfo.delay} in seconds.
|
||||
*/
|
||||
@@ -701,13 +735,13 @@ export interface LibrarySymbolInfo {
|
||||
* The library will request data for this symbol starting from that time point.
|
||||
*/
|
||||
expiration_date?: number;
|
||||
/** Sector for stocks to be displayed in the Symbol Info. */
|
||||
/** Sector for stocks to be displayed in the Security Info. */
|
||||
sector?: string;
|
||||
/** Industry for stocks to be displayed in the Symbol Info. */
|
||||
/** Industry for stocks to be displayed in the Security Info. */
|
||||
industry?: string;
|
||||
/**
|
||||
* The currency in which the instrument is traded or some other currency if currency conversion is enabled.
|
||||
* It is displayed in the Symbol Info dialog and on the price axes.
|
||||
* It is displayed in the Security Info dialog and on the price axes.
|
||||
*/
|
||||
currency_code?: string;
|
||||
/** The currency in which the instrument is traded. */
|
||||
@@ -727,18 +761,18 @@ export interface LibrarySymbolInfo {
|
||||
unit_conversion_types?: string[];
|
||||
/**
|
||||
* An ID of a subsession specified in {@link subsessions}. The value must match the subsession that is currently displayed on the chart.
|
||||
* For more information, refer to the [Extended sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#extended-sessions) section.
|
||||
* For more information, refer to the [Extended sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#extended-sessions) section.
|
||||
*/
|
||||
subsession_id?: string;
|
||||
/**
|
||||
* An array of objects that contain information about certain subsessions within the extended session.
|
||||
* For more information, refer to the [Extended sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology.md#extended-sessions) section.
|
||||
* For more information, refer to the [Extended sessions](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Symbology#extended-sessions) section.
|
||||
*/
|
||||
subsessions?: LibrarySubsessionInfo[];
|
||||
/**
|
||||
* Optional ID of a price source for a symbol. Should match one of the price sources from the {@link price_sources} array.
|
||||
*
|
||||
* Note that you should set the [`symbol_info_price_source`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets.md#symbol_info_price_source) featureset to `true` to display the symbol price source in the main series legend.
|
||||
* Note that you should set the [`symbol_info_price_source`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#symbol_info_price_source) featureset to `true` to display the symbol price source in the main series legend.
|
||||
*/
|
||||
price_source_id?: string;
|
||||
/**
|
||||
@@ -747,7 +781,7 @@ export interface LibrarySymbolInfo {
|
||||
* Example price sources: "Spot Price", "Ask", "Bid", etc.
|
||||
* The price source information is valuable when viewing non-OHLC series types.
|
||||
*
|
||||
* Note that you should set the [`symbol_info_price_source`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets.md#symbol_info_price_source) featureset to `true` to display the symbol price source in the main series legend.
|
||||
* Note that you should set the [`symbol_info_price_source`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#symbol_info_price_source) featureset to `true` to display the symbol price source in the main series legend.
|
||||
* @example [{ id: '1', name: 'Spot Price' }, { id: '321', name: 'Bid' }]
|
||||
*/
|
||||
price_sources?: SymbolInfoPriceSource[];
|
||||
@@ -787,6 +821,14 @@ export interface LibrarySymbolInfo {
|
||||
* - `data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4...`
|
||||
*/
|
||||
exchange_logo?: string;
|
||||
/**
|
||||
* Additional metadata to include with the symbol information.
|
||||
* These parameters will not affect existing properties such as 'ticker' or 'name'
|
||||
* and will not be processed by the library. However, they can be accessed later
|
||||
* through the {@link IChartWidgetApi.symbolExt} method, impacting existing
|
||||
* properties such as 'ticker' or 'name'.
|
||||
*/
|
||||
library_custom_fields?: Record<string, unknown>;
|
||||
}
|
||||
export interface Mark {
|
||||
/** ID of the mark */
|
||||
@@ -889,7 +931,6 @@ export interface QuoteOkData extends QuoteDataResponse {
|
||||
* {
|
||||
* description: 'Apple Inc.',
|
||||
* exchange: 'NasdaqNM',
|
||||
* full_name: 'NasdaqNM:AAPL',
|
||||
* symbol: 'AAPL',
|
||||
* ticker: 'AAPL',
|
||||
* type: 'stock',
|
||||
@@ -899,8 +940,6 @@ export interface QuoteOkData extends QuoteDataResponse {
|
||||
export interface SearchSymbolResultItem {
|
||||
/** Short symbol name */
|
||||
symbol: string;
|
||||
/** Full symbol name */
|
||||
full_name: string;
|
||||
/** Description */
|
||||
description: string;
|
||||
/** Exchange name */
|
||||
@@ -961,7 +1000,7 @@ export interface SymbolResolveExtension {
|
||||
/**
|
||||
* Indicates the currency for conversions if `currency_codes` configuration field is set,
|
||||
* and `currency_code` is provided in the original symbol information ({@link LibrarySymbolInfo}).
|
||||
* Read more about [currency conversion](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Price-Scale.md#currency-conversion).
|
||||
* Read more about [currency conversion](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Price-Scale#currency-conversion).
|
||||
*/
|
||||
currencyCode?: string;
|
||||
/**
|
||||
@@ -1024,9 +1063,9 @@ export interface Unit {
|
||||
/** Description */
|
||||
description: string;
|
||||
}
|
||||
export type CustomTimezones = "Africa/Cairo" | "Africa/Casablanca" | "Africa/Johannesburg" | "Africa/Lagos" | "Africa/Nairobi" | "Africa/Tunis" | "America/Anchorage" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/El_Salvador" | "America/Juneau" | "America/Lima" | "America/Los_Angeles" | "America/Mexico_City" | "America/New_York" | "America/Phoenix" | "America/Santiago" | "America/Sao_Paulo" | "America/Toronto" | "America/Vancouver" | "Asia/Almaty" | "Asia/Ashkhabad" | "Asia/Bahrain" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Dubai" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Kuwait" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Yangon" | "Atlantic/Reykjavik" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Lisbon" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Warsaw" | "Europe/Zurich" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Honolulu" | "Pacific/Norfolk" | "US/Mountain";
|
||||
export type CustomTimezones = "Africa/Cairo" | "Africa/Casablanca" | "Africa/Johannesburg" | "Africa/Lagos" | "Africa/Nairobi" | "Africa/Tunis" | "America/Anchorage" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/El_Salvador" | "America/Juneau" | "America/Lima" | "America/Los_Angeles" | "America/Mexico_City" | "America/New_York" | "America/Phoenix" | "America/Santiago" | "America/Sao_Paulo" | "America/Toronto" | "America/Vancouver" | "Asia/Almaty" | "Asia/Ashkhabad" | "Asia/Bahrain" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Dubai" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Yangon" | "Atlantic/Reykjavik" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Lisbon" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Warsaw" | "Europe/Zurich" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Honolulu" | "Pacific/Norfolk" | "US/Mountain";
|
||||
export type DOMCallback = (data: DOMData) => void;
|
||||
export type ErrorCallback = (reason: string) => void;
|
||||
export type DatafeedErrorCallback = (reason: string) => void;
|
||||
export type GetMarksCallback<T> = (marks: T[]) => void;
|
||||
export type HistoryCallback = (bars: Bar[], meta?: HistoryMetadata) => void;
|
||||
export type LibrarySessionId = "regular" | "extended" | "premarket" | "postmarket";
|
||||
|
||||
Reference in New Issue
Block a user