Is there a simple way to get a list of prices over a period of time at given intervals (for example a list of the price of aapl for the last five minutes which each minute's price filling an index). I'm sure this is written somewhere really obvious but I haven't been able to find anything.

Thank you!