Skip to content

Get Wallet Statistics

Get comprehensive statistics for a wallet including revenue, entries, purchases, and rankings.

GET/v1/wallets/{wallet_id}/stats

Overview

Retrieve comprehensive statistics for a wallet including content creation metrics, revenue data, purchase history, and platform rankings.

Authentication

Required: No
Payment: No

Public endpoint - no authentication needed.

Parameters

Path Parameters

ParameterTypeRequiredDescription
wallet_idstring (UUID)YesWallet identifier

Response

Status: 200 OK

{
  "wallet_id": "string",
  "address": "string",
  "network": "string",
  "content_stats": {
    "total_feeds": number,
    "total_entries": number,
    "free_entries": number,
    "paid_entries": number,
    "total_content_size": number
  },
  "revenue_stats": {
    "total_revenue": "string",
    "revenue_usdc": "string",
    "unique_buyers": number,
    "total_purchases_received": number,
    "average_entry_price": "string"
  },
  "purchase_stats": {
    "total_spent": "string",
    "spent_usdc": "string",
    "unique_sellers": number,
    "total_purchases_made": number,
    "average_purchase_amount": "string"
  },
  "rankings": {
    "revenue_rank": number,
    "content_rank": number,
    "buyer_rank": number
  },
  "activity": {
    "first_activity": number,
    "last_activity": number,
    "active_days": number
  },
  "generated_at": number
}

Response Fields

Content Statistics

FieldTypeDescription
total_feedsnumberNumber of feeds created
total_entriesnumberNumber of entries published
free_entriesnumberNumber of free entries
paid_entriesnumberNumber of paid entries
total_content_sizenumberTotal content size in bytes

Revenue Statistics

FieldTypeDescription
total_revenuestringTotal revenue earned in wei
revenue_usdcstringTotal revenue in USDC
unique_buyersnumberNumber of unique buyers
total_purchases_receivednumberNumber of purchases from others
average_entry_pricestringAverage price per entry in wei

Purchase Statistics

FieldTypeDescription
total_spentstringTotal amount spent in wei
spent_usdcstringTotal amount spent in USDC
unique_sellersnumberNumber of unique sellers purchased from
total_purchases_madenumberNumber of purchases made
average_purchase_amountstringAverage purchase amount in wei

Rankings

FieldTypeDescription
revenue_ranknumberRevenue ranking on platform (1 = highest)
content_ranknumberContent creation ranking (1 = most prolific)
buyer_ranknumberPurchase activity ranking (1 = most active buyer)

Activity

FieldTypeDescription
first_activitynumberTimestamp of first platform activity
last_activitynumberTimestamp of most recent activity
active_daysnumberNumber of days with activity

Usage Examples

cURL
curl https://api.grapevine.fyi/v1/wallets/{wallet_id}/stats

SDK Usage

// The SDK doesn't expose wallet stats directly
// Use the client utilities and direct API calls:
import { GrapevineClient } from '@pinata/grapevine-sdk';
 
const grapevine = new GrapevineClient({
  privateKey: process.env.PRIVATE_KEY
});
 
// Get stats for any wallet
const response = await grapevine.client.get(`/wallets/${walletId}/stats`);
const stats = response.data;
 
console.log('Wallet Performance:');
console.log(`Revenue: ${stats.revenue_stats.revenue_usdc} USDC`);
console.log(`Entries: ${stats.content_stats.total_entries}`);
console.log(`Rank: #${stats.rankings.revenue_rank}`);

Example Response

{
  "wallet_id": "123e4567-e89b-12d3-a456-426614174000",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "network": "base-sepolia",
  "content_stats": {
    "total_feeds": 5,
    "total_entries": 42,
    "free_entries": 20,
    "paid_entries": 22,
    "total_content_size": 2048576
  },
  "revenue_stats": {
    "total_revenue": "50000000000000000000",
    "revenue_usdc": "50.00",
    "unique_buyers": 12,
    "total_purchases_received": 89,
    "average_entry_price": "1200000000000000000"
  },
  "purchase_stats": {
    "total_spent": "25000000000000000000",
    "spent_usdc": "25.00",
    "unique_sellers": 8,
    "total_purchases_made": 34,
    "average_purchase_amount": "735294117647058824"
  },
  "rankings": {
    "revenue_rank": 15,
    "content_rank": 8,
    "buyer_rank": 23
  },
  "activity": {
    "first_activity": 1703980800,
    "last_activity": 1704067200,
    "active_days": 45
  },
  "generated_at": 1704067200
}

Use Cases

1. Profile Dashboard

Display user's performance metrics on their profile page.

2. Creator Leaderboards

Rank content creators by revenue, content volume, or activity.

3. Marketplace Analytics

Show top performers and market trends.

4. User Insights

Help users understand their platform activity and earnings.

Error Responses

404 Not Found

{
  "error": "Wallet not found",
  "code": "WALLET_NOT_FOUND"
}

400 Bad Request

{
  "error": "Invalid wallet ID format",
  "code": "INVALID_WALLET_ID"
}

Performance Notes

  • Caching: Statistics are cached and updated periodically
  • Real-time: Revenue and purchase data may have slight delays
  • Rankings: Updated daily based on platform-wide activity
  • Data Retention: Statistics available from wallet creation date

Metrics Explanation

Revenue Rank

Based on total revenue earned from content sales. Lower numbers indicate higher earnings.

Content Rank

Based on total number of entries published and engagement metrics. Lower numbers indicate more prolific creators.

Buyer Rank

Based on total purchase activity and spending. Lower numbers indicate more active buyers.

Privacy Considerations

  • All statistics are publicly available
  • Individual transaction details are not exposed
  • Only aggregate metrics are shown
  • Wallet addresses are visible but not personally identifiable

Related Endpoints

External Playground

Try this endpoint interactively in Swagger UI:
https://api.grapevine.fyi/v1/docs