- You will learn how to handle Stocks API.
- You will learn how to give a display output to the Magicbit.
Stocks are an investment in a company and that company’s profits. Investors buy stock to earn a return on their investment.
This is how ordinary people invest in some of the most successful companies in the world. For companies, stocks are a way to raise money to fund growth, products, and other initiatives.
When you buy the stock of a company, you’re effectively buying an ownership share in that company.
Setting up the NodesFirst, you need the below nodes.
Make the following arrangement.
Double click on it to access its settings. Make the below settings.
- Enter Method as GET.
- Set the return field as “a parsed JSON object”
- Paste the given link on the URL field:
Enter the given code in the Function.
var companyName = "IBM";
var time = msg.payload.IBM.values[0].datetime.slice(11,16) + " USA-NY"
var high = msg.payload.IBM.values[0].high + " $";
var low = msg.payload.IBM.values[0].low + " $";
msg.payload = "Company: "+companyName + "\n" +"Time: "+time+"\n"+ "High: "+high+ "\n" + "Low: "+low ;
msg.topic = "";
return msg;
Enter the below settings.
Connect the Magicbit board with the Magicblocks platform.
Enter the Device(Board) ID. you can see your device ID in the devices tab.
Comments
Please log in or sign up to comment.