Returning Nested Properties within CoinMarketCap API

So I’m new to thunkable and am using the CoinMarketCap API.

I want an app where you can search for specific coins by putting in different filters.

For the time being, I’m trying to gradually test the api connection to make sure it is working. I’m trying to return a list of specified nested properties within the JSON data. However I can only return the entire JSON body of data and not specific nested properties.

The data is a variable named data which is the JSON response. When I try get property of object “data” from object it returns all the data. However What if I only wanted a list of names or a list of prices? I try to get the nested property by get property of object “data.name” and it returns null. I can specifically index a value by putting an integer in brackets (data[1].name) however what if I don’t want one specific one but a bunch of them. Can anyone provide the code blocks to solve this? Any feedback would be appreciated I’m not quite sure how to fix the problem.



The best thing to do is to post the full JSON response as text. It’s very hard to parse JSON from a screenshot. But if you post the text, I can paste it into Best JSON Viewer and JSON Beautifier Online and then help you to get the list (array) data you want.

It’s important to include ``` marks before and after the text, like this:

```
[JSON response]
```

Otherwise, all quotes will be converted to smart quotes which makes the JSON appear to be invalid.

You might also find my API tutorial helpful:

I was able to check a sample curl command that’s part of the API’s documentation and I see what you’re trying to do with the data property. Since “data” is an array, you’ll need to treat it like a list in Thunkable.

If you want to get that list, get the property “data” of object “app variable data” but remove the “generate JSON from object” block. You don’t need that block at all because “app variable data” is already an object so you can just get a property of that object.

Once you have the “data” property stored in a variable as a list (initialize the variable as an empty list), you can use a “for each j in” block to loop through that variable (list) and get the property “name” of object “j” (the loop variable). Then what you do with each name is up to you but I would normally insert each one in a list (another variable) and then display that list in a label or list viewer.

Is it alright if you send a codeblock screenshot? I’m trying to follow and appreciate your help. This is what I’ve come up with but it still isn’t working

Did that work? Were you able to see the last coinName in the response?

I can share a screenshot of blocks but you’ll need to describe/show what you’re wanting to do with the various properties. This isn’t really specific enough:

And since you haven’t posted the actual JSON response text, I’ll just be going off the sample one I found. Hopefully it’s similar enough.

No unfortunately nothing happened. Should it have worked in theory? Basically I want to name and return a List of Coins with the CoinName, CoinPrice, and its hrChange. (or whatever other properties I decide to name & add later on) For ex…

Label Text should read ( in theory)

BitCoin
$30,295
4.73%

Ethereum
$1,872
5.65%

Etc……

I hope this makes more sense

Here’s an example with the JSON response “hard coded” instead of using an API Get call as you’ll be doing:

See the first screen (with your username) here:

https://x.thunkable.com/copy/dbab3db1a274501d534a87fca629f44f

I don’t think it can be “hard coded” for what I’m trying to do unfortunately as the coin data will change from hour to hour so I’ll need it to be a direct API call

Here’s the exact script I’m trying to recreate just in thunkable form. Instead of printing to the console I will add the data to a list view. I wrote this script in python and it currently works. This is what I need to implement.


from requests import Request, Session
from requests.exceptions import ConnectionError, Timeout, TooManyRedirects
import json

from datetime import date

import smtplib

url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
parameters = {

'start':'1',
'limit':'3',
#'price_min':'1',
#'price_max':'10',
#'market_cap_min':'0',
#'market_cap_max':'2000000000000',
#'volume_24h_min':'1000000',
#'volume_24h_max':'100000000',
#'circulating_supply_min':'0',
#'circulating_supply_max':'100000000000000000',
#'percent_change_24h_min':'75',
#'percent_change_24h_max':'100',
'convert':'USD',
#'convert_id':'',
#'sort':'market_cap',
#'sort_dir':'desc',
#'cryptocurrency_type':'all',
#'tag':'all',
#'aux':'num_market_pairs,cmc_rank,date_added,tags,platform,max_supply,circulating_supply,total_supply'
  
}
headers = {
  'Accepts': 'application/json',
  'X-CMC_PRO_API_KEY': '1a6384ce-cff4-47d6-8067-b9850ca054d5'
}

session = Session()
session.headers.update(headers)

try:
  response = session.get(url, params=parameters)
  data = json.loads(response.text)
  print(data)

  for d in data['data']:

    CoinName = d['name']

    priceS = d['quote']['USD']['price']
    price = float(priceS)

    blockChainS = d['platform']
    blockChain = str(blockChainS)

    hrChangeS = d['quote']['USD']['percent_change_1h']
    hrChange = float(hrChangeS)

    dayChangeS = d['quote']['USD']['percent_change_24h']
    dayChange = float(dayChangeS)

    weekChangeS = d['quote']['USD']['percent_change_7d']
    weekChange = float(weekChangeS)

    monthChangeS = d['quote']['USD']['percent_change_30d']
    monthChange = float(monthChangeS)

    twoMonthChangeS = d['quote']['USD']['percent_change_60d']
    twoMonthChange = float(twoMonthChangeS)

    threeMonthChangeS = d['quote']['USD']['percent_change_90d']
    threeMonthChange = float(threeMonthChangeS)

    Volume24hS = d['quote']['USD']['volume_24h']
    Volume24h = float(Volume24hS)

    VolumeChange24hS = d['quote']['USD']['volume_change_24h']
    VolumeChange24h = float(VolumeChange24hS)

    marketCapS = d['quote']['USD']['market_cap']
    marketCap = float(marketCapS)

    #Converting Current Date into Integer 

    currentDate = "2022-05-16"

    currentDateYearS = currentDate[0:4]
    currentDateYear = int(currentDateYearS,10)

    currentDateMonthS = currentDate[5:7]
    currentDateMonth = int(currentDateMonthS,10)

    currentDateDayS = currentDate[8:10]
    currentDateDay = int(currentDateDayS,10)

    #Converting Date Added into Integer

    dateAdded = d['date_added']

    dateAddedYearS = dateAdded[0:4]
    dateAddedYear = int(dateAddedYearS,10)

    dateAddedMonthS = dateAdded[5:7]
    dateAddedMonth = int(dateAddedMonthS,10)

    dateAddedDayS = dateAdded[8:10]
    dateAddedDay = int(dateAddedDayS,10)

    #Calculating number of days in between

    d0 = date(dateAddedYear, dateAddedMonth, dateAddedDay)
    d1 = date(currentDateYear, currentDateMonth, currentDateDay)
    delta = d1 - d0
    daysOld = delta.days
    

    tagsS = d['tags']
    tags = str(tagsS)

    if dayChange > 10 and Volume24h > 100000 and 'BNB' in blockChain:
      print("Coin:",CoinName)
      print("Price:",price)
      print("blockChain:",blockChain)
      print("hrChange:",hrChange)
      print("dayChange:",dayChange)
      print("weekChange:",weekChange)
      print("monthChange:",monthChange)
      print("twoMonthChange:",twoMonthChange)
      print("threeMonthChange:",threeMonthChange)
      print("Volume24h:",Volume24h)
      print("VolumeChange24h:",VolumeChange24h)
      print("MarketCap:",marketCap) 
      print("dateAdded:",dateAdded)
      print("daysOld:",daysOld)
      print("tags:",tags)
      print("")

except (ConnectionError, Timeout, TooManyRedirects) as e:
  print(e)```

