internet-court/internet-court-skill / vendored/sendaifun/birdeye
birdeye
VerifiedComplete 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/market-data/ohlcv-chart.ts
View on GitHub/**
* Example: Fetch historical OHLCV candles
* Run with: npx ts-node examples/market-data/ohlcv-chart.ts
*/
import { BirdeyeClient } from '../../templates/birdeye-client';
async function run() {
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' });
const WSOL = 'So11111111111111111111111111111111111111112';
// Timeframes: 1s/15s/30s (V3 only), 1m, 3m, 5m, 15m, 30m, 1H, 2H, 4H, 6H, 8H, 12H, 1D, 3D, 1W, 1M
const now = Math.floor(Date.now() / 1000);
const thirtyDaysAgo = now - 30 * 24 * 3600;
console.log(`Fetching 30 days of 1D OHLCV candles for WSOL...`);
try {
const data = await client.price.getOHLCV(WSOL, '1D', thirtyDaysAgo, now);
const items = data?.items ?? [];
console.log(`Successfully fetched ${items.length} candles.`);
if (items.length) {
console.log("Most recent candle:", items[items.length - 1]);
}
} catch (e: any) {
console.error("[Error]", e.message);
}
}
run();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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 implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |