Giter Site home page Giter Site logo

jinzaizhichi / tradingview-web-socket Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 472647301/tradingview-web-socket

0.0 1.0 0.0 10.03 MB

The tradingView middle layer for Vue/React, supports https+websocket mode and websocket single mode

Home Page: http://test.byronzhu.com/tv-react

TypeScript 89.68% CSS 2.03% HTML 8.29%

tradingview-web-socket's Introduction

2022-08-03

-English | 简体中文 | 繁體中文

The main branch demo uses the version of tvadingview v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z), the charting_library file, please visit the official website of tradingview to get it, if you need to use or browse Old version, please switch branch to view. I will add comments to the datafeed when I am asked more questions. The official default datafeed is to obtain historical data through http, and then obtain real-time data through the polling http interface. If you do not need to use WebSocket to push data, it is recommended to directly refer to the official demo. After the application chart is successful, you can visit the official warehouse.

Flowchart

          graph LR
          start[React Render] --> input[Initialize the chart and WebSocket]
          input --> conditionA{Chart callback datafeed<Please read the datafeed file for the callback process>}
          conditionA -- WebSocket mode --> conditionC{Subscribe to historical and real-time data}
          conditionA -- WebSocket+Http mode --> conditionB{Request historical data and subscribe to real-time data}
          conditionC -- WebSocket mode --> printA[Process real-time data]
          conditionC -- WebSocket mode --> printC[Return the format data that meets the chart requirements to the chart#Please refer to the type definition of the getBar function]
          conditionB -- WebSocket+Http mode --> printB[Process real-time data]
          conditionB -- WebSocket+Http mode --> printC[Return the format data that meets the chart requirements to the chart#Please refer to the type definition of the getBar function]
          printA --> stop[Chart rendering data]
          printC --> stop
          printB --> stop

Example

react demo

Task list

  • add react demo
  • add vue demo:

Screenshot

tradingview-web-socket's People

Contributors

dependabot[bot] avatar 472647301 avatar zhb333 avatar sanyu1225 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.