Discover CoinVera’s Trend endpoint for real-time insights into the top trending Solana tokens—filterable by time window and result count.
Identify the hottest Solana tokens over a recent timeframe. Use the Trend endpoint to retrieve a ranked list of tokens sorted by activity, volume, or momentum.
Endpoint
GET https://api.coinvera.io/api/v1/trend
Authentication
Include your API key in the request header:
constaxios=require('axios');constx_api_key="";// Configurationconsthour=24;// Change this to 1, 6, 12, or 24 hoursconstlimit=10;// Number of results to returnasyncfunctiongetTrend(hour,limit){try{consturl=`https://api.coinvera.io/api/v1/trend?x-api-key=${x_api_key}&hour=${hour}&limit=${limit}`;constresponse=awaitaxios.get(url);return{ hour, limit,...response.data };}catch (err) {return{ hour, limit, error:err.message };}}asyncfunctionfetchTrend(){constresult=awaitgetTrend(hour, limit);if (result.error) {console.log(`Error for ${result.hour}h trend (limit: ${result.limit}): ${result.error}`);}else{console.log(`Trend data for ${result.hour}h (limit: ${result.limit}):`);console.log(JSON.stringify(result,null,2));}}fetchTrend();
Example Response
Tip: Try different hour windows to capture short-term spikes or longer-term trends, and adjust limit to tailor the size of your results list.
import requests
import json
x_api_key = ""
# Configuration
hour = 24 # Change this to 1, 6, 12, or 24 hours
limit = 10 # Number of results to return
def get_trend(hour, limit):
try:
url = f"https://api.coinvera.io/api/v1/trend?x-api-key={x_api_key}&hour={hour}&limit={limit}"
response = requests.get(url)
response.raise_for_status() # Raises an HTTPError for bad responses
data = response.json()
return {"hour": hour, "limit": limit, **data}
except Exception as err:
return {"hour": hour, "limit": limit, "error": str(err)}
def fetch_trend():
result = get_trend(hour, limit)
if "error" in result:
print(f"Error for {result['hour']}h trend (limit: {result['limit']}): {result['error']}")
else:
print(f"Trend data for {result['hour']}h (limit: {result['limit']}):")
print(json.dumps(result, indent=2))
# Run the function
fetch_trend()
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
)
const xAPIKey = ""
// Configuration
const hour = 24 // Change this to 1, 6, 12, or 24 hours
const limit = 10 // Number of results to return
type TrendResult struct {
Hour int `json:"hour"`
Limit int `json:"limit"`
Data interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
}
func getTrend(hour, limit int) TrendResult {
url := fmt.Sprintf("https://api.coinvera.io/api/v1/trend?x-api-key=%s&hour=%d&limit=%d",
xAPIKey, hour, limit)
resp, err := http.Get(url)
if err != nil {
return TrendResult{
Hour: hour,
Limit: limit,
Error: err.Error(),
}
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return TrendResult{
Hour: hour,
Limit: limit,
Error: err.Error(),
}
}
// Check for HTTP errors
if resp.StatusCode != http.StatusOK {
return TrendResult{
Hour: hour,
Limit: limit,
Error: fmt.Sprintf("HTTP %d: %s", resp.StatusCode, string(body)),
}
}
var data interface{}
if err := json.Unmarshal(body, &data); err != nil {
return TrendResult{
Hour: hour,
Limit: limit,
Error: err.Error(),
}
}
return TrendResult{
Hour: hour,
Limit: limit,
Data: data,
}
}
func fetchTrend() {
result := getTrend(hour, limit)
if result.Error != "" {
fmt.Printf("Error for %dh trend (limit: %d): %s\n", result.Hour, result.Limit, result.Error)
} else {
fmt.Printf("Trend data for %dh (limit: %d):\n", result.Hour, result.Limit)
jsonData, _ := json.MarshalIndent(result.Data, "", " ")
fmt.Println(string(jsonData))
}
}
func main() {
fetchTrend()
}