Hi there,
Has anyone created an API call for a PowerBI query? I would like to view my dividend received data in PowerQuery.
I have looked at the documentation however I am struggling how to format the parameters.
If anyone could give me an example of how to use any API call for dividens, maybe using VUSA that would be great.
Thanks,
Tom
Hi,
I don’t have any dividends but this should work as it’s similar to order history:
let
url = "https://live.trading212.com/api/v0/equity/history/dividends?limit=20&cursor=0&ticker=VUSAl_EQ",
headers = [#"Authorization" = "YOUR_API_KEY_HERE"] ,
response = Web.Contents(
url,
[
Headers = headers
]
),
jsonResponse = Json.Document(response),
items = jsonResponse[items],
#"responseTable" = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
responseTable
The result is a table of records that you can expand.
Hope this gives you a starting point.