Mentions
343 words · 2 min read
Overview
This documentation describes how to use the Mentions
endpoint to access mentions data for various cryptocurrencies over a specified number of days.
Endpoint
GET /api/v2/sentiment/mentions/<COIN>/<DAYS>
Retrieve the mentions analysis for a specified cryptocurrency over a defined number of days.
Base URL
https://api.guavy.com
Full Endpoint Example
https://api.guavy.com/api/v2/sentiment/mentions/BTC/30
Replace <COIN>
with the desired cryptocurrency symbol, such as BTC for Bitcoin, and <DAYS>
with the number of days for which you want mentions data.
Authentication
This API requires authentication using a Bearer token. Include your API key in the request header as shown below.
Request Headers
Header | Description |
---|---|
Authorization | Bearer token for API authentication. |
Example Header
-H "Authorization: Bearer YOUR-API-KEY"
Response Format
The response returns data in JSON format, containing mentions analysis details for the specified cryptocurrency over the given time period.
Example Response
{
"Success": [
{"timestamp": 1730098800000.0, "topic": "BTC", "mentions": 528},
{"timestamp": 1730012400000.0, "topic": "BTC", "mentions": 217},
{"timestamp": 1729926000000.0, "topic": "BTC", "mentions": 221},
{"timestamp": 1729839600000.0, "topic": "BTC", "mentions": 718},
...
]
}
Field Descriptions
Field | Type | Description |
---|---|---|
timestamp | float | The timestamp for the mentions data point (in milliseconds since the epoch). |
topic | string | The cryptocurrency topic (e.g., "BTC"). |
mentions | integer | The total number of mentions recorded for the topic. |
Code Examples
cURL
curl -X GET "https://api.guavy.com/api/v2/sentiment/mentions/BTC/30" \
-H "Authorization: Bearer YOUR-API-KEY"
Python (requests library)
import requests
url = "https://api.guavy.com/api/v2/sentiment/mentions/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/sentiment/mentions/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));