Dear Stata forum,
I want to download the following JSON file into stata "https://query1.finance.yahoo.com/v8/finance/chart/AAPL?symbol=AAPL&period1=1501560000&period2=999999 9999&interval=3mo&events=div%2Csplit"
It is just the standard yahoo api and I have run into problems using the insheetjson command I keep getting the following error variable result not found
I have been using the following code...
This is the bit of the JSON file I am interested in...
{"dividends":{"1509508800":{"amount":0.63,"date":1 510324200},"1517461200":{"amount":0.63,"date":1518 186600},"1501560000":{"amount":0.63,"date":1502371 800},"1525147200":{"amount":0.73,"date":1526045400 }} Thanks
Giles
I want to download the following JSON file into stata "https://query1.finance.yahoo.com/v8/finance/chart/AAPL?symbol=AAPL&period1=1501560000&period2=999999 9999&interval=3mo&events=div%2Csplit"
It is just the standard yahoo api and I have run into problems using the insheetjson command I keep getting the following error variable result not found
I have been using the following code...
Code:
clear gen amount = "" gen date = "" insheetjson result amount date using "https://query1.finance.yahoo.com/v8/finance/chart/AAPL?symbol=AAPL&period1=1501560000&period2=9999999999&interval=3mo&events=div%2Csplit", table(dividends) col("date" "amount")
{"dividends":{"1509508800":{"amount":0.63,"date":1 510324200},"1517461200":{"amount":0.63,"date":1518 186600},"1501560000":{"amount":0.63,"date":1502371 800},"1525147200":{"amount":0.73,"date":1526045400 }} Thanks
Giles
Comment