Having trouble with the structure of the CMC API response

I have db driven pages for various assets. When they pull up a page to load more info on them, it generates a custom api call.

I know I am calling the API correctly because can see the call changing in CMC’s API admin as I switch pages.

Also - It works on the one page that matches the item I initialize the call with. In my example BTC is 1, so the API data shows up there. However, only that page. All others the API call fires off but I can’t display it.

I understand it has to do with the 1 it is prefixing when I init but I can’t figure out how to init the call without a default value there.

Any suggestions?

Related docs:
https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest

The structure I am having trouble with:
Screen Shot 2022-07-26 at 1.57.53 PM

Issue is related to the “1” prefix where a variable would be put instead.

API Plugin Setup

Bubble cannot handle this type of JSON (dictionnary) correctly. You may need to create your own plugin and do call in server side action.

1 Like

I was wondering if this would be the case. We might be switching to a different API, so this might be the motivation I needed to dig into that task.

Still want to figure this out. This is such a popular one, I want to know how to work with it.

Also will look into the possibility of making our own plugin for this. Are there any examples of similar solutions that you are aware of?

Thank you.

Not from what I know sorry.

This topic was automatically closed after 70 days. New replies are no longer allowed.