Quick help on API query

Dear All,

I’m just starting to work with API’s, in this case pulling in crypto data from the CoinMarketCap API. I have read the API docs and have all that set up nicely, just struggling on how to set up most efficiently…

In my use case I only require specific data points based on the symbol in an input field. I know how to pull in all 5000 currencies but need help on asking for just 1. In the screenshot below I have successfully initialised the call, but how do I make that ‘BNB’ symbol dynamic? Or would I approach it differently?

It is already dynamic. Try to use the method in a workflow for instance. You will see that you can set your own value there. The BNB value in your case is used as a default value.

Thx. But what I’m reading is that you can run an API call, save all that data to a custom state and then reference that state from then on, just have that state update on page load. My API call returns all data, so 5000 items. Would that be a good way to go?

Ok, but that’s taking almost a minute to load the page. So back to the start, whats the best way to access a set of data via API call, which is several thousands of items, but you only want 1, as per a text input? Clearly asking for all the data in one go is not worth it for 1 item. Thx Thomas for your reply, but could you elaborate. I didn’t quite understand what you meant…?

If you want to get 1 particular item only, use the query parameter (symbol in this case) as part of the URL in the following format: https://pro-api.coinmarketcap.com/v1/exchange/quotes/latest?convert=BNB

Hmm, done that, but can’t get my RG to resolve to blue…

You may need to re-initialize the call from plugin settings :slight_smile:

So I do that, adding in BNB (as at least one is mandatory) and then what? I’ve tried taking out ‘BNB’ from the plug-in page and then trying my RG but ‘BNB’ is still there and I can’t resolve to blue…

I can’t for life of me to get his work. If I initialise the call I have to put something in that parameter i.e. BNB, I can also see where to dynamically add my parameter settings, but the data source is still showing up with the hard data ‘BNB’, as all pictured above. Anyone able to help me?

Hi Martin, I looked around but wasn’t able to find the answer. Did you manage to get it working? :slight_smile:

I didn’t Deejay. I’m going to work on it now. Any tips appreciated. I know how to use the CMC Listing API, but it’s the Quotes API that I want. This allows me to pull the data for just 1 item, as per my input field.

Dear Martin,
Were you able to solve this problem?
I’ve been struggling with this for days and can’t find a solution.