Get coin price

The price endpoint allows users to query the price history of a cryptocurrency based on a specified epoch timestamp (in seconds). The system will find the nearest available price point to the provided timestamp, selecting from data aggregated by minute, hour, or day. The granularity of the returned data depends on how far back in time the requested timestamp is.

GET /coin/:uuid/price

https://api.coinranking.com/v2/coin/:uuid/price

Path parameters

ParameterDescription
uuid String

UUID of the coin you need the price.

Query parameters

Parameter Description
referenceCurrencyUuid (optional) String

UUID of reference currency. This is the currency the price is shown in, which defaults to US Dollar.

Default value: yhjMzLPhuIDl

Example:
...coin/Qwsogvtv82FCd/price?referenceCurrencyUuid=5k-_VTxqtCEI
timestamp (optional) Number

The timestamp parameter accepts an epoch timestamp in seconds. This timestamp is used to find the nearest available price point, selecting the data's granularity based on the age of the request:

  • Minute-level data for timestamps within the last 24 hours.
  • Hourly data for timestamps older than 24 hours but less than 30 days.
  • Daily data for timestamps older than 30 days.

If no timestamp is provided, this endpoint will default to the latest price.

Example:
...coin/Qwsogvtv82FCd/price?timestamp=1588349307

Code examples

Response

HTTP/1.1 200 OK
{
  "status": "success",
  "data": {
    "price": "7305.985182338483",
    "timestamp": 1586305740
  }
}

Response fields

PropertyDescription
status String

Status of the request

Allowed values:
success
data Object
data.price String

The price of the requested coin at the requested time

data.timestamp Number

An Epoch timestamp in seconds when the coin had the given price. Might differ from the provided timestamp in the request, because it is stripped down to the day, hour or minute.

Error response

HTTP/1.1 404 Not Found
{
  "status": "fail",
  "type": "COIN_NOT_FOUND",
  "message": "Coin not found"
}

Error responses