I wrote a script with Apps Script for my Google Sheet, in order to have a record of stock prices at a given time. The script is executed every hour by a time-driven trigger.