Open extra topbar

I would like to add another provider for an exchange rate

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!

I would like to add another provider for an exchange rate

dashed-slug.net Forums General discussion I would like to add another provider for an exchange rate

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6661
    d3vnu77
    Participant

    Coingecko is the only provider for my monero based altcoin you have listed… however their price is way off on the coin i need priced.

    I can pull the data from the only exchange we are on right now with this API

    https://fcbaccount.com/api/public/v1/get/exchange/market?pair=BTC-ARMS

    However, i don’t know the correct way to implement this in the code.

    Any help would be greatly appreciated.

    #6662
    d3vnu77
    Participant

    For instance coingecko has the price at 0.00000010 BTC and has been stuck their for ages. Meanwhile it currently trades 6 times higher than that at 0.00000060 BTC

    #6664
    alexg
    Keymaster

    Hello,

    You can see some example code on how to provide an exchange rate to the plugin, here: https://gist.github.com/alex-georgiou/492196184f206002c864225180ca8fbb

    Copy this file into your wp-content/plugins directory, and edit the part where the value is set. You might need to use php curl (requires the module to be installed) or file_get_contents (requires allow_url_fopen), or better yet, use wp_remote_get().

    Then, activate the plugin from your plugins list in WordPress admin.

    You can then go to “Wallets” -> “Exchange Rates” and hit the “Clear/Refresh data now!” button.

    If all works correctly, the value should appear in “Wallets” -> “Exchange Rates” -> “Exchange rates debug views” -> “Exchange rates”.

    Let me know if you get stuck or need help with anything.

    with regards

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