So I know you’re new to Thunkable and I’m quite experienced with APIs but… I need to see the JSON response as text to be able to help you here.

I understand now what you’re trying to do and can help you set up the blocks once I have the JSON response that you are getting. The demo response that I used does not have BitCoin, CoinName, or CoinPrice properties. So I’m stuck until I see your actual JSON response.

Just to be clear, I was suggesting that you won’t hard code the JSON response. So when you see my project, you’ll notice that I’ve copied and pasted the text into a variable. But you’ll just be setting that variable value from the API Get call instead. Everything else will work fine once it’s set up right.

Here is the JSON data for a sample of 5 Coins

{'status': {'timestamp': '2022-05-30T05:44:28.682Z', 'error_code': 0, 'error_message': None, 'elapsed': 25, 'credit_count': 1, 'notice': None, 'total_count': 10037}, 'data': [{'id': 1, 'name': 'Bitcoin', 'symbol': 'BTC', 'slug': 'bitcoin', 'num_market_pairs': 9472, 'date_added': '2013-04-28T00:00:00.000Z', 'tags': ['mineable', 'pow', 'sha-256', 'store-of-value', 'state-channel', 'coinbase-ventures-portfolio', 'three-arrows-capital-portfolio', 'polychain-capital-portfolio', 'binance-labs-portfolio', 'blockchain-capital-portfolio', 'boostvc-portfolio', 'cms-holdings-portfolio', 'dcg-portfolio', 'dragonfly-capital-portfolio', 'electric-capital-portfolio', 'fabric-ventures-portfolio', 'framework-ventures-portfolio', 'galaxy-digital-portfolio', 'huobi-capital-portfolio', 'alameda-research-portfolio', 'a16z-portfolio', '1confirmation-portfolio', 'winklevoss-capital-portfolio', 'usv-portfolio', 'placeholder-ventures-portfolio', 'pantera-capital-portfolio', 'multicoin-capital-portfolio', 'paradigm-portfolio'], 'max_supply': 21000000, 'circulating_supply': 19053268, 'total_supply': 19053268, 'platform': None, 'cmc_rank': 1, 'self_reported_circulating_supply': None, 'self_reported_market_cap': None, 'last_updated': '2022-05-30T05:44:00.000Z', 'quote': {'USD': {'price': 30349.75315500985, 'volume_24h': 23166371608.490936, 'volume_change_24h': 33.6456, 'percent_change_1h': 0.28068732, 'percent_change_24h': 4.68305872, 'percent_change_7d': 0.65006997, 'percent_change_30d': -21.46828282, 'percent_change_60d': -35.5415322, 'percent_change_90d': -29.74334963, 'market_cap': 578261980596.2482, 'market_cap_dominance': 45.8397, 'fully_diluted_market_cap': 637344816255.21, 'last_updated': '2022-05-30T05:44:00.000Z'}}}, {'id': 1027, 'name': 'Ethereum', 'symbol': 'ETH', 'slug': 'ethereum', 'num_market_pairs': 5738, 'date_added': '2015-08-07T00:00:00.000Z', 'tags': ['mineable', 'pow', 'smart-contracts', 'ethereum-ecosystem', 'coinbase-ventures-portfolio', 'three-arrows-capital-portfolio', 'polychain-capital-portfolio', 'binance-labs-portfolio', 'blockchain-capital-portfolio', 'boostvc-portfolio', 'cms-holdings-portfolio', 'dcg-portfolio', 'dragonfly-capital-portfolio', 'electric-capital-portfolio', 'fabric-ventures-portfolio', 'framework-ventures-portfolio', 'hashkey-capital-portfolio', 'kenetic-capital-portfolio', 'huobi-capital-portfolio', 'alameda-research-portfolio', 'a16z-portfolio', '1confirmation-portfolio', 'winklevoss-capital-portfolio', 'usv-portfolio', 'placeholder-ventures-portfolio', 'pantera-capital-portfolio', 'multicoin-capital-portfolio', 'paradigm-portfolio', 'injective-ecosystem', 'bnb-chain'], 'max_supply': None, 'circulating_supply': 120977505.5615, 'total_supply': 120977505.5615, 'platform': None, 'cmc_rank': 2, 'self_reported_circulating_supply': None, 'self_reported_market_cap': None, 'last_updated': '2022-05-30T05:43:00.000Z', 'quote': {'USD': {'price': 1886.3185282080228, 'volume_24h': 12945391501.339987, 'volume_change_24h': 12.7505, 'percent_change_1h': 0.7082299, 'percent_change_24h': 6.03335524, 'percent_change_7d': -7.02478882, 'percent_change_30d': -33.31684755, 'percent_change_60d': -44.53093385, 'percent_change_90d': -35.29902249, 'market_cap': 228202110237.04657, 'market_cap_dominance': 18.1077, 'fully_diluted_market_cap': 228202110237.05, 'last_updated': '2022-05-30T05:43:00.000Z'}}}, {'id': 825, 'name': 'Tether', 'symbol': 'USDT', 'slug': 'tether', 'num_market_pairs': 33957, 'date_added': '2015-02-25T00:00:00.000Z', 'tags': ['payments', 'stablecoin', 'asset-backed-stablecoin', 'avalanche-ecosystem', 'solana-ecosystem', 'arbitrum-ecosytem', 'moonriver-ecosystem', 'injective-ecosystem', 'bnb-chain', 'usd-stablecoin'], 'max_supply': None, 'circulating_supply': 72537249554.09048, 'total_supply': 79713622661.50517, 'platform': {'id': 1027, 'name': 'Ethereum', 'symbol': 'ETH', 'slug': 'ethereum', 'token_address': '0xdac17f958d2ee523a2206206994597c13d831ec7'}, 'cmc_rank': 3, 'self_reported_circulating_supply': None, 'self_reported_market_cap': None, 'last_updated': '2022-05-30T05:43:00.000Z', 'quote': {'USD': {'price': 0.9990795957488041, 'volume_24h': 41657532734.64591, 'volume_change_24h': 21.3873, 'percent_change_1h': -0.01043993, 'percent_change_24h': 0.00398667, 'percent_change_7d': -0.00485629, 'percent_change_30d': -0.09998202, 'percent_change_60d': -0.12197434, 'percent_change_90d': -0.12127691, 'market_cap': 72470485961.23085, 'market_cap_dominance': 5.7501, 'fully_diluted_market_cap': 79640253904.33, 'last_updated': '2022-05-30T05:43:00.000Z'}}}, {'id': 3408, 'name': 'USD Coin', 'symbol': 'USDC', 'slug': 'usd-coin', 'num_market_pairs': 4185, 'date_added': '2018-10-08T00:00:00.000Z', 'tags': ['medium-of-exchange', 'stablecoin', 'asset-backed-stablecoin', 'fantom-ecosystem', 'arbitrum-ecosytem', 'moonriver-ecosystem', 'bnb-chain', 'usd-stablecoin'], 'max_supply': None, 'circulating_supply': 53689011961.442375, 'total_supply': 53689011961.442375, 'platform': {'id': 1027, 'name': 'Ethereum', 'symbol': 'ETH', 'slug': 'ethereum', 'token_address': '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'}, 'cmc_rank': 4, 'self_reported_circulating_supply': None, 'self_reported_market_cap': None, 'last_updated': '2022-05-30T05:43:00.000Z', 'quote': {'USD': {'price': 1.0002881366624907, 'volume_24h': 4525036195.587818, 'volume_change_24h': 17.0335, 'percent_change_1h': 0.00410034, 'percent_change_24h': 0.03755083, 'percent_change_7d': 0.0016073, 'percent_change_30d': 0.03332157, 'percent_change_60d': 0.0777702, 'percent_change_90d': 0.04197094, 'market_cap': 53704481734.16137, 'market_cap_dominance': 4.2611, 'fully_diluted_market_cap': 53704481734.16, 'last_updated': '2022-05-30T05:43:00.000Z'}}}, {'id': 1839, 'name': 'BNB', 'symbol': 'BNB', 'slug': 'bnb', 'num_market_pairs': 910, 'date_added': '2017-07-25T00:00:00.000Z', 'tags': ['marketplace', 'centralized-exchange', 'payments', 'smart-contracts', 'alameda-research-portfolio', 'multicoin-capital-portfolio', 'moonriver-ecosystem', 'bnb-chain'], 'max_supply': 165116760, 'circulating_supply': 163276974.63, 'total_supply': 163276974.63, 'platform': None, 'cmc_rank': 5, 'self_reported_circulating_supply': None, 'self_reported_market_cap': None, 'last_updated': '2022-05-30T05:43:00.000Z', 'quote': {'USD': {'price': 317.792432414146, 'volume_24h': 1456796776.1592171, 'volume_change_24h': 12.461, 'percent_change_1h': 0.47130798, 'percent_change_24h': 5.82024141, 'percent_change_7d': -1.29499209, 'percent_change_30d': -20.29822409, 'percent_change_60d': -28.36975587, 'percent_change_90d': -19.57154448, 'market_cap': 51888186924.8905, 'market_cap_dominance': 4.117, 'fully_diluted_market_cap': 52472856792.74, 'last_updated': '2022-05-30T05:43:00.000Z'}}}]}

