eliza
eliza copied to clipboard
Feature/add coinmarketcap plugin
CoinMarketCap Plugin for Eliza
Risks
Low - This is an additive change that introduces a new plugin without modifying existing functionality. The main risks are:
- Rate limiting from CoinMarketCap API (Stricter limits compared to CoinGecko)
- Potential timeout issues when the API is slow
- Invalid cryptocurrency symbols causing failed requests
- Cost implications as CoinMarketCap API is a paid service
Background
What does this PR do?
- Adds a new CoinMarketCap plugin for cryptocurrency price checking
- Implements a
GET_PRICEaction that fetches current prices using the v1 API - Provides TypeScript types and interfaces for CoinMarketCap API responses
- Includes environment validation for API key configuration
- Adds proper error handling for API calls and symbol validation
What kind of change is this?
Features (non-breaking change which adds functionality):
- New plugin implementation
- New paid API integration
- New TypeScript types and validation
Documentation changes needed?
My changes require a change to the project documentation:
- Add CoinMarketCap plugin setup instructions
- Document required API key configuration
- Add usage examples for price checking
- Update plugin list in main documentation
- Add pricing/rate limit considerations
Testing
Where should a reviewer start?
- Review the plugin implementation in
/plugin-coinmarketcap/src/ - Check the main action implementation in
index.ts - Verify API service in
service.ts - Review type definitions in
types.ts - Check template handling in
template.ts
Detailed testing steps
-
Set up environment:
COINMARKETCAP_API_KEY=your_api_key -
Run agent locally and test natural language queries:
- "What's the current price of Bitcoin?"
- "Show me ETH price in USD"
- "Get the price of SOL"
-
Verify error handling:
- Try with invalid symbols
- Test API timeout scenarios
- Check rate limit handling
- Verify currency conversion handling
Future Expansion
1. Extended CoinMarketCap Integration
- Add support for all available cryptocurrencies
- Include market data (market cap, volume, supply)
- Add historical price data
- Support multiple currency conversions
- Implement proper rate limit handling
2. Additional API Features
/cryptocurrency/map- Add support for symbol/id mapping/cryptocurrency/info- Include detailed crypto metadata/cryptocurrency/listings/latest- Add market data sorting and filtering/cryptocurrency/categories- Support category-based queries/global-metrics/quotes/latest- Add global market metrics
3. Enhanced Features
- Price alerts configuration
- Multi-currency price comparisons
- Historical data analysis
- Price change tracking
- Market data aggregation
- Advanced symbol resolution
- Improved error messaging
Discord username
0xspit
@odilitime @wtfsayo conflicts resolved, feel free to take a look and merge
@shakkernerd can't merge myself; lgtm
Why have we merged that code with broken workflow integration-tests? The build process is broken here