Trying to calculate new stock value on button press


I am trying to achieve the following.

I would like to update my stock on button press by adding or removing the value given in the cell.

Please help.

Thank you very much in advance!!!

Hi Pim,

You could use the button to run a script that makes an API call (using fetch) to a financial API like AlphaVantage and updates your cell with the response.

If you’re happy using a third-party app you could follow this video to use the Data Fetcher app:

Then follow this guide to run the request when a button is pressed.

1 Like

Hi Pim, I’ve put something together here for you that should do what you’re looking for

It would require that the button runs a Scripting App though, which forces the sidebar to appear
script update field

1 Like

Thank you very much!!! that was what I was looking for.

1 Like

Thank you very much for the suggestion!! That is certainly something I will be looking into.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.