Automated pool discovery and configuration generator for Solana DEXs
A powerful tool that automatically discovers, filters, and generates ready-to-use pool configurations using the GeckoTerminal API across multiple Solana DEXs. Perfect for arbitrage bots, trading automation, and DeFi research.
Discover pools with sufficient liquidity across multiple DEXs (Raydium, Orca, Meteora, etc.) to identify arbitrage opportunities. Automatically filters pools by liquidity and volume, ensuring you only get pools that can handle meaningful trade sizes.
Get ready-to-use pool configurations in seconds. Instead of manually researching and configuring each pool, this tool generates complete configs with all necessary information (program IDs, token addresses, pool addresses) that your trading bot can use immediately.
Analyze trading volumes, liquidity levels, and price movements across different DEXs. Comprehensive data includes transaction counts, price changes, and market metrics to help you understand market dynamics.
Find pools with optimal liquidity for your trading strategy. Filter by minimum liquidity and volume thresholds to discover pools that match your risk tolerance and trading size requirements.
Quickly discover all available pools for specific token pairs across multiple DEXs. Perfect for finding alternative trading routes or identifying new market opportunities.
Track pool metrics over time using the built-in logging system. Historical data helps you identify trends, monitor pool health, and make informed trading decisions.
Manually researching pools across multiple DEXs is time-consuming and error-prone. This tool automates the entire process, fetching, filtering, and formatting data in a single command.
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/yourusername/megagecko-pool-fetcher.git
cd megagecko-pool-fetcher
# Install dependencies
npm install# Fetch and display pools with details
npm run fetch
# Fetch and output JSON only (for automation)
npm run fetch:jsonOn first run, the script will:
- Fetch pools from GeckoTerminal API
- Filter by liquidity and volume thresholds
- Generate pool configurations
- Save logs to
logs/directory
Fully customizable - All settings can be modified in fetchPools.ts:
Edit the TARGET_TOKENS constant to specify which tokens you want to search for:
const TARGET_TOKENS: Record<string, string> = {
USDC: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
// Add your tokens here
};Note: The example tokens (USDC, WBTC, cbBTC) are provided as examples only. Replace them with any Solana token addresses you want to track.
Modify the minimum liquidity and volume filters in the main() function:
const MIN_LIQUIDITY = 1000; // Minimum liquidity in USD
const MIN_VOLUME_24H = 1000; // Minimum 24h volume in USDNote: The current values ($1,000) are examples. Adjust them based on your requirements.
- β Multi-DEX Support - Raydium, Orca, Phoenix, Meteora, and more
- β Smart Filtering - Automatic filtering by liquidity and volume
- β Complete Data - Prices, volumes, transactions, market metrics
- β Ready-to-Use Configs - Generated pool configurations for your bot
- β Dual Logging - JSON logs for automation + human-readable logs
- β Fully Customizable - All settings can be modified to match your strategy
The script generates:
- Console Output - Formatted pool information and configs
- JSON Log (
logs/pools-YYYY-MM-DD.json) - Machine-readable data - Text Log (
logs/pools-YYYY-MM-DD.txt) - Human-readable summary
Each pool config includes:
- Pool ID, type, and program ID
- Token details (addresses, decimals, symbols)
- Account addresses (state, ammId, or market)
- Liquidity, volume, prices, and market metrics
Scenario: You want to find all USDC/SOL pools with at least $10,000 liquidity for your arbitrage bot.
- Edit
TARGET_TOKENSto include USDC and SOL addresses - Set
MIN_LIQUIDITY = 10000in the code - Run
npm run fetch - Copy the generated configs to your bot
- Start trading! π
{
"id": "gecko-orca-cbbtc-usdc-0",
"type": "amm",
"programId": "9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP",
"tokenA": {
"address": "cbbtcf3aa214zXHbiAZQwf4122FBYbraNdFqgw4iMij",
"decimals": 8,
"symbol": "cbBTC"
},
"tokenB": {
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"decimals": 6,
"symbol": "USDC"
},
"accounts": {
"ammId": "HxA6SKW5qA4o12fjVgTpXdq2YnZ5Zv1s7SB4FFomsyLM"
},
"liquidity_usd": "4341059.523",
"volume_usd": { "h24": "20463475.1896452" },
"prices": { ... },
"transactions": { ... }
}This tool uses the GeckoTerminal API to fetch pool data.
Rate Limits:
- 30 calls per minute (public API)
- The script includes a 2-second delay between requests to respect rate limits
- For higher rate limits, consider CoinGecko API paid plans
API Status:
- Currently in Beta - subject to changes
- Free for public use
- Paid plans available for commercial use and higher limits
Usage Terms:
- Review GeckoTerminal Terms and Conditions
- For commercial applications, consider contacting GeckoTerminal or subscribing to a paid API plan
- Attribution to GeckoTerminal is appreciated
Best Practices:
- β Respect rate limits (30 calls/minute)
- β Use responsibly and don't abuse the API
- β Consider paid plans for production/commercial use
- β Don't resell or redistribute their data
For detailed information about:
- All available pool config fields
- Logging system details
- Supported DEXs
See DOCUMENTATION.md
- TypeScript - Type-safe JavaScript
- Node.js - Runtime environment
- GeckoTerminal API - Pool data source
- ts-node - TypeScript execution
- Arbitrage Bots - Find profitable trading opportunities across DEXs
- Liquidity Analysis - Research pool liquidity and volume trends
- Trading Automation - Generate configs for automated trading systems
- Market Research - Analyze DeFi market dynamics on Solana
- Pool Monitoring - Track pool health and performance over time
- β‘ Fast - Fetches and processes pools in seconds
- π Reliable - Built-in rate limiting and error handling
- π Comprehensive - Complete pool data with prices, volumes, transactions
- π― Focused - Smart filtering ensures only relevant pools
- π§ Flexible - Fully customizable to match your strategy
Contributions are welcome! Please read our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- GeckoTerminal for providing the API
- Solana DEXs (Raydium, Orca, Meteora, Phoenix) for pool data
MishaFYI
- Telegram: @MishaFYI
Built for Solana DeFi π
β Star this repo if you find it useful!