Release v29.1.0 (from 7030c9d4b37f307467b71dc4c4029989ac015d31)

This commit is contained in:
jenkins
2025-03-10 18:27:36 +00:00
parent a40415346e
commit f3f6d9a943
1030 changed files with 4181 additions and 3436 deletions

View File

@@ -712,7 +712,7 @@ export interface AccountManagerColumnBase<TFormatterName extends StandardFormatt
* If no specific formatter is set, the value is displayed as is.
*
* Default formatter names are enumerated in {@link StandardFormatterName}.
* Refer to the [Default formatters](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#default-formatters) section to see the full list of formatters.
* Refer to the [Built-in formatters](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/account-manager/value-formatters#built-in-formatters) section to see the full list of formatters.
*
* You can also create custom formatters using the {@link AccountManagerInfo.customFormatters} property.
*/
@@ -2214,7 +2214,7 @@ export interface BrokerConfigFlags {
*/
supportSymbolSearch?: boolean;
/**
* Allows modifying existing [order duration](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#set-order-duration).
* Allows modifying existing [order duration](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#enable-time-in-force-menu).
* @default false
*/
supportModifyDuration?: boolean;
@@ -2376,7 +2376,7 @@ export interface BrokerConfigFlags {
}
export interface BrokerCustomUI {
/**
* Shows standard Order Ticket to create or modify an order and executes handler if Buy/Sell/Modify is pressed.
* Shows Order Ticket to create or modify an order and executes handler if Buy/Sell/Modify is pressed.
* @param {OrderTemplate|Order} order - order to be placed or modified
* @param {OrderTicketFocusControl} [focus] - Control to focus on when dialog is opened
*/
@@ -6282,12 +6282,13 @@ export interface DatafeedConfiguration {
symbols_grouping?: Record<string, string>;
}
/**
* This object contains symbol quote values, where a quote represents a set of data describing the current price.
* This object contains symbol quote values, where a [quote](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/quotes) 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.
* Providing values that do not match the expected data types can cause issues such as UI [loading delays](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-Issues#delays-in-trading-platform-ui-elements) or [missing data](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-Issues#quotes-are-not-displayed-or-refreshed).
* See property descriptions for more information.
*/
export interface DatafeedQuoteValues {
@@ -6310,26 +6311,26 @@ export interface DatafeedQuoteValues {
chp?: number;
/** 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), [Watchlist](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List) and [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widgets. You can disable the [`prefer_quote_short_name`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#prefer_quote_short_name) to use the {@link LibrarySymbolInfo.ticker} value instead. */
short_name?: string;
/** The name of the exchange */
/** The name of the exchange. The exchange name is displayed in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
exchange?: string;
/** 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;
/**
* 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.
* Required for the [Order Ticket](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket), [Depth of Market](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#depth-of-market), [Buy/Sell buttons](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#buysell-buttons-and-lines), and [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 price the lowest price a seller is willing to accept for a security. The value is displayed in the [Order Ticket](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) and [Buy/Sell buttons](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#buysell-buttons-and-lines). */
ask?: number;
/** Bid price */
/** Bid price the highest price a buyer is willing to pay for a security. The value is displayed in the [Order Ticket](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket) and [Buy/Sell buttons](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#buysell-buttons-and-lines). */
bid?: number;
/** Spread (difference between the ask and bid prices) */
/** Spread the difference between the ask and bid prices. The value is displayed between [Buy/Sell buttons](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#buysell-buttons-and-lines). */
spread?: number;
/** Today's opening price */
open_price?: number;
/** Today's high price */
/** Today's high price. The value is displayed in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
high_price?: number;
/** Today's low price */
/** Today's low price. The value is displayed in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
low_price?: number;
/**
* Closing price of the symbol from the previous regular market session.
@@ -6337,10 +6338,18 @@ export interface DatafeedQuoteValues {
* 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 */
/** Today's trading volume. This value is displayed in the [Watchlist](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List) widget. */
volume?: number;
/** Original name */
original_name?: string;
/** Pre-/post-market price. This value is used for the pre-/post-market price line and in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
rtc?: number;
/** Pre-/post-market price update time. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
rtc_time?: number;
/** Pre-/post-market change. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
rch?: number;
/** Pre-/post-market change percent. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
rchp?: number;
[valueName: string]: string | number | string[] | number[] | undefined;
}
export interface DatafeedSymbolType {
@@ -10460,11 +10469,11 @@ export interface IChartWidgetApi {
* widget.activeChart().setVisibleRange(
* { from: 1420156800, to: 1451433600 },
* { percentRightMargin: 20 }
* ).then(() => console.log('New visible range is applied'));
* )
* ```
* @param range A range that will be made visible.
* @param options Optional object of options for the new visible range.
* @returns A promise that is resolved when the range has been set.
* @returns A promise that resolves when the visible range is set.
*/
setVisibleRange(range: SetVisibleTimeRange, options?: SetVisibleRangeOptions): Promise<void>;
/**
@@ -10479,7 +10488,7 @@ export interface IChartWidgetApi {
*
* @param symbol A symbol.
* @param options Optional object of options for the new symbol or optional callback that is called when the data for the new symbol has loaded.
* * @returns A promise that resolves with a boolean value. It's `true` when the symbol has been set and `false` when setting the symbol is not possible.
* @returns A promise that resolves with a boolean value. It's `true` when the symbol has been set and `false` when setting the symbol is not possible.
*/
setSymbol(symbol: string, options?: SetSymbolOptions | (() => void)): Promise<boolean>;
/**
@@ -10930,7 +10939,7 @@ export interface IChartWidgetApi {
*
* **Example**
* ```javascript
* const orderLine = widget.activeChart().createOrderLine();
* const orderLine = await widget.activeChart().createOrderLine();
* orderLine
* .setTooltip("Additional order information")
* .setModifyTooltip("Modify order")
@@ -11300,31 +11309,16 @@ export interface IChartingLibraryWidget {
*/
onGrayedObjectClicked(callback: (obj: GrayedObject) => void): void;
/**
* The library will call `callback` when the `shortCut` keys are input.
* This method specifies an action that happens when a user presses certain keys.
* It allows you to override the built&#8209;in shortcuts or specify custom ones.
*
* Use a string separated by '+' for shortcuts using an alphabet character (A to Z) with optional modifiers (ctrl, shift, alt).
* Use a number for shortcuts using non-alphabet character without modifiers.
* If you don't know the key code you need you can use resources like [keycode.info](https://keycode.info), or [MDN](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) to check.
* Use an array of literal key codes and modifier strings for shortcuts using non-alphabet characters with optional modifier strings.
* To do this, pass a keyboard shortcut and a callback function as parameters.
* The library invokes the callback when the `shortCut` keys are pressed.
*
* @param shortCut A number, a string, or an array of number and string.
* @param callback A function that will be called when the `shortCut` keys are input.
* @example
* ```javascript
* widget.onShortcut("alt+q", function() {
* widget.chart().executeActionById("symbolSearch");
* });
* Note that the `shortCut` argument depends on the key types. Refer to the [Manage shortcuts](https://www.tradingview.com/charting-library-docs/latest/getting_started/Shortcuts#manage-shortcuts) section for more information and examples.
*
* // F1
* widget.onShortcut(112, function() {
* widget.chart().executeActionById("symbolSearch");
* });
*
* // ctrl+shift+\
* widget.onShortcut(['ctrl', 'shift', 220], function() {
* widget.chart().executeActionById("symbolSearch");
* });
* ```
* @param shortCut A number, a string, or an array of numbers and strings.
* @param callback A function that is called when the `shortCut` keys are pressed.
*/
onShortcut(shortCut: string | number | (string | number)[], callback: EmptyCallback): void;
/**
@@ -11503,15 +11497,30 @@ export interface IChartingLibraryWidget {
* Create a button in the top toolbar. This should be called after {@link headerReady} has resolved.
* If the `title` option is provided then the title text will be shown in a tooltip on hover.
* If the `onClick` option is provided then the button will be clickable.
* @param options A optional object of options for the button.
* @param options A object of options for the button.
* @returns A `string` button id
*/
createButton(options?: CreateTradingViewStyledButtonOptions): void;
createButton(options: CreateTradingViewStyledButtonOptions): string;
/**
* Create a button in the top toolbar. This should be called after {@link headerReady} has resolved.
* @param options A optional object of options for the button.
* @returns A `HTMLElement` if the `useTradingViewStyle` option if `false`. `undefined` if `useTradingViewStyle` is `true`.
* @returns A `HTMLElement` if the `useTradingViewStyle` option is `false` or undefined. `string`(button id) if `useTradingViewStyle` is `true`.
*/
createButton(options?: CreateButtonOptions): HTMLElement | undefined;
createButton(options?: CreateButtonOptions): HTMLElement | string;
/**
* Remove a button from the top toolbar. This should be called after {@link headerReady} has resolved.
*
* **Example**
* ```javascript
* widget.headerReady().then(function() {
* var button = widget.createButton();
* widget.removeButton(button)
* });
* ```
*
* @param buttonIdOrHtmlElement The button link or id that you receive from createButton method.
*/
removeButton(buttonIdOrHtmlElement: HTMLElement | string): void;
/**
* Add a custom dropdown menu to the top toolbar.
*
@@ -16516,7 +16525,7 @@ export interface OrderDuration {
}
/**
* Order duration options that determine how long the order remains active.
* Refer to [Set order duration](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#set-order-duration) for more information.
* Refer to [Enable Time in force menu](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#enable-time-in-force-menu) for more information.
*/
export interface OrderDurationMetaInfo {
/** If it is set to `true`, then the Display date control in Order Ticket for this duration type will be displayed. */
@@ -19713,6 +19722,12 @@ export interface SetVisibleRangeOptions {
* Apply a percentage right offset (margin) when setting the range.
*/
percentRightMargin?: number;
/**
* In the current implementation, we cannot capture all errors during the `SetVisibleRange` process,
* which means we cannot guarantee that the process will always be resolved or rejected.
* To address this issue, you can use the `rejectByTimeout` option to ensure rejection after a specified timeout.
*/
rejectByTimeout?: number;
}
/**
* Override properties for the Signpost drawing tool.
@@ -19760,7 +19775,7 @@ export interface SingleBrokerMetaInfo {
/**
* List of order duration options that determine how long the order remains active.
* Specifying `durations` enables a drop-down menu in the Order Ticket for supported orders.
* Refer to [Set order duration](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#set-order-duration) for more information.
* Refer to [Enable Time in force menu](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/order-ticket#enable-time-in-force-menu) for more information.
*
* The objects have the following keys: `{ name, value, hasDatePicker?, hasTimePicker?, default?, supportedOrderTypes? }`.
*/
@@ -26556,6 +26571,18 @@ export interface SubscribeEventsMap {
* Drag end
*/
dragEnd: EmptyCallback;
/**
* Fired when the chart theme is updated. This event can be triggered in several ways:
* - When a user applies a saved [chart template](https://www.tradingview.com/charting-library-docs/latest/saving_loading/#chart-templates).
* - When the chart theme is reset to the default settings. (`isStandardTheme` parameter will be true)
* - When the {@link IChartingLibraryWidget.changeTheme} method is called.
* - When the {@link IChartWidgetApi.loadChartTemplate} method is called.
*
* @param {string} themeName - The name of the chart theme or template that was applied.
* @param {boolean} isStandardTheme - `true` if the default built-in theme was restored; `false`, if a custom chart template was applied.
* @param {boolean} onlyActiveChart - `false`, when applied to all charts
*/
chart_theme_changed: (themeName: string, isStandardTheme: boolean, onlyActiveChart: boolean) => void;
}
export interface SuccessFormatterParseResult<T> extends FormatterParseResult {
/** @inheritDoc */
@@ -26658,7 +26685,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#currency-conversion).
* Read more about [currency conversion](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Price-Scale#enable-currency-conversion).
*/
currencyCode?: string;
/**
@@ -29497,7 +29524,15 @@ export type TradingTerminalFeatureset = ChartingLibraryFeatureset |
*
* @default false
*/
"image_drawingtool";
"image_drawingtool" |
/**
* Enables the pre-/post-market price line.
*
* To enable the pre-/post-market lines, you need to provide {@link DatafeedQuoteValues.rtc} to the quote values.
*
* @default false
*/
"pre_post_market_price_line";
export type VisiblePlotsSet = "ohlcv" | "ohlc" | "c";
export type WatchListSymbolListAddedCallback = (listId: string, symbols: string[]) => void;
export type WatchListSymbolListChangedCallback = (listId: string) => void;