Get hourly chart data for BTC price

Hi Im trying to find a way to get historical data (average hourly prices for last few hours) of BTC to generate a chart, i found api :

i see in documentation there is possible date argument, but is there either way for specific time, or better to get array of values, like hourly prices for last 24h or such?

The best i came with so far, is to run own interval based getter on a server, to get vlaue every hour. But sure the data is allready here? I believie i just suck at searching, how to get that data

Hi @pemi, we would like to first thank you for taking interest in trying out our Coinbase Products.

We noticed that you are using an endpoint for Sign in with Coinbase. Sign in with Coinbase and Coinbase Pro/Exchange are two separate and, therefore, different products that offer different services.

However, for this specific use-case, we’d like to recommend you to use the /products endpoint of Coinbase Pro/Exchange. With this endpoint, you may specify the granularity or intervals for the candles which contain historical data like the low, high, open, close, and volume.

Note: Historical rate data may be incomplete. No data is published for intervals where there are no ticks. Historical rates should not be polled frequently. If you need real-time information, use the trade and book endpoints along with the Websocket feed.

For more information, you may check this endpoint at Get product candles