I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Coingecko Rates Only pulling 1st 100 results for current_price

dashed-slug.net Forums General discussion Coingecko Rates Only pulling 1st 100 results for current_price

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5589
    megeanwasson
    Participant

    Hi Alex, I hope you are well 🙂

    I am experiencing an issue with exchange rates which was working fine in the past but now not working correclty.
    Expected result – cryptocoin price updated from coingecko – Usually shows in the exchange rates shortcode and coins price in wallets shortcodes.
    Actual Result – cryptocoin price not updated from coingecko resulting in no price shown in any of the shortcodes.

    It seems like coingecko have updated their api or changed something with the api results.

    In file wallets/includes/rates.php on line 1108 $url = ‘https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc’;
    Coingecko is only returning 1st 100 top coins, so if my coin is not in the top 100 at the time then current_price is not returned/found resulting in no rates to display the coins price in the frontend.

    There is some info about the changes here: https://www.coingecko.com/api

    I hope you can help or point me in the right direction to temp fix or permanent fix.

    Best regards
    Megan

    #5591
    alexg
    Keymaster

    Hello Megan,

    Thank you for reporting this. I am already aware of the issue.

    As you say, the CoinMarketCap and CoinGecko APIs have changed. I believe the idea is that they now give the top 100 coins for free, then you need to pay for the entire feed. This can be circumvented by querying the specific coins needed.

    I will need to develop a solution for this. Hopefully this will be out in one of the next updates.

    with regards

    #5643
    alexg
    Keymaster

    Hello Megan,

    There is now a solution in version 4.0.0 of the plugin.

    It is now possible to use a CoinMarketCap API key, if the new implementation of the CoinGecko scraper is not sufficient for your needs.

    Please see the release notes for more information.

    with regards

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.