I'm looking at the Alphavantage API here: https://www.alphavantage.co/documentation/
500 quotes/day for free.
Ideas:
Plugin Config
1. To preserve API calls, only call during market hours. (0930-1630 Eastern Time (probably shift this by 5-15 minutes)). Question: have the user provide the time zone or can I query this from Indigo/MacOS?
2. Allow user to select API query interval
3. User provide API key
Each ticker symbol is its own device.
1. On creation, resolve symbol name to stock name on the US market (doesn't work with their API for Indexes like DJI; maybe filter this out for the three major US indexes)
This API call returns multiple responses based on what is entered. Should I force the user to enter it correctly, or present some sort of menu on device creation allowing them to select from the array of responses? https://www.alphavantage.co/query?funct ... pikey=demo
Create the device; stock ticker as address; resolved name as device name.
2. Query at specified interval: https://www.alphavantage.co/query?funct ... pikey=demo
- Code: Select all
{
"Global Quote": {
"01. symbol": "IBM",
"02. open": "118.8000",
"03. high": "119.5700",
"04. low": "114.8700",
"05. price": "114.9400",
"06. volume": "5528913",
"07. latest trading day": "2020-04-07",
"08. previous close": "114.8200",
"09. change": "0.1200",
"10. change percent": "0.1045%"
}
}
if price is greater than open, display in green icon for device state; red if down.
Anybody have any other design ideas/suggestions? I'm not a developer by trade or training; more of a stackexchange and google hacker, but I have some time at the moment so may start tinkering with this.
Thanks