Finance App Help

Hello Everyone,
I need to use the yahoo finance api and i can’t get it to work.
Please Help Here Is My Code.


And here is an example api address : https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=US&corsDomain=finance.yahoo.com&symbols=AAPL

1 Like

an you explain what are you getting?

Is not descriptive enough.

1 Like

If you copy and paste the JSON response text from a browser window into Best JSON Viewer and JSON Beautifier Online and click Tree Viewer, you’ll see the data formatted in an easy-to-read way.

Then, if you click on a property name such as “displayName”, you’ll see the path to that property at the top of the window:

In this case, it’s object > quoteResponse > result > 0 > displayName.

So you would need to convert the JSON to an object, as you’ve done with the green response block above and then for the get property text string, you would want to use this:

quoteResponse.result[1].displayName

The [1] represents the first array item in the “result” JSON property. JSON numbers the first item in an array/list zero (0) but Thunkable lists start with 1 which is why the property name has a 1 instead of a 0.

To learn more about how to parse JSON, see my tutorial.

2 Likes

Thanks for the help :sweat_smile:

Hello folks, thank you for sharing your problem and how you solved it here. Can you post your result as well? I’m just wondering because I am just trying to make the same application for one of my projects. We want to make a simple game on our financial site(wealth advice investment articles, and more). The game needs to be related to any financial activity. It would be awesome if you share any ideas regarding this topic and your codes, so I will have a good example to go. Reach me in private messages with anything. Thank you for being so helpful in advance.

I’m always suspicious of first time posts that include links. They are almost always spam. But if this isn’t spam, please let us know. I’m going to remove the link for now.

3 Likes

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