[moderator note: for future posts, the ``` marks have to be on separate lines apart from the text between them]

That doesn’t look like valid JSON to me. JSON usually has double quotes (") instead of single (’).

If you’re able to paste the text you have into Best JSON Viewer and JSON Beautifier Online and see the tree view on the right side, then that should work.

If you can’t get that far, I can try to mock up blocks that might work but they won’t necessarily be exact.

For example, if I do a search for “hrChange” in that text, it doesn’t exist. So you’re telling me property names but they don’t match the actual JSON.

Here is this better? I put it in a JSON formatter. I appreciate your help. I’m sorry I’m trying my best and really want this to work properly.

{
   "status":{
      "timestamp":"2022-05-30T05:44:28.682Z",
      "error_code":0,
      "error_message":"None",
      "elapsed":25,
      "credit_count":1,
      "notice":"None",
      "total_count":10037
   },
   "data":[
      {
         "id":1,
         "name":"Bitcoin",
         "symbol":"BTC",
         "slug":"bitcoin",
         "num_market_pairs":9472,
         "date_added":"2013-04-28T00:00:00.000Z",
         "tags":[
            "mineable",
            "pow",
            "sha-256",
            "store-of-value",
            "state-channel",
            "coinbase-ventures-portfolio",
            "three-arrows-capital-portfolio",
            "polychain-capital-portfolio",
            "binance-labs-portfolio",
            "blockchain-capital-portfolio",
            "boostvc-portfolio",
            "cms-holdings-portfolio",
            "dcg-portfolio",
            "dragonfly-capital-portfolio",
            "electric-capital-portfolio",
            "fabric-ventures-portfolio",
            "framework-ventures-portfolio",
            "galaxy-digital-portfolio",
            "huobi-capital-portfolio",
            "alameda-research-portfolio",
            "a16z-portfolio",
            "1confirmation-portfolio",
            "winklevoss-capital-portfolio",
            "usv-portfolio",
            "placeholder-ventures-portfolio",
            "pantera-capital-portfolio",
            "multicoin-capital-portfolio",
            "paradigm-portfolio"
         ],
         "max_supply":21000000,
         "circulating_supply":19053268,
         "total_supply":19053268,
         "platform":"None",
         "cmc_rank":1,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:44:00.000Z",
         "quote":{
            "USD":{
               "price":30349.75315500985,
               "volume_24h":23166371608.490936,
               "volume_change_24h":33.6456,
               "percent_change_1h":0.28068732,
               "percent_change_24h":4.68305872,
               "percent_change_7d":0.65006997,
               "percent_change_30d":-21.46828282,
               "percent_change_60d":-35.5415322,
               "percent_change_90d":-29.74334963,
               "market_cap":578261980596.2482,
               "market_cap_dominance":45.8397,
               "fully_diluted_market_cap":637344816255.21,
               "last_updated":"2022-05-30T05:44:00.000Z"
            }
         }
      },
      {
         "id":1027,
         "name":"Ethereum",
         "symbol":"ETH",
         "slug":"ethereum",
         "num_market_pairs":5738,
         "date_added":"2015-08-07T00:00:00.000Z",
         "tags":[
            "mineable",
            "pow",
            "smart-contracts",
            "ethereum-ecosystem",
            "coinbase-ventures-portfolio",
            "three-arrows-capital-portfolio",
            "polychain-capital-portfolio",
            "binance-labs-portfolio",
            "blockchain-capital-portfolio",
            "boostvc-portfolio",
            "cms-holdings-portfolio",
            "dcg-portfolio",
            "dragonfly-capital-portfolio",
            "electric-capital-portfolio",
            "fabric-ventures-portfolio",
            "framework-ventures-portfolio",
            "hashkey-capital-portfolio",
            "kenetic-capital-portfolio",
            "huobi-capital-portfolio",
            "alameda-research-portfolio",
            "a16z-portfolio",
            "1confirmation-portfolio",
            "winklevoss-capital-portfolio",
            "usv-portfolio",
            "placeholder-ventures-portfolio",
            "pantera-capital-portfolio",
            "multicoin-capital-portfolio",
            "paradigm-portfolio",
            "injective-ecosystem",
            "bnb-chain"
         ],
         "max_supply":"None",
         "circulating_supply":120977505.5615,
         "total_supply":120977505.5615,
         "platform":"None",
         "cmc_rank":2,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":1886.3185282080228,
               "volume_24h":12945391501.339987,
               "volume_change_24h":12.7505,
               "percent_change_1h":0.7082299,
               "percent_change_24h":6.03335524,
               "percent_change_7d":-7.02478882,
               "percent_change_30d":-33.31684755,
               "percent_change_60d":-44.53093385,
               "percent_change_90d":-35.29902249,
               "market_cap":228202110237.04657,
               "market_cap_dominance":18.1077,
               "fully_diluted_market_cap":228202110237.05,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":825,
         "name":"Tether",
         "symbol":"USDT",
         "slug":"tether",
         "num_market_pairs":33957,
         "date_added":"2015-02-25T00:00:00.000Z",
         "tags":[
            "payments",
            "stablecoin",
            "asset-backed-stablecoin",
            "avalanche-ecosystem",
            "solana-ecosystem",
            "arbitrum-ecosytem",
            "moonriver-ecosystem",
            "injective-ecosystem",
            "bnb-chain",
            "usd-stablecoin"
         ],
         "max_supply":"None",
         "circulating_supply":72537249554.09048,
         "total_supply":79713622661.50517,
         "platform":{
            "id":1027,
            "name":"Ethereum",
            "symbol":"ETH",
            "slug":"ethereum",
            "token_address":"0xdac17f958d2ee523a2206206994597c13d831ec7"
         },
         "cmc_rank":3,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":0.9990795957488041,
               "volume_24h":41657532734.64591,
               "volume_change_24h":21.3873,
               "percent_change_1h":-0.01043993,
               "percent_change_24h":0.00398667,
               "percent_change_7d":-0.00485629,
               "percent_change_30d":-0.09998202,
               "percent_change_60d":-0.12197434,
               "percent_change_90d":-0.12127691,
               "market_cap":72470485961.23085,
               "market_cap_dominance":5.7501,
               "fully_diluted_market_cap":79640253904.33,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":3408,
         "name":"USD Coin",
         "symbol":"USDC",
         "slug":"usd-coin",
         "num_market_pairs":4185,
         "date_added":"2018-10-08T00:00:00.000Z",
         "tags":[
            "medium-of-exchange",
            "stablecoin",
            "asset-backed-stablecoin",
            "fantom-ecosystem",
            "arbitrum-ecosytem",
            "moonriver-ecosystem",
            "bnb-chain",
            "usd-stablecoin"
         ],
         "max_supply":"None",
         "circulating_supply":53689011961.442375,
         "total_supply":53689011961.442375,
         "platform":{
            "id":1027,
            "name":"Ethereum",
            "symbol":"ETH",
            "slug":"ethereum",
            "token_address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
         },
         "cmc_rank":4,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":1.0002881366624907,
               "volume_24h":4525036195.587818,
               "volume_change_24h":17.0335,
               "percent_change_1h":0.00410034,
               "percent_change_24h":0.03755083,
               "percent_change_7d":0.0016073,
               "percent_change_30d":0.03332157,
               "percent_change_60d":0.0777702,
               "percent_change_90d":0.04197094,
               "market_cap":53704481734.16137,
               "market_cap_dominance":4.2611,
               "fully_diluted_market_cap":53704481734.16,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":1839,
         "name":"BNB",
         "symbol":"BNB",
         "slug":"bnb",
         "num_market_pairs":910,
         "date_added":"2017-07-25T00:00:00.000Z",
         "tags":[
            "marketplace",
            "centralized-exchange",
            "payments",
            "smart-contracts",
            "alameda-research-portfolio",
            "multicoin-capital-portfolio",
            "moonriver-ecosystem",
            "bnb-chain"
         ],
         "max_supply":165116760,
         "circulating_supply":163276974.63,
         "total_supply":163276974.63,
         "platform":"None",
         "cmc_rank":5,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":317.792432414146,
               "volume_24h":1456796776.1592171,
               "volume_change_24h":12.461,
               "percent_change_1h":0.47130798,
               "percent_change_24h":5.82024141,
               "percent_change_7d":-1.29499209,
               "percent_change_30d":-20.29822409,
               "percent_change_60d":-28.36975587,
               "percent_change_90d":-19.57154448,
               "market_cap":51888186924.8905,
               "market_cap_dominance":4.117,
               "fully_diluted_market_cap":52472856792.74,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      }
   ]
}
1 Like

Okay, the latest one you posted works:

{
   "status":{
      "timestamp":"2022-05-30T05:44:28.682Z",
      "error_code":0,
      "error_message":"None",
      "elapsed":25,
      "credit_count":1,
      "notice":"None",
      "total_count":10037
   },
   "data":[
      {
         "id":1,
         "name":"Bitcoin",
         "symbol":"BTC",
         "slug":"bitcoin",
         "num_market_pairs":9472,
         "date_added":"2013-04-28T00:00:00.000Z",
         "tags":[
            "mineable",
            "pow",
            "sha-256",
            "store-of-value",
            "state-channel",
            "coinbase-ventures-portfolio",
            "three-arrows-capital-portfolio",
            "polychain-capital-portfolio",
            "binance-labs-portfolio",
            "blockchain-capital-portfolio",
            "boostvc-portfolio",
            "cms-holdings-portfolio",
            "dcg-portfolio",
            "dragonfly-capital-portfolio",
            "electric-capital-portfolio",
            "fabric-ventures-portfolio",
            "framework-ventures-portfolio",
            "galaxy-digital-portfolio",
            "huobi-capital-portfolio",
            "alameda-research-portfolio",
            "a16z-portfolio",
            "1confirmation-portfolio",
            "winklevoss-capital-portfolio",
            "usv-portfolio",
            "placeholder-ventures-portfolio",
            "pantera-capital-portfolio",
            "multicoin-capital-portfolio",
            "paradigm-portfolio"
         ],
         "max_supply":21000000,
         "circulating_supply":19053268,
         "total_supply":19053268,
         "platform":"None",
         "cmc_rank":1,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:44:00.000Z",
         "quote":{
            "USD":{
               "price":30349.75315500985,
               "volume_24h":23166371608.490936,
               "volume_change_24h":33.6456,
               "percent_change_1h":0.28068732,
               "percent_change_24h":4.68305872,
               "percent_change_7d":0.65006997,
               "percent_change_30d":-21.46828282,
               "percent_change_60d":-35.5415322,
               "percent_change_90d":-29.74334963,
               "market_cap":578261980596.2482,
               "market_cap_dominance":45.8397,
               "fully_diluted_market_cap":637344816255.21,
               "last_updated":"2022-05-30T05:44:00.000Z"
            }
         }
      },
      {
         "id":1027,
         "name":"Ethereum",
         "symbol":"ETH",
         "slug":"ethereum",
         "num_market_pairs":5738,
         "date_added":"2015-08-07T00:00:00.000Z",
         "tags":[
            "mineable",
            "pow",
            "smart-contracts",
            "ethereum-ecosystem",
            "coinbase-ventures-portfolio",
            "three-arrows-capital-portfolio",
            "polychain-capital-portfolio",
            "binance-labs-portfolio",
            "blockchain-capital-portfolio",
            "boostvc-portfolio",
            "cms-holdings-portfolio",
            "dcg-portfolio",
            "dragonfly-capital-portfolio",
            "electric-capital-portfolio",
            "fabric-ventures-portfolio",
            "framework-ventures-portfolio",
            "hashkey-capital-portfolio",
            "kenetic-capital-portfolio",
            "huobi-capital-portfolio",
            "alameda-research-portfolio",
            "a16z-portfolio",
            "1confirmation-portfolio",
            "winklevoss-capital-portfolio",
            "usv-portfolio",
            "placeholder-ventures-portfolio",
            "pantera-capital-portfolio",
            "multicoin-capital-portfolio",
            "paradigm-portfolio",
            "injective-ecosystem",
            "bnb-chain"
         ],
         "max_supply":"None",
         "circulating_supply":120977505.5615,
         "total_supply":120977505.5615,
         "platform":"None",
         "cmc_rank":2,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":1886.3185282080228,
               "volume_24h":12945391501.339987,
               "volume_change_24h":12.7505,
               "percent_change_1h":0.7082299,
               "percent_change_24h":6.03335524,
               "percent_change_7d":-7.02478882,
               "percent_change_30d":-33.31684755,
               "percent_change_60d":-44.53093385,
               "percent_change_90d":-35.29902249,
               "market_cap":228202110237.04657,
               "market_cap_dominance":18.1077,
               "fully_diluted_market_cap":228202110237.05,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":825,
         "name":"Tether",
         "symbol":"USDT",
         "slug":"tether",
         "num_market_pairs":33957,
         "date_added":"2015-02-25T00:00:00.000Z",
         "tags":[
            "payments",
            "stablecoin",
            "asset-backed-stablecoin",
            "avalanche-ecosystem",
            "solana-ecosystem",
            "arbitrum-ecosytem",
            "moonriver-ecosystem",
            "injective-ecosystem",
            "bnb-chain",
            "usd-stablecoin"
         ],
         "max_supply":"None",
         "circulating_supply":72537249554.09048,
         "total_supply":79713622661.50517,
         "platform":{
            "id":1027,
            "name":"Ethereum",
            "symbol":"ETH",
            "slug":"ethereum",
            "token_address":"0xdac17f958d2ee523a2206206994597c13d831ec7"
         },
         "cmc_rank":3,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":0.9990795957488041,
               "volume_24h":41657532734.64591,
               "volume_change_24h":21.3873,
               "percent_change_1h":-0.01043993,
               "percent_change_24h":0.00398667,
               "percent_change_7d":-0.00485629,
               "percent_change_30d":-0.09998202,
               "percent_change_60d":-0.12197434,
               "percent_change_90d":-0.12127691,
               "market_cap":72470485961.23085,
               "market_cap_dominance":5.7501,
               "fully_diluted_market_cap":79640253904.33,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":3408,
         "name":"USD Coin",
         "symbol":"USDC",
         "slug":"usd-coin",
         "num_market_pairs":4185,
         "date_added":"2018-10-08T00:00:00.000Z",
         "tags":[
            "medium-of-exchange",
            "stablecoin",
            "asset-backed-stablecoin",
            "fantom-ecosystem",
            "arbitrum-ecosytem",
            "moonriver-ecosystem",
            "bnb-chain",
            "usd-stablecoin"
         ],
         "max_supply":"None",
         "circulating_supply":53689011961.442375,
         "total_supply":53689011961.442375,
         "platform":{
            "id":1027,
            "name":"Ethereum",
            "symbol":"ETH",
            "slug":"ethereum",
            "token_address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
         },
         "cmc_rank":4,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":1.0002881366624907,
               "volume_24h":4525036195.587818,
               "volume_change_24h":17.0335,
               "percent_change_1h":0.00410034,
               "percent_change_24h":0.03755083,
               "percent_change_7d":0.0016073,
               "percent_change_30d":0.03332157,
               "percent_change_60d":0.0777702,
               "percent_change_90d":0.04197094,
               "market_cap":53704481734.16137,
               "market_cap_dominance":4.2611,
               "fully_diluted_market_cap":53704481734.16,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      },
      {
         "id":1839,
         "name":"BNB",
         "symbol":"BNB",
         "slug":"bnb",
         "num_market_pairs":910,
         "date_added":"2017-07-25T00:00:00.000Z",
         "tags":[
            "marketplace",
            "centralized-exchange",
            "payments",
            "smart-contracts",
            "alameda-research-portfolio",
            "multicoin-capital-portfolio",
            "moonriver-ecosystem",
            "bnb-chain"
         ],
         "max_supply":165116760,
         "circulating_supply":163276974.63,
         "total_supply":163276974.63,
         "platform":"None",
         "cmc_rank":5,
         "self_reported_circulating_supply":"None",
         "self_reported_market_cap":"None",
         "last_updated":"2022-05-30T05:43:00.000Z",
         "quote":{
            "USD":{
               "price":317.792432414146,
               "volume_24h":1456796776.1592171,
               "volume_change_24h":12.461,
               "percent_change_1h":0.47130798,
               "percent_change_24h":5.82024141,
               "percent_change_7d":-1.29499209,
               "percent_change_30d":-20.29822409,
               "percent_change_60d":-28.36975587,
               "percent_change_90d":-19.57154448,
               "market_cap":51888186924.8905,
               "market_cap_dominance":4.117,
               "fully_diluted_market_cap":52472856792.74,
               "last_updated":"2022-05-30T05:43:00.000Z"
            }
         }
      }
   ]
}

Alright, this should get you started:

Project link

https://x.thunkable.com/copy/66c9855dfe0e6d8d32e7271f51b7a11e

Blocks

Preview

Thankyou so much! I will keep you updated with the project and will ask if I have more questions

1 Like

By way of explanation, you can see when you click on a property name on the Code Beautify website that the path is shown at the top:

So in that screenshot, I’ve clicked on percent_change_24h and the path to it is object :arrow_forward: data :arrow_forward: 0 :arrow_forward: quote :arrow_forward: USD :arrow_forward: percent_change_24h

The “data” property has square brackets [ ] which indicates an array/list:

So the “0” in the path represents the first item of the array (“0” is the first item, “1” is the second item, “2” is the third item, etc.). When we get the property “data” from the JSON object (“object”), we’re getting all items in that list. To then get the “percent_change_24h” property value, we have to get the property “quote.USD.percent_change_24h” from each item (“j”) in the “data” list. So hopefully that makes sense when you look at my screenshot/project.