# charting-library-tutorial **Repository Path**: hnpei/charting-library-tutorial ## Basic Information - **Project Name**: charting-library-tutorial - **Description**: git clone https://github.com/tradingview/charting-library-tutorial.git git submodule update --init --recursive npx serve - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-11-25 - **Last Updated**: 2026-03-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Advanced Charts: Connecting data via the Datafeed API ## Overview This repository contains sample code for the [Datafeed API tutorial], which demonstrates how to implement real-time data streaming in [Advanced Charts]. As an example, the tutorial describes a connection via the free [CryptoCompare] API that provides data from different crypto exchanges. > [!NOTE] > Advanced Charts is a standalone client-side library that is used to display financial charts, prices, and technical analysis tools. > Learn more about Advanced Charts on the [TradingView website]. ## Prerequisites - The [Advanced Charts repository] is private. Refer to [Getting Access] for more information on how to get the library. - To use the [CryptoCompare] API, you should create an account and generate a free API key. For more information, refer to the [CryptoCompare documentation](https://www.cryptocompare.com/coins/guides/how-to-use-our-api/). ## How to run Take the following steps to run this project: 1. Clone the repository. Note that for the real project, it is better to use this repository as a submodule in yours. ```bash git clone https://github.com/tradingview/charting-library-tutorial.git ``` 2. Go to the repository folder and initialize the Git submodule with the library: ```bash git submodule update --init --recursive ``` Alternatively, you can download the [library repository] from a ZIP file or clone it using Git. 3. Run the following command to serve static files: ```bash npx serve ``` ## Release notes ### September, 2025 The latest version introduces several key improvements: - **Intraday resolutions**: Added support for minute and hour resolutions. - **SymbolInfo update**: Removed `full_name` from the `SymbolInfo` object. Now, `ticker` is used instead. - **Improved search**: `searchSymbols` now properly filters results by user input, selected exchange, and symbol type. - **Improved `getBars`**: `getBars` now selects the correct API endpoint based on the requested `resolution` (minute, hour, or day), ensuring the most appropriate data is used. - **Enhanced streaming**: Reworked streaming logic to support [multiple subscriptions] to data updates. [Advanced Charts]: https://www.tradingview.com/charting-library-docs/ [Datafeed API tutorial]: https://www.tradingview.com/charting-library-docs/latest/tutorials/implement_datafeed_tutorial/ [CryptoCompare]: https://www.cryptocompare.com/ [TradingView website]: https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/?feature=technical-analysis-charts [Advanced Charts repository]: https://github.com/tradingview/charting_library [Getting Access]: https://www.tradingview.com/charting-library-docs/latest/getting_started/quick-start#getting-access [multiple subscriptions]: https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/required-methods#multiple-subscriptions [library repository]: https://github.com/tradingview/charting_library 高级图表:通过数据feed API连接数据 概述 此仓库包含以下内容的示例代码: 数据源API教程,这展示了如何实现真正的-时间数据流正在输入 高级图表。 例如,教程描述了通过免费的连接方式 CryptoCompare 提供来自不同加密货币交易所数据的API。 注意 高级图表是一个独立客户端-用于显示金融图表、价格和技术分析工具的侧边库 了解更多关于高级图表的信息 TradingView 网站. 前提条件 的 高级图表库 是私人的。 参考 获取访问权限 有关如何获取库的更多信息。 要使用 CryptoCompare API,您应该创建一个帐户并生成一个免费的API密钥。有关更多信息,请参阅该文档 CryptoCompare 文档. 如何运行 按照以下步骤运行此项目: 克隆仓库。 请注意,在实际项目中,最好将此仓库作为子模块包含在你的仓库中。 git clone https://github.com/tradingview/charting-library-tutorial.git 前往仓库文件夹并用该库初始化 Git 子模块: git submodule update --init --recursive 或者,您可以下载该文件 图书馆仓库 从 ZIP 文件或使用 Git 克隆。 运行以下命令以提供静态文件: npx serve 发布说明 九月,2025 最新版本引入了多项关键改进: 盘中分辨率: 新增了对分钟和小时分辨率的支持。 SymbolInfo 更新: 已移除 full_name 从 SymbolInfo 物体。现在, ticker 被使用。 改进的搜索: searchSymbols 现在可以正确地根据用户输入、选定的交易所和符号类型筛选结果。 改进 getBars: getBars 现在根据请求选择正确的API端点 resolution (分钟、小时或天),确保使用最合适的数据。 增强的流式传输: 重新编写流媒体逻辑以支持 多个订阅 到数据更新。