简体   繁体   English

从交易视图获取图表图片

[英]Getting chart pictures from tradingview

Is there any way to use node.js or a backend service to get a picture of a chart from tradingview ? 有没有办法使用node.js或后端服务从交易视图获取图表的图片? The tradingview API that is provided does not provide any options for this. 提供的交易视图API不提供任何选项。

  1. You need to create backend services to serve serval endpoints. 您需要创建后端服务以提供serval端点。

  2. Use UDF - It's an HTTP-based protocol that is designed to deliver data to the Charting Library in a simple and efficient way. 使用UDF - 它是一种基于HTTP的协议,旨在以简单有效的方式将数据传递到图表库。

Services(APIs) endpoints which you need to create some of them are: 您需要创建其中一些端点的服务(API)端点是:

  1. Data feed configuration data URL - /config 数据馈送配置数据 URL - /config
  2. Symbol group request URL - GET /symbol_info?group=<group_name> 符号组请求 URL - GET /symbol_info?group=<group_name>
  3. Symbol resolve URL - GET /symbols?symbol=<symbol> 符号解析 URL - GET /symbols?symbol=<symbol>

For candle/bar data you have to create: URL - GET /history?symbol=<ticker_name>&from=<unix_timestamp>&to=<unix_timestamp>&resolution=<resolution> 对于蜡烛/条形数据,您必须创建:URL - GET /history?symbol=<ticker_name>&from=<unix_timestamp>&to=<unix_timestamp>&resolution=<resolution>

Refer: https://github.com/tradingview/charting_library/wiki/UDF 请参阅: https//github.com/tradingview/charting_library/wiki/UDF

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM