initial commit, copy code from jupyter notebook
This commit is contained in:
commit
26976c9476
2 changed files with 52 additions and 0 deletions
14
01_Börse/Boerse.py
Normal file
14
01_Börse/Boerse.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
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())
|
38
readme.md
Normal file
38
readme.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Data-Science Spielwiese
|
||||||
|
|
||||||
|
## Einleitung
|
||||||
|
Dieses Repository dient als Spielwiese um Data-Science Projekte umzusetzen und die Werkzeuge und Methoden kennenzulernen und auszuprobieren.
|
||||||
|
|
||||||
|
## Vorbereitung
|
||||||
|
https://code.visualstudio.com/docs/languages/python
|
||||||
|
- Python installieren
|
||||||
|
- https://www.python.org/downloads/
|
||||||
|
- Python Extensions installieren
|
||||||
|
- <code>python -m pip install </code>
|
||||||
|
- requests
|
||||||
|
- Visual Studio Code installieren
|
||||||
|
- PlugIn Markdown Preview Enhanced
|
||||||
|
- PlugIn Python installieren
|
||||||
|
- Git Projekt clonen
|
||||||
|
- ggf client, z.B. Fork benutzen
|
||||||
|
- Projekt clonen
|
||||||
|
|
||||||
|
## Erstes Testprojekt: Börsendaten
|
||||||
|
|
||||||
|
Als erster Test sollen Börsendaten ausgewertet werden
|
||||||
|
|
||||||
|
### Verwenden der API
|
||||||
|
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())
|
Loading…
Reference in a new issue