How do I get the high time of a certain date and have it return the minute or even second it was that high

Hello,
I am trying to get the high time of a certain cryptocurrency
What I mean is that lets say in a day the currency is highest at 22:33 as a time how would I get a return of that 22:33 time in any format that shows the seconds or minutes because I know that you can get the high price but I haven’t found a way to get the time with any of the API’s

-Samm

P.S. I’m using python for this

Thanks in advance!

Hi @Samm! Welcome to the Coinbase Cloud Developer’s Forum!

We understand that you are trying to fetch the high time of a certain cryptocurrency but cannot find an API that is fit for this use case. In this regard, we would like to suggest that you utilize the Get product candles endpoint of Coinbase Pro. This endpoint would return data related to historic rates for a product. Rates are returned in grouped buckets depending on the granularity value set for the API call. Candle schema is of the form [timestamp, price_low, price_high, price_open, price_close]. Hence, in the response data returned for the series of bucket intervals, you could simply fetch the timestamp related to the high price and have this converted to your preferred time format as this endpoint returns timestamp in Unix Epoch format.

With regard to your note about using Python programming language, we regret to inform you that we are unable to provide guidance in writing code specific to a programming language, as we are only able to provide guidance and troubleshooting for issues with the raw Coinbase APIs. However, you may refer back to this reference documentation for sample requests in different programming languages including Python.

Additionally, please note that we will be moving your post to Coinbase Pro category as our suggested fix would be related to this product.

We hope this helps. Thank you and have a great day!

1 Like