The Solana ecosystem continues to expand at a breathtaking pace, with thousands of new tokens and DeFi applications launching every month. For developers building in this space, access to reliable, real-time data is more important than ever. Today, we're thrilled to announce the official Solana Tracker Data API SDK – a powerful JavaScript/TypeScript client that makes it easier than ever to integrate comprehensive Solana blockchain data into your applications.
Whether you're building a trading dashboard, a portfolio tracker, or the next revolutionary DeFi application, our SDK provides everything you need to access and leverage Solana's rich ecosystem data:
All with the peace of mind that comes from using a fully-typed, professionally maintained SDK.
Our SDK is designed for simplicity without sacrificing power. Here's how quickly you can get up and running:
import { Client } from '@solana-tracker/data-api'; // Initialize with your API key const client = new Client({ apiKey: 'YOUR_API_KEY', }); // Fetch information about Raydium (RAY) const fetchRaydiumInfo = async () => { try { const rayToken = await client.getTokenInfo('4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R'); console.log(`${rayToken.name} Price: $${rayToken.priceUsd}`); console.log(`Market Cap: $${rayToken.marketCapUsd}`); console.log(`24h Volume: $${rayToken.volumeUsd24h}`); } catch (error) { console.error('Error:', error); } }; fetchRaydiumInfo();
One of the most powerful features of our SDK is the real-time data streaming capability through our intuitive WebSocket interface. Subscribers to our Premium plan and above can tap into the pulse of Solana with live updates:
import { Datastream } from '@solana-tracker/data-api'; // Connect to the Solana Tracker WebSocket const dataStream = new Datastream({ wsUrl: 'YOUR_WS_URL' }); // Establish connection dataStream.connect(); // Listen for connection events dataStream.on('connected', () => console.log('Connected to Solana Tracker data stream')); // Track the TRUMP token price in real-time const trumpToken = '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN'; dataStream.subscribe.price.token(trumpToken).on((priceData) => { console.log(`TRUMP token price update: $${priceData.price}`); console.log(`Change (24h): ${priceData.change24h}%`); }); // Get notifications for new token launches dataStream.subscribe.latest().on((tokenData) => { console.log(`New token detected: ${tokenData.token.name} (${tokenData.token.symbol})`); console.log(`Launch price: $${tokenData.token.priceUsd}`); console.log(`Initial liquidity: $${tokenData.token.liquidityUsd}`); }); // Monitor specific wallet transactions const whaleWallet = 'YourTargetWhaleWalletAddress'; dataStream.subscribe.tx.wallet(whaleWallet).on((tx) => { const action = tx.type === 'buy' ? 'bought' : 'sold'; console.log(`🐳 Whale ${action} ${tx.amount} ${tx.symbol} worth $${tx.volume}`); });
With our chainable subscription API, you can easily set up multiple listeners and manage them with TypeScript's full type safety.
Our SDK is built from the ground up with TypeScript, providing comprehensive type definitions for all API responses:
// The compiler knows exactly what properties are available const token = await client.getTokenInfo(tokenAddress); console.log(token.priceUsd); // TypeScript knows this is a number console.log(token.holders); // TypeScript knows this is a number console.log(token.symbol); // TypeScript knows this is a string
Access every aspect of the Solana ecosystem through our carefully designed endpoints:
Our SDK includes specific error types for precise error handling:
try { const tokenInfo = await client.getTokenInfo('invalid-address'); } catch (error) { if (error instanceof RateLimitError) { console.error(`Rate limit exceeded. Retry after: ${error.retryAfter} seconds`); } else if (error instanceof ValidationError) { console.error(`Invalid input: ${error.message}`); } else if (error instanceof DataApiError) { console.error(`API error (${error.status}): ${error.message}`); } }
Use the same SDK in both frontend and backend environments without modification.
Here are just a few ways developers are already using our SDK:
// Fetch multiple tokens at once for a dashboard const dashboardTokens = await client.getMultipleTokens([ 'So11111111111111111111111111111111111111112', // SOL '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R', // RAY 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC ]); // Process and display data dashboardTokens.forEach(token => { console.log(`${token.name} (${token.symbol})`); console.log(`Price: $${token.priceUsd}`); console.log(`24h Change: ${token.priceChange24h}%`); console.log(`Market Cap: $${token.marketCapUsd}`); console.log(`24h Volume: $${token.volumeUsd24h}`); console.log('---'); });
// Get comprehensive wallet data const wallet = await client.getWallet('YourWalletAddress'); // Calculate total portfolio value const portfolioValue = wallet.tokens.reduce((total, holding) => { return total + (holding.amount * holding.priceUsd); }, 0); console.log(`Portfolio Value: $${portfolioValue.toFixed(2)}`); // Get detailed PnL analysis const pnlData = await client.getWalletPnL('YourWalletAddress', true, true); console.log(`Overall PnL: $${pnlData.totalPnl}`); console.log(`Win Rate: ${pnlData.winRate}%`);
// Search for tokens matching specific criteria const defiTokens = await client.searchTokens({ query: 'defi', minMarketCap: 1000000, // $1M+ market cap minLiquidity: 500000, // $500K+ liquidity sortBy: 'volumeUsd24h', sortOrder: 'desc', limit: 10 }); console.log('Top 10 DeFi Tokens by 24h Volume:'); defiTokens.forEach((token, index) => { console.log(`${index + 1}. ${token.name} (${token.symbol})`); console.log(` Volume: $${token.volumeUsd24h.toLocaleString()}`); console.log(` Price: $${token.priceUsd}`); });
We offer flexible plans to match projects of all sizes:
| Plan | Price | Requests/Month | WebSocket | |-----------------|---------------|----------------|-----------| | Free | Free | 10,000 | No | | Starter | €14.99/month | 50,000 | No | | Advanced | €50/month | 200,000 | No | | Pro | €200/month | 1,000,000 | No | | Premium | €397/month | 10,000,000 | Yes | | Business | €599/month | 25,000,000 | Yes | | Enterprise | €1499/month | 100,000,000 | Yes | | Enterprise Plus | Custom | Unlimited | Yes |
Ready to supercharge your Solana development with comprehensive data access? Get started in three simple steps:
npm install @solana-tracker/data-api
We're excited to see what you'll build by combining our SDK with AI technologies! As highlighted in our Building on Solana Using AI guide, you can:
For AI integration, don't forget to check out our specially formatted documentation at docs.solanatracker.io/llms.txt.
We can't wait to see what you build with the Solana Tracker Data API SDK! Connect with us on Twitter or join our Discord to share your projects and get support from our team.