24 hour data (open, low, high, close, volume, price change)

I see the prices endpoint, but nothing with any historical data.

Looking for open, high, low, prev. close, volume, price change for past 24 hours.

Thanks

Hi @tradehub! Welcome to the Coinbase Cloud Developer’s forum, thank you for your interest in using the Coinbase APIs. We understand that you are looking for an API endpoint that could give you the open, high, low, prev. close, volume, price change for the past 24 hours of a certain product. First, we would like to inform you that the Prices endpoint you were checking was an endpoint for the Sign in with Coinbase API. Now if you are utilizing the Exchange/Pro API, you can use both the Get Product Stats (Gets 30day and 24hour stats for a product ) and the Get Product Ticker (Gets snapshot information about the last trade (tick), best bid/ask and 24h volume ) to retrieve the historical data you mentioned. Moreover, you also have the option to subscribe to the Ticker Channel that provides real-time price updates every time a match happens.

We hope this helps! Have a good day.

How would one get the previous day close price?

Or would it need to be fetched at 7:59:59pm EST (12utc) and cache that as the prev day closing price?

Hi @tradehub! Regarding your concern, as we have recommended from our previous response, you may utilize the Get product stats endpoint in Exchange/Pro wherein it gets the 30day and 24hour stats for a product. Another endpoint that we recommend is the Get product candles wherein it returns the historic rates for a product. You may specify in the query params of this endpoint the start, end, and the granularity to accurately retrieve the desired information from a product_id. We hope this helps. Please reply back to this thread if you have any other concerns. Thank you!

2 Likes