market.getChart() possibility #40
-
Hi, First of all, thank you very much for your work and for making this open-source utility. Now, onto the question. Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello, it's currently not possible if you don't know the market symbol and indicators IDs. All this data can be fetched by getting source of |
Beta Was this translation helpful? Give feedback.
-
Got it. Thank you. |
Beta Was this translation helpful? Give feedback.
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
.