BTC Price in Label

Hello,
I want to show live BTC price in a label in my App. I need hell regarding this, how I can do that.

This post was flagged by the community and is temporarily hidden.

https://api.coinbase.com/v2/prices/spot?currency=USD

Call a web component which will retrieve the contents of the link, parse the JSON received and set the label to the price parameter.

Can you please send screenshots of blocks or aia.Thanks

No

1 Like

Can you tell me what to write in attributeName

This is json
{“data”:{“base”:“BTC”,“currency”:“USD”,“amount”:“43305.86”}}

Parse “data” first and then get “amount”

2 Likes

We can also do with look up in pairs key block

Maybe not the right way but it works

This solution is hardcoded. If coinbase changes its API to include another data value, this solution wouldn’t work. What dora provided should be sufficient

1 Like

I know i just tried with different method :upside_down_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.