# Returning Nested Properties within CoinMarketCap API

**URL:** https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489
**Category:** Web API's
**Tags:** beginner, help, webapi
**Created:** [May 30, 2022, 2:35am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489 "2022-05-30T02:35:58Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 2:35am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/1 "2022-05-30T02:35:59Z")

</div>

**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.

 ![Screen Shot 2022-05-29 at 10.16.28 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/8/187eb563acfdad9cd2fb4c5f39eb6d2f66b8b778.png)  
 ![Screen Shot 2022-05-29 at 10.16.48 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/88c6a3c6f64b29cc461a03c6f27a60742ed0173f.png)  
 ![Screen Shot 2022-05-29 at 10.27.35 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e32de94cee2f6fbad5ebb8d30f2dd01950692bfa.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 2:56am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/2 "2022-05-30T02:56:26Z")

</div>

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](https://codebeautify.org/jsonviewer) 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:

> [@API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575):
>
> Using APIs in Thunkable and understanding how to parse JSON to get certain data from the API response is both a popular and a difficult aspect of using Thunkable. It’s not so much difficult because of Thunkable but because every API url format is different, every API documentation is different, every JSON response is different, etc. In this video, I spend a lot of time talking you through some best practices. It’s not a quick tutorial because if you rush through setting up an API in Thunkable, …

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 3:17am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/3 "2022-05-30T03:17:35Z")

</div>

I was able to check a sample curl command that’s part of the API’s [documentation](https://coinmarketcap.com/api/documentation/v1/#section/Quick-Start-Guide) 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.

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 4:30am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/4 "2022-05-30T04:30:33Z")

</div>

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

 ![Screen Shot 2022-05-30 at 12.28.50 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/c/cc36fd72cc887183628f4426ea7ad45803331420.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 5:01am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/5 "2022-05-30T05:01:00Z")

</div>

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:

> [@realrefinedapplev](#):
>
> I’m trying to return a list of specified nested properties within the JSON data.

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.

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 5:08am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/6 "2022-05-30T05:08:21Z")

</div>

**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

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 5:08am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/7 "2022-05-30T05:08:34Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/2/4257b89d7223862ef8e069f3692166b879eafe40.png)

See the first screen (with your username) here:

[https://x.thunkable.com/copy/dbab3db1a274501d534a87fca629f44f](https://x.thunkable.com/copy/dbab3db1a274501d534a87fca629f44f)

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 5:16am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/8 "2022-05-30T05:16:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 5:18am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/9 "2022-05-30T05:18:28Z")

</div>

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.

````auto

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)```
````

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 5:36am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/10 "2022-05-30T05:36:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 5:45am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/11 "2022-05-30T05:45:58Z")

</div>

Here is the JSON data for a sample of 5 Coins

```auto
{'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]

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 5:53am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/12 "2022-05-30T05:53:01Z")

</div>

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](https://codebeautify.org/jsonviewer) 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.

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 5:57am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/13 "2022-05-30T05:57:38Z")

</div>

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.

```auto
{
   "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"
            }
         }
      }
   ]
}

```

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 6:02am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/14 "2022-05-30T06:02:18Z")

</div>

Okay, the latest one you posted works:

```auto
{
   "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"
            }
         }
      }
   ]
}

```

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 6:10am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/15 "2022-05-30T06:10:14Z")

</div>

Alright, this should get you started:

### Project link

> **[Thunkable](https://x.thunkable.com/copy/66c9855dfe0e6d8d32e7271f51b7a11e)**

### Blocks

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/4/8425b47e1f6472b23f22aeb9d0371a9b2bc1fc96.png)

### Preview

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46eb2ffdd569fa0b1f7d0f62de14fd5c1f7e69da.png)

---

<div class="post-metadata">

### Author: ![realrefinedapplev](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@realrefinedapplev](https://community.thunkable.com/u/realrefinedapplev)
#### Post date: [May 30, 2022, 6:15am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/16 "2022-05-30T06:15:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 30, 2022, 6:16am UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/17 "2022-05-30T06:16:19Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6ded3a4a8effeac80a386744cafd859d3457599a.png)

So in that screenshot, I’ve clicked on percent\_change\_24h and the path to it is object ▶ data ▶ 0 ▶ quote ▶ USD ▶ percent\_change\_24h

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c1ec7ce46af5e2c5b387afa3977efa096486c3d.png)

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.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:13pm UTC](https://community.thunkable.com/t/returning-nested-properties-within-coinmarketcap-api/1901489/18 "2024-11-08T13:13:15Z")

</div>


