Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: pro api support, trending coins api #2068

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Lukapetro
Copy link
Contributor

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant