Digests

PRO

549 words · 2 min read

Overview

This documentation describes how to use the Digests endpoint to access the latest market digests for various cryptocurrencies.

Endpoint

GET /api/v2/digests/latest/<COIN>/<LIMIT>

Retrieve the latest digest information for a specified cryptocurrency, with a limit on the number of digests returned.

Base URL

https://api.guavy.com

Full Endpoint Example

https://api.guavy.com/api/v2/digests/latest/BTC/30

Replace <COIN> with the desired cryptocurrency symbol (e.g., BTC for Bitcoin) and <LIMIT> with the number of latest digests to retrieve.

Authentication

This API requires authentication using a Bearer token. Include your API key in the request header as shown below.

Request Headers

HeaderDescription
AuthorizationBearer token for API authentication.

Example Header

-H "Authorization: Bearer YOUR-API-KEY"

Response Format

The response returns data in JSON format, containing an array of the latest market digests for the specified cryptocurrency.

Example Response

{
  "Success": [
    {
      "timestamp": 1730154836005.0,
      "digest": "Metaplanet's Bitcoin stash has hit a milestone with over 1,000 BTC acquired following its latest buy. The Japanese investment firm's strategy shift to focus on 'BTC Yield' as its key performance indicator is expected to boost its commitment to the cryptocurrency. Metaplanet's CEO has emphasized that it views Bitcoin as a long-term investment, highlighting its potential to surpass $1 million in value within the next 5-10 years.",
      "sentiment": 4.0,
      "tone": "Formal",
      "subject": "Metaplanet's Bitcoin Stash Reaches New Heights",
      "coins": ["BTC"],
      "topics": ["Metaplanet", "Bitcoin", "Japan"]
    },
    {
      "timestamp": 1730154606022.0,
      "digest": "As Bitcoin soars to $70,000, Dogecoin takes center stage after a surprise shoutout at a Donald Trump campaign event. Elon Musk's involvement has sparked a meme-fueled hype, with DOGE jumping 10% in value. The cryptocurrency market is on high alert as analysts predict a potential post-election rally for Bitcoin.",
      "sentiment": 2.5,
      "tone": "neutral",
      "subject": "Bitcoin Rises to $70,000 as Dogecoin Seizes the Spotlight",
      "coins": ["BTC", "DOG", "DOGE"],
      "topics": ["Dogecoin", "Bitcoin", "Donald Trump", "Elon Musk"]
    },
    ...
  ]
}

Field Descriptions

FieldTypeDescription
timestampfloatThe timestamp for when the digest was created (in milliseconds since the epoch).
digeststringThe content of the digest, providing insights or news related to the specified cryptocurrency.
sentimentfloatA sentiment score representing the overall tone of the digest, where higher values indicate positive sentiment.
tonestringIndicates the tone of the digest. Possible values are "Formal," "Neutral," or other descriptive terms.
subjectstringThe subject line summarizing the main point of the digest.
coinsarrayAn array of cryptocurrency symbols relevant to the digest.
topicsarrayAn array of topics covered in the digest.

Code Examples

cURL

curl -X GET "https://api.guavy.com/api/v2/digests/latest/BTC/30" \
-H "Authorization: Bearer YOUR-API-KEY"

Python (requests library)

import requests

url = "https://api.guavy.com/api/v2/digests/latest/BTC/30"
headers = {
    "Authorization": "Bearer YOUR-API-KEY"
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print("Failed to retrieve data:", response.status_code)

JavaScript (fetch API)

fetch("https://api.guavy.com/api/v2/digests/latest/BTC/30", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR-API-KEY",
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));