Skip to content

market.getChart() possibility #40

Answered by Mathieu2301
edzebo asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, it's currently not possible if you don't know the market symbol and indicators IDs.
But yes, we can imagine a getLayout(layoutID, sessionid = '') function to get the maket, the indicators, etc... (sessionid is only required for private layouts).

All this data can be fetched by getting source of https://www.tradingview.com/chart/${layoutID}/ and parsing the JSON from the following Regex expression result: /initData\.content = (.*);\n/i.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by edzebo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants