web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get crypto data from C...
Power Automate
Unanswered

Get crypto data from Coinmarketcap

(1) ShareShare
ReportReport
Posted on by 4
I am trying to get data for id, name, price, market cap and volume using the coinmarketcap api. I have created a scheduled flow, initialised variables, created an array of token ids and used an HTTP get to pull out the data. I have then used Parse JSON with the schema generated from this sample payload:
{
  "status": {
    "timestamp": "2024-11-12T16:43:27.276Z",
    "error_code": 0,
    "error_message": null,
    "elapsed": 18,
    "credit_count": 1,
    "notice": null
  },
  "data": {
    "1": {
      "id": 1,
      "name": "Bitcoin",
      "symbol": "BTC",
      "slug": "bitcoin",
      "num_market_pairs": 11798,
      "date_added": "2010-07-13T00: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",
        "bitcoin-ecosystem",
        "ftx-bankruptcy-estate"
      ],
      "max_supply": 21000000,
      "circulating_supply": 19781271,
      "total_supply": 19781271,
      "is_active": 1,
      "infinite_supply": false,
      "platform": null,
      "cmc_rank": 1,
      "is_fiat": 0,
      "self_reported_circulating_supply": null,
      "self_reported_market_cap": null,
      "tvl_ratio": null,
      "last_updated": "2024-11-12T16:41:00.000Z",
      "quote": {
        "USD": {
          "price": 86970.06050101147,
          "volume_24h": 152229373269.7326,
          "volume_change_24h": 61.7735,
          "percent_change_1h": 0.31958302,
          "percent_change_24h": 2.85507507,
          "percent_change_7d": 23.89249677,
          "percent_change_30d": 38.77402996,
          "percent_change_60d": 46.28354332,
          "percent_change_90d": 47.22524777,
          "market_cap": 1720378335656.9036,
          "market_cap_dominance": 59.3802,
          "fully_diluted_market_cap": 1826371270521.24,
          "tvl": null,
          "last_updated": "2024-11-12T16:41:00.000Z"
        }
      }
    },
    "1027": {
      "id": 1027,
      "name": "Ethereum",
      "symbol": "ETH",
      "slug": "ethereum",
      "num_market_pairs": 9532,
      "date_added": "2015-08-07T00:00:00.000Z",
      "tags": [
        "pos",
        "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",
        "layer-1",
        "ftx-bankruptcy-estate"
      ],
      "max_supply": null,
      "circulating_supply": 120423718.45088653,
      "total_supply": 120423718.45088653,
      "is_active": 1,
      "infinite_supply": true,
      "platform": null,
      "cmc_rank": 2,
      "is_fiat": 0,
      "self_reported_circulating_supply": null,
      "self_reported_market_cap": null,
      "tvl_ratio": null,
      "last_updated": "2024-11-12T16:41:00.000Z",
      "quote": {
        "USD": {
          "price": 3254.2681713784345,
          "volume_24h": 67644582260.368225,
          "volume_change_24h": 33.5712,
          "percent_change_1h": -0.33198555,
          "percent_change_24h": -1.06654707,
          "percent_change_7d": 32.33328497,
          "percent_change_30d": 32.4248495,
          "percent_change_60d": 35.35924232,
          "percent_change_90d": 22.50022077,
          "market_cap": 391891074033.75793,
          "market_cap_dominance": 13.5264,
          "fully_diluted_market_cap": 391891074033.76,
          "tvl": null,
          "last_updated": "2024-11-12T16:41:00.000Z"
        }
      }
    }
  }
}
I have tried to use the Parse JSON output as the input for a for apply to each action  in which I want to extract the data and save it to sharepoint but I get an error saying
"Action 'Apply_to_each' failed: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('Parse_JSON')' is of type 'Object'. The result must be a valid array".
The parse json output looks identical to the input.
Any help would be greatly appreciated.
 
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,331 Super User 2025 Season 2 on at
    Get crypto data from Coinmarketcap
    Hi,
     
    Change your apply to each to this expression.

    outputs('Parse_JSON')?['data']
     
    Then use the individual properties to get each value:
     
    • item()?['id'] for the token ID
    • item()?['name'] for the name
    • item()?['quote']?['USD']?['price'] for the price
    • item()?['quote']?['USD']?['market_cap'] for the market cap
    • item()?['quote']?['USD']?['volume_24h'] for the volume
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • trice602 Profile Picture
    15,331 Super User 2025 Season 2 on at
    Get crypto data from Coinmarketcap
    Hey there!
     
    I am following up on this post get crypto data from coinmarketcap in this category building flows from 11/12/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 1 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,331 Super User 2025 Season 2 on at
    Get crypto data from Coinmarketcap
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard