Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: pro api support, trending coins api #2068

Merged
merged 11 commits into from
Jan 10, 2025

Conversation

Lukapetro
Copy link
Contributor

@Lukapetro Lukapetro commented Jan 9, 2025

Relates to

Risks

Low - Adding new functionality and API support with proper error handling

Background

What does this PR do?

  1. Adds support for CoinGecko Pro API

    • Configurable through environment variables
    • Automatic handling of both free and pro API endpoints
    • Proper header management for API authentication
  2. Implements new trending coins functionality

    • New /search/trending endpoint integration
    • Support for coins, NFTs, and categories data
    • Structured response formatting

What kind of change is this?

Features (non-breaking change which adds functionality)

  • Pro API integration
  • New trending data endpoint
  • Enhanced type safety and error handling

Documentation changes needed?

Yes - Documentation needs to be updated to include:

  • New environment variables (COINGECKO_API_KEY, COINGECKO_PRO_API_KEY)
  • New functionality usage examples

Testing

Where should a reviewer start?

  1. Review environment configuration changes:

    • packages/plugin-coingecko/src/environment.ts
    • packages/plugin-coingecko/src/constants.ts
  2. Review new functionality

Detailed testing steps

  1. Test Pro API Configuration:
# Test with free API
export COINGECKO_API_KEY="your-free-api-key"
# Test with pro API
export COINGECKO_PRO_API_KEY="your-pro-api-key"
  1. Test Trending Functionality:
// Example queries
"What's trending in crypto?"
"Show me hot cryptocurrencies"
"What's popular in the crypto market?"

Screenshots

image_2025-01-09_16-56-35

Demo

demo-coingecko-plugin.mp4

Discord username

0xspit

Addition

Special thanks to soon-aik, PM from coingecko. for cooperation. He created this document with guidelines for integrating endpoints into this PR and provided me with the PRO account free of charge to test the endpoints

@wtfsayo wtfsayo self-requested a review January 10, 2025 11:43
@wtfsayo wtfsayo marked this pull request as ready for review January 10, 2025 11:43
@wtfsayo wtfsayo marked this pull request as draft January 10, 2025 11:43
@Lukapetro Lukapetro marked this pull request as ready for review January 10, 2025 16:09
@wtfsayo wtfsayo merged commit b9dc459 into elizaOS:develop Jan 10, 2025
3 checks passed
@Lukapetro Lukapetro deleted the feat/coingecko-api-integration branch January 10, 2025 18:42
0xpi-ai pushed a commit to 0xpi-ai/NayariAI that referenced this pull request Jan 15, 2025
…egration

feat: pro api support, trending coins api
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants