Extract price history if the data table/json is inside the tab

Hi all,

I’m trying to extract the “Price history” table or json at https://www.nepalstock.com.np/company/detail/2792. Could you extract it? Any help?

This site is a good example of why sometimes you just need to do a bit more googling.
Why? The page only delivers the desired data via POST request (which PP does not support) and also requires authorisation.


You could perhaps solve it by using a local proxy, but why bother when other options are available?
The data you can see at nepalstock.com is
Bildschirmfoto_2024-07-06_08-41-21

The same data you can GET at merolagani - Upper Tamakoshi Hydropower Ltd (UPPER) Detail, Announcements, News, Price History, Floorsheet
Bildschirmfoto_2024-07-06_08-57-12

Bildschirmfoto_2024-07-06_08-57-31

The URL for the jsondata is

https://merolagani.com/handlers/TechnicalChartHandler.ashx?type=get_advanced_chart&symbol=UPPER&resolution=1D&rangeStartDate=1686032652&rangeEndDate=1720247112&from=&isAdjust=1&currencyCode=NPR

the part

rangeStartDate=1686032652&rangeEndDate=1720247112

should be influenced by the PP time macros, maybe

rangeStartDate={TODAY:unixtime:-P3M}&rangeEndDate={TODAY:unixtime}

(you can use {TODAY:unixtime:-P5Y} once and change then to -P3M)

https://merolagani.com/handlers/TechnicalChartHandler.ashx?type=get_advanced_chart&symbol=UPPER&resolution=1D&rangeStartDate={TODAY:unixtime:-P3M}&rangeEndDate={TODAY:unixtime}&from=&isAdjust=1&currencyCode=NPR
$.t[*]
$.c[*]

HTH

3 Likes

Great! Thanks :blush: