I have been trying to access bitcoin pricing and market cap data through Umbrel’s BTC RPC Explorer app. However, when I go to the URLs for the endpoints shown on the app’s API page (such as /api/price), the returned data is either a null value or zero. I have been able to access block and txid data through these APIs without a problem. Is there another term I should include in my API calls to retrieve bitcoin pricing and market cap data? I am running Umbrel on a Raspberry Pi4. I appreciate any help. Thanks.
The ‘mempool’ app will have the features you’re looking for.
Thank you for the quick reply. I have looked at the API URLs available in the mempool app at IP:port/docs/api/rest, but I don’t see any URLs related to pricing or market cap information. Do you happen to know an example mempool API URL for pulling bitcoin’s USD price or market cap? Thanks again for your assistance.
Interesting… I looked at mempool’s github page here: https://github.com/mempool/mempool
and I can’t find the API that calls for the price and all that… I think they poll a separate server for that, but maybe you can dig deeper in that github page and find what you’re looking for?
Thanks. I will post back here with the solution if I figure it out. I appreciate your help.
did you figure something out?
I also noticed the market data in the BTC RPC explorer screenshot they have on their github, would be a nice touch
I agree - that would be a nice touch. I discussed the issue on the mempool github page (no response on the RPC github page), and the moderator said that capability doesn’t currently exist through the mempool app, but there was another server we could use for the time being. See this page: https://github.com/mempool/mempool/issues/1190#issuecomment-1021829306
The suggested server appears to only allow current pricing, and not historical pricing (or at least I haven’t figured out how to request historical pricing yet).