Using the CoinGecko Manager Tool
1. get_trending_tokens
async def get_trending_tokens(agent: SolanaAgentKit) -> dict:import asyncio
from agentipy.agent import SolanaAgentKit
from agentipy.tools.use_coingecko import CoingeckoManager
# Assuming 'agent' is your initialized SolanaAgentKit instance
async def fetch_trending():
try:
trending_data = await CoingeckoManager.get_trending_tokens(agent)
print("Currently Trending Tokens:")
for coin in trending_data.get('coins', []):
item = coin.get('item', {})
print(f"- {item.get('symbol', 'N/A')} ({item.get('name', 'N/A')}): Rank {item.get('market_cap_rank', 'N/A')}")
except Exception as e:
print(f"Error fetching trending tokens: {e}")
# asyncio.run(fetch_trending()) # Example of how to run2. get_trending_pools
3. get_top_gainers
4. get_token_price_data
5. get_token_info
6. get_latest_pools
Last updated
