After spending most of the day working on this I managed to find an API that provides stock market info and send a request to it. It looks like I’m getting a valid response but I have been unable to figure out how to access the individual elements in the response. I looked at any example pistons I could find and have tried multiple permutations but haven’t been successful. I searched the WebCoRE wiki for JSON and get “There were no results matching the query.”
Does anyone know how I go about grabbing individual data elements from the data that’s being returned? I’ve researched the format of a json response but what I’m getting back doesn’t seem to match the format that’s described in what I’ve read.
Any help is appreciated.
The piston that makes the call:
Here’s the log (what I see in a browser is below this):
11/3/2017, 6:54:24 PM +288ms
+0ms ╔Received event [Home].time = 1509756865289 with a delay of -1001ms
+139ms ║RunTime Analysis CS > 18ms > PS > 66ms > PE > 51ms > CE
+158ms ║Runtime (37373 bytes) successfully initialized in 66ms (v0.2.0f9.20171007) (156ms)
+161ms ║╔Execution stage started
+177ms ║║Cancelling statement #2’s schedules…
+198ms ║║Sending external web request to: www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=DJI&apikey=xxxxxxxxxxxxxxx
+626ms ║║Executed virtual command httpRequest (431ms)
+651ms ║║Meta Data:[5. Time Zone:US/Eastern, 2. Symbol:Dow Jones Industrial Average Index, 1. Information:Daily Time Series with Splits and Dividend Events, 3. Last Refreshed:2017-11-03, 4. Output Size:Compact], Time Series (Daily):2017-09-05:[3. low:21709.6309, 4. close:21753.3105, 5. adjusted close:21753.3105, 2. high:21921.0898, 6. volume:332840000, 1. open:21912.3691, 8. split coefficient:1.0000, 7. dividend amount:0.0000], 2017-09-06:[3. low:21794.0703, 4. close:21807.6406, 5. adjusted close:21807.6406, 2. high:21849.2402, 6. volume:318760000, 1. open:21815.7598, 8. split coefficient:1.0000, 7. dividend amount:0.0000], 2017-09-07:[3. low:21745.7109, 4. close:21784.7793, 5. adjusted close:21784.7793, 2. high:21850.0098, 6. volume:333810000, 1. open:21820.3809, 8. split coefficient:1.0000, 7. dividend amount:0.0000], 2017-09-08:[3. low:21731.1191, 4. close:21797.7891, 5. adjusted close:21797.7891, 2. high:21846.6309, 6. volume:289400000, 1. open:21764.4297, 8. split coefficient:1.0000, 7. dividend amount:0.0000],…[TRUNCATED]
+652ms ║║Executed virtual command log (9ms)
+656ms ║╚Execution stage complete. (498ms)
+658ms ║Setting up scheduled job for Fri, Nov 3 2017 @ 6:55:25 PM MDT (in 60.344s)
+872ms ╚Event processed successfully (872ms)
What I see in a browser:
{
“Meta Data”: {
“1. Information”: “Daily Time Series with Splits and Dividend Events”,
“2. Symbol”: “Dow Jones Industrial Average Index”,
“3. Last Refreshed”: “2017-11-03”,
“4. Output Size”: “Compact”,
“5. Time Zone”: “US/Eastern”
},
“Time Series (Daily)”: {
“2017-11-03”: {
“1. open”: “23549.5898”,
“2. high”: “23557.0605”,
“3. low”: “23481.5703”,
“4. close”: “23539.1895”,
“5. adjusted close”: “23539.1895”,
“6. volume”: “312254782”,
“7. dividend amount”: “0.0000”,
“8. split coefficient”: “1.0000”
},
“2017-11-02”: {
“1. open”: “23463.2402”,
“2. high”: “23531.3809”,
“3. low”: “23350.9805”,
“4. close”: “23516.2598”,
“5. adjusted close”: “23516.2598”,
“6. volume”: “348040000”,
“7. dividend amount”: “0.0000”,
“8. split coefficient”: “1.0000”
},
“2017-11-01”: {
“1. open”: “23442.9004”,
“2. high”: “23517.7109”,
“3. low”: “23388.9102”,
“4. close”: “23435.0098”,