get_trending_pools
Retrieve trending liquidity pools from GeckoTerminal across multiple networks to identify trading opportunities in DeFi markets.
Instructions
Get trending pools across all networks on GeckoTerminal
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_trending_pools"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Attributes to include: 'base_token', 'quote_token', 'dex', 'network' (comma-separated) | |
| page | No | Page number for pagination (optional, default: 1) | |
| duration | No | Duration for trending: '5m', '1h', '6h', '24h' (optional, default: '24h') |
Implementation Reference
- Supporting utility method in CoinGeckoApiService that performs the actual HTTP fetch to the CoinGecko API endpoint for trending pools.
async getTrendingPools(options = {}) { try { const queryParams = new URLSearchParams(); if (options.include) queryParams.append('include', options.include); if (options.page) queryParams.append('page', options.page); if (options.duration) queryParams.append('duration', options.duration); const url = `${this.baseUrl}/networks/trending_pools${queryParams.toString() ? '?' + queryParams.toString() : ''}`; const response = await fetch(url, { headers: { 'x-cg-demo-api-key': this.apiKey } }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } return await response.json(); } catch (error) { throw new Error(`Failed to get trending pools: ${error.message}`); } }