Stock tiles piston


@markplewis Try this:

I am using a different API. The Documentation is on:

Also note that for some reason I had to set my GET type = form rather than JSON. I have no idea why this worked but the JSON GET did not.

There are two iterations within the Piston. One that runs hourly - won’t work right now due to ST issues. The second runs when i push test.

Start with this simple example and let me know how it goes.

Stock Market Tiles?
Stock Market Tiles?

Updated to reflect current stock price every 30 seconds relative to yesterdays close.


nice, wC is now a trading tool! :wink:

that’s 120 calls an hour per stock. these APIs dont rate limit do they?


So far no problem. Really had it at 30 sec because I am impatient and didn’t want to wait during testing.


That looks great, @ruhlmcu. I updated it to run every two hours and I’m going to use it to add additional symbols. Now i can see the weather, my lights and doors, and whether or not I can afford to buy more HA stuff! :grin:


Great idea! going to add this to my going list of tiles later this week


Thanks for the post. This turned out to be one of the pistons I didn’t know I wanted.

I’ve adjusted your original piston to handle multiple stocks and also to massage the company name and last update date. In the case of the company names some were so long the auto-sizing was making the text microscopic so I worked out some string magic to shorten the company names to better fit. I also shortened the last update date so I could fit in the change in price value.

Here’s my stock tracker v0.2 piston tiles:

I’m new to the community and this is my first larger piston modification. I’ll be happy to post the anonymized snapshot if there’s any interest.


This is cool, can you share code?


Unfortunately, IEX Trading stopped providing the underlying data feed so this piston is essentially dead for now. If you still want it I can see if I have the piston snapshot someplace but you’ll have to find a new source of pricing data.


Yeah, that would be great. I can find a diff data source.


Here’s the last revision of the stock tracker:

I’d be grateful if you let me see your revision should you get it working.

#12 has a free API (you must register). Unfortunately the returning JSON is horribly formatted with periods and spaces. Very difficult to parse so I had to get creative. Here is the code:

Note: My API Key is stored in a global variable @apiKEY. You can either create a global to store your own or just the place your key directly into the api string. The free API is limited to 5 calls per minute (500 per day) and each symbol is a separate call so max of 5 symbols per piston. Just space out multiple pistons by > 1 minute.