Skip to content

internet-court/internet-court-skill / vendored/sendaifun/birdeye

birdeye

Verified

Complete Birdeye API integration for real-time DeFi data across Solana and 15 other chains. Use for token prices, OHLCV charts, market discovery, on-chain trader intelligence, holder analysis, wallet portfolio & P&L, and WebSocket streams for live prices and whale alerts.

examples/token-data/token-overview.ts

View on GitHub
/**
 * Example: Fetching deep token data from Birdeye
 * Run with: npx ts-node examples/token-data/token-overview.ts
 */

import { BirdeyeClient } from '../../templates/birdeye-client';

async function run() {
    // Make sure to set export BIRDEYE_API_KEY="your-key"
    const apiKey = process.env.BIRDEYE_API_KEY;
    if (!apiKey) {
        console.error("Please export BIRDEYE_API_KEY.");
        process.exit(1);
    }

    const client = BirdeyeClient.createWithConfig({ apiKey, chain: 'solana' });

    // Solana's Wrapped SOL address
    const WSOL = 'So11111111111111111111111111111111111111112';

    console.log(`Fetching Token Overview for WSOL...`);

    try {
        const data = await client.token.getOverview(WSOL);

        // Actual /defi/token_overview response fields: marketCap, v24hUSD (not mc/volume24h)
        console.log("\n--- WSOL Metrics ---");
        console.log(`Price: $${data.price.toFixed(4)}`);
        console.log(`Market Cap: $${data.marketCap.toLocaleString()}`);
        console.log(`24h Volume: $${data.v24hUSD.toLocaleString()}`);
        console.log(`Holders: ${data.holder.toLocaleString()}`);
        console.log(`Unique Wallets 24h: ${data.uniqueWallet24h.toLocaleString()}`);

    } catch (e: any) {
        console.error("[Error]", e.message);
    }
}

run();
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall