-
Notifications
You must be signed in to change notification settings - Fork 36
How To Connect My Data
The Charting Library does NOT include market data. You must provide your own data in the required format. A sample data engine integrates Yahoo Finance API historical data. The charts can receive data in two ways:
-
Update in real-time with a PUSH type connection, for example through WebSocket. This way your charts will autoupdate with new prices when they arrive. To achieve this, you have to use the JavaScript API and have your own transport method ready.
-
Update on a PULL/pulse/refresh basis (like most web-based charts today), where the chart data is updating every X number of seconds (the chart client will ask the server emulating PUSH updates), or only get reloaded manually by the user. For this, use the UDF protocol and write your own datafeed wrapper.

-
If you already have a data transport ready (websocket streaming, polling, or any other transport), or if you don’t but need streaming data - use our JavaScript API, which is extremely compact and simple to implement. You will have to create a small client-side data adapter between your data transport and our charts using JavaScript.
-
If you don’t have any transports and do not need streaming data (e.g., data pulsing is all you need), then you will have to create (or use) at least a thin server-side datafeed wrapper. You may use any language and technology for this purpose: it’s just necessary for your wrapper to support our data exchange protocol (we call it UDF) to be able to feed your Charting Library with data. You will have to create a small server-side data adapter between your back-end and our charts using you favorite language.
A sample implementation of UDF-compatible (case #2 described below) server-side wrapper is available on github. It uses Yahoo! data.
A sample of JS API implementation (and UDF client-side at the same time) is a part of Charting Library package (see datafeed.js file).
If you use Ruby on Rails you can see the gem for Charting Library kindly provided by our user bobstar6 here.
#Wiki Content
- What is Charting Library
- Getting Started
- Package Content
- Running Your Charting Library
- Data Binding
- How To Connect My Data
- JS API
- UDF
- Symbology
- Trading Sessions
- Quotes
- Chart Customization
- Charts Customization 101
- Client-Side Customization 1. Widget Constructor 2. Widget Methods 3. Chart Methods 4. Featuresets
- Server-Side Customization
- Trading Platform
- Brief Intro
- Trading Controller
- Saving/Loading Charts
- Creating Custom Studies
- Best Practices
- Breaking changes in versions
