Okay, picture this. You're building a little trading bot on Solana, right? New memecoin launches, you wanna snipe it before the pumps hit. But pulling data manually? Nah, too slow. That's when I first hit up Birdeye API. Dude, it's this crypto data beast - prices, volumes, token info across chains like Solana, Ethereum, even weird ones. In my experience, you can grab real time token price in like 10 seconds flat once set up. Why does this matter? Bots. Dashboards. Alerts. Pretty much anything crypto that needs fresh data without scraping.
So I said screw it, let's connect this thing. Took me under 5 minutes first time. You'll see.
First off, head to birdeye.so. Yeah, that site with the slick charts. Click sign up top right. Email, password, boom. Verify if they ask - usually an email link. Logged in? Good.
Now, account stuff. I usually go straight to dashboard. Free tier works for testing, but API calls? You'll want Pro or API Pro quick. Free's like 100 calls a day or something low - check your usage tab. Pro's what, $50/month? Unlocks unlimited ish pulls, no ads, better endpoints.
Keys time. Sidebar, hit Security tab. Or sometimes it's under Profile > API. Click Generate. Long string pops up - copy it. Paste in a secure note app, not your clipboard history. That's your golden ticket. Lose it? Generate new one, old dies.
Upgrade? Account page, pick plan. Card details, done. In my experience, start free, upgrade when you hit limits.
Alright, got keys? Let's hit an endpoint. I use JavaScript 'cause it's quick, but Python/Node whatever. Open your editor - VS Code, Replit, don't care.
Basic fetch for token price. Say, Solana's JUP token. Endpoint: https://public api.birdeye.so/defi/price?address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (that's JUP).
Headers? X API: yourkeyhere. And Content Type: application/json.
fetch('https://public api.birdeye.so/defi/price?address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', { headers: { 'X API': 'yourapikey_here', 'Content Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error('Oops:', err));
Run it. Boom - price, update time, decimals. Like {"value": 0.85, "updateUnixTime": 1735760000}. Super short first call. What's next? Test in browser console if lazy.
The thing is, docs at docs.birdeye.so are gold. Quick links everywhere. But honestly, these five cover 90% of bot work. Why batch? Rate limits - free tier 60/min, Pro higher. Don't spam or they throttle you.
Okay, now let's make something useful. A script that watches a token, alerts if price jumps 20%.
I usually throw this in Node. npm init, install node fetch or axios. Here's the code - tweak it.
const axios = require('axios'); const APIKEY = 'yourkey';
const TOKEN = 'So11111111111111111111111111111111111111112'; // WSOL async function checkPrice() { try { const res = await axios.get(https://public api.birdeye.so/defi/price?address=${TOKEN}, { headers: { 'X API': API_KEY } }); const price = res.data.data.value; console.log(WSOL: ${price}); // Add your alert logic here if (price > 150) console.log('🚀 Moon time!'); } catch (err) { console.log('Error:', err.response?.status); }
} setInterval(checkPrice, 10000); // Every 10s
checkPrice();
Run with node script.js. Watches forever. Potential issue? Rate limits. Space calls 1-2s apart. Gas? Nah, API's serverless - ~0.000005 SOL if you're on chain, but this is pure HTTP.
Sound familiar? That's your first "bot". Scale it - add Discord webhook for alerts. Boom, trading edge.
Look, hit limits too hard first time? 429 error stares back. Free: 60 req/min, 100k/day? Pro: 300/min, millions/day. Check headers in response - X RateLimit Remaining tells you.
Fixes? Cache data. Redis or local JSON. Poll every 30s, not 1s. Use webhooks if Pro - they push updates, no polling.
In my experience, multi_price endpoint saves your ass. One call, 30 tokens. Fees? None really, just subscription.
| Chain | Endpoints | Example Token |
|---|---|---|
| Solana | price, trades, dex | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (JUP) |
| Ethereum | price, overview | 0xA0b86a33E644337eb6D5406D99E0EBc20b2E3C9a (YFI) |
| Base | price, history | 0x.. (check docs) |
| Arbitrum | limited | ARB tokens |
Mostly Solana king here. Why? Fastest data.
401 Unauthorized? Bad. Regenerate.
404? Wrong address or endpoint. Docs spell it out.
500? Their side, wait 5min.
CORS in browser? Use proxy or backend. Node fine.
No data? Token delisted or zero liquidity. Try trending endpoint first.
Honestly, log everything. console.error(response) shows clues.
Remember that YouTube vid? Sniper bots pull Birdeye for new launches. Endpoint: /defi/new_tokens or tokenlist?filter=new. Params: chain=solana, offset=0, limit=10.
Strategy I use: Poll every 5s, filter liquidity >$10k, volume spike. Then check price history - if 5x in 1min, buy via Jupiter API or Raydium.
Code snippet for new tokens:
async function getNewTokens() { const res = await fetch('https://public api.birdeye.so/defi/tokenlist?chain=solana&sortby=v24hUSD&sorttype=desc&offset=0&limit=10', { headers: { 'X API': API_KEY } }); const data = await res.json(); data.data.forEach(token => { if (token.v24hUSD > 100000) console.log('Hot one:', token.address); });
}
Test on testnet first. Rug pulls? Check unique holders >100, locked liquidity.
But wait, integrate with wallets? Web3 login in docs - connect Phantom, pull balances via their wallet API.
If JS ain't your thing, Python's chill. pip install requests.
import requests headers = { 'X API': 'your_key', 'Content Type': 'application/json'
} url = 'https://public api.birdeye.so/defi/price?address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
res = requests.get(url, headers=headers)
print(res.json())
Run python script.py. Same deal. Loops? While True, time.sleep(10).
The thing is, combine with Dexscreener API for rugs. Birdeye's faster though.
Now you're polling. Next? Webhooks. Pro only - subscribe to price changes. POST to your server.
Full bot? Node + Solana Web3.js. Birdeye feeds data, web3 swaps via Jupiter.
Costs: API Pro ~$200/mo? Gas on swaps: 0.000005 SOL/tx. Slippage 0.3-1%.
Issue: High freq? VPS like DigitalOcean $5/mo. Run 24/7.
I built one that sniped 3x last month. Honest gains, but test paper trade first.
Not just tokens. /wallet/tokenlist?wallet=your_address. Holdings overview.
NFTs? /nft/collection/.. Limited, but floor prices rock.
Dex trades: /defi/dex/trades?address=..&type=trade. Buy/sell history.
Basically, if it's on chain Solana heavy, they got it.
Postman. Import curl from docs, swap. Test endpoints visually.
Chrome dev tools network tab - see raw requests.
Community: Their Discord or Twitter. "Birdeye API rate limit" searches help.
My fix always: Read error body. Tells you exactly.