Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to Wasron,jfgw,Rhyd6,eyeball08,Wondergirly, for Donating to support the site

Hargreaves Lansdown API access

Discussions regarding financial software
ArunC
Posts: 6
Joined: February 18th, 2023, 2:03 pm

Hargreaves Lansdown API access

#595280

Postby ArunC » June 15th, 2023, 6:53 am

Hi
Does anyone know if its possible to get API access to fund performance data at Hargreaves Lansdown - want to get daily data into my spreadsheet to monitor fund performance.
Cheers
Arun

kiloran
Lemon Quarter
Posts: 4112
Joined: November 4th, 2016, 9:24 am
Has thanked: 3254 times
Been thanked: 2856 times

Re: Hargreaves Lansdown API access

#595290

Postby kiloran » June 15th, 2023, 7:48 am

ArunC wrote:Hi
Does anyone know if its possible to get API access to fund performance data at Hargreaves Lansdown - want to get daily data into my spreadsheet to monitor fund performance.
Cheers
Arun

Not API access but you can probably scrape the data from a web page.

An alternative is HYPTUSS https://lemonfoolfinancialsoftware.weeb ... op-up.html
This does have a worksheet which scrapes fund prices from the FT

--kiloran

ArunC
Posts: 6
Joined: February 18th, 2023, 2:03 pm

Re: Hargreaves Lansdown API access

#595967

Postby ArunC » June 18th, 2023, 8:10 am

Tried scraping, but the column headers change every day, so it works on the day the power query in excel was set up, but the next day the headers change so cant find the data, does anyone know a way around this, been trying for hours....

Itsallaguess
Lemon Half
Posts: 9129
Joined: November 4th, 2016, 1:16 pm
Has thanked: 4140 times
Been thanked: 10032 times

Re: Hargreaves Lansdown API access

#595968

Postby Itsallaguess » June 18th, 2023, 8:23 am

ArunC wrote:
Tried scraping, but the column headers change every day, so it works on the day the power query in excel was set up, but the next day the headers change so cant find the data, does anyone know a way around this, been trying for hours....


Sorry to be blunt, but *which* column headers...?

As far as I can tell at the moment, you're looking for a mind-reader first and foremost...

Why not provide a sample URL, and then specify just which field or fields you're looking to use, and then people might be able to engage with your query more effectively, because as things stand, I can't see how anyone can help with such a vague and confusing request...

Cheers,

Itsallaguess
Last edited by Itsallaguess on June 18th, 2023, 8:24 am, edited 1 time in total.

ArunC
Posts: 6
Joined: February 18th, 2023, 2:03 pm

Re: Hargreaves Lansdown API access

#595969

Postby ArunC » June 18th, 2023, 8:24 am

HI think AI may have found a solution :)

ArunC
Posts: 6
Joined: February 18th, 2023, 2:03 pm

Re: Hargreaves Lansdown API access

#595970

Postby ArunC » June 18th, 2023, 8:27 am

The problem was this. The table on the page has a header row with dates, and a first row of data with annual return.
The dates change every day, so when the power query runs on the date it is set up the data returns fine, but the next dat, because the column headers have changes, the query cant find the data because the query if looking for headers from the previous day.

AI found this solution, replacing the power query code with the following (where the URL is the page being scraped, and Source(0) refers to the table reference on that page

let
Source = Web.Page(Web.Contents("URL")),
Data = Source{0}[Data],
Headers = Table.PromoteHeaders(Data, [PromoteAllScalars=true]),
NoHeaders = Table.Skip(Headers, 1)
in
NoHeaders

The example is on this page: https://www.hl.co.uk/funds/fund-discoun ... s-i-income table 5 (annual return)


Return to “Financial Software - Discussion”

Who is online

Users browsing this forum: No registered users and 23 guests