Skip to main content

Endpoint

GET https://rocks.rive.wtf/api/crypto

Description

Fetches real-time cryptocurrency data including price, market cap, volume, and 24-hour price changes for any supported cryptocurrency.

Authentication

This endpoint requires authentication via Bearer token in the Authorization header.

Query Parameters

coin
string
required
The cryptocurrency identifier (e.g., “bitcoin”, “ethereum”, “dogecoin”)

Request Example

curl -X GET "https://rocks.rive.wtf/api/crypto?coin=bitcoin" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example (JSON)

{
  "change_percent_24h": -5.29462,
  "id": "bitcoin",
  "market_cap": 1686484127551.0,
  "name": "Bitcoin",
  "price": 84289.0,
  "symbol": "btc",
  "volume_24h": 70923572029.0
}

Response Fields

id
string
The unique identifier for the cryptocurrency
name
string
The full name of the cryptocurrency
symbol
string
The trading symbol (ticker) for the cryptocurrency
price
number
Current price in USD
market_cap
number
Total market capitalization in USD
volume_24h
number
Trading volume over the last 24 hours in USD
change_percent_24h
number
Percentage change in price over the last 24 hours (can be negative)

Notes

  • Prices and market data are updated in real-time
  • All monetary values are in USD
  • The change_percent_24h field can be negative (indicating a price decrease) or positive (indicating a price increase)
  • Coin identifiers are typically lowercase versions of the cryptocurrency name (e.g., “bitcoin”, “ethereum”, “cardano”)