Data retrieval API Call

Hi, Could anyone show me a simple historical data retrieval call from Google Sheets using Google script?

I’m simply looking for a function to send daily Date, open, high, low, close to be sent to a google sheet in columns A to E, in rows 1 to xxxx

Something like function(symbol, start, end, frequency), or function (“SPY”,“31/12/2019”,“24/8/2020”,“day”)

Any feedback would be very gratefully received!

Mike

I am also looking how to do this but to call the intraday price of an equity at a specific date and time