14 lines
521 B
Python
14 lines
521 B
Python
|
import requests
|
||
|
|
||
|
url = "https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v3/get-chart"
|
||
|
|
||
|
querystring = {"interval":"5m","symbol":"AMZN, NVDA","range":"2mo","region":"US","includePrePost":"false","useYfid":"true","includeAdjustedClose":"true","events":"capitalGain,div,split"}
|
||
|
|
||
|
headers = {
|
||
|
"X-RapidAPI-Key": "4ee0ea9302msha813023b990f6c9p19d2cdjsncf3e2b4f3191",
|
||
|
"X-RapidAPI-Host": "apidojo-yahoo-finance-v1.p.rapidapi.com"
|
||
|
}
|
||
|
|
||
|
response = requests.get(url, headers=headers, params=querystring)
|
||
|
|
||
|
print(response.json())
|