Get US stock price from Python with Web API with Raspberry Pi

Previously, I tried to get the US stock price using Postman, but this time I tried to get it from Raspberry Pi using Python to divert it to application creation.

Get US Stocks Using Rapid API with Postman https://qiita.com/ShinPun/items/cc9a124e3bc64b4d3893

Python code

Please refer to the above article for how to get apikey.

import requests

url = "https://www.alphavantage.co/query"

querystring = {"interval":"5min","function":"TIME_SERIES_INTRADAY","symbol":"MSFT","datatype":"json","output_size":"compact","apikey":"XXXXXXYYYYYYYZZZZZZZ"}

response = requests.request("GET", url,params=querystring)

print(response.text)

Acquisition result

Python 3.7.3. Run-time screen. I was able to get the stock price every 5 minutes.

image.png

Recommended Posts

Get US stock price from Python with Web API with Raspberry Pi
Get stock price data with Quandl API [Python]
Get stock price with Python
Get CPU information of Raspberry Pi with Python
Let's do web scraping with Python (stock price)
Get schedule from Garoon SOAP API with Python + Zeep
Web API with Python + Falcon
I tried connecting Raspberry Pi and conect + with Web API
Get data from analytics API with Google API Client for python
Get Japanese stock price information from yahoo finance with pandas
Use vl53l0x with Raspberry Pi (python)
Get reviews with python googlemap api
Get web screen capture with python
Get upcoming weather from python weather api
[Note] Using 16x2-digit character LCD (1602A) from Python with Raspberry Pi
Collecting information from Twitter with Python (Twitter API)
[Python] Web application from 0! Hands-on (3) -API implementation-
Get html from element with Python selenium
[Note] Get data from PostgreSQL with Python
Python: Reading JSON data from web API
Download Japanese stock price data with python
Get BITCOIN LTP information with Raspberry PI
[Python] Get Python package information with PyPI API
Working with GPS on Raspberry Pi 3 Python
Try tweeting arXiv's RSS feed on twitter from Raspberry Pi with python
Discord bot with python raspberry pi zero with [Notes]
I tried L-Chika with Raspberry Pi 4 (Python edition)
Get Gmail subject and body with Python and Gmail API
Get temperature and humidity with DHT11 and Raspberry Pi
Stock investment analysis app made with Raspberry Pi
Get only articles from web pages in Python
Connect to MySQL with Python on Raspberry Pi
Extract data from a web page with Python
GPS tracking with Raspberry Pi 4B + BU-353S4 (Python)
Measure CPU temperature of Raspberry Pi with Python
Data acquisition from analytics API with Google API Client for python Part 2 Web application
Get users belonging to your organization from Garoon REST API with Python + Requests
Get the stock price of a Japanese company with Python and make a graph
From setting up Raspberry Pi to installing Python environment
[First API] Try to get Qiita articles with Python
GPGPU with Raspberry Pi
[Python] Get the text of the law from the e-GOV Law API
Try debugging Python on Raspberry Pi with Visual Studio.
Python beginners get stuck with their first web scraping
Use kintone API SDK for Python on Raspberry Pi (easily store data in kintone from Raspberry Pi)
Get mail from Gmail and label it with Python3
Ubuntu 20.04 on raspberry pi 4 with OpenCV and use with python
[Time series with plotly] Dynamic visualization with plotly [python, stock price]
Get date with python
Face detection from images taken with Raspberry Pi camera
DigitalSignage with Raspberry Pi
[Python] Get user information and article information with Qiita API
"Getting stock price time series data from k-db.com with Python" Program environment creation memo
Get data from database via ODBC with Python (Access)
Display USB camera video with Python OpenCV with Raspberry Pi
Let's operate GPIO of Raspberry Pi with Python CGI
Raspberry Pi with Elixir, which is cooler than Python
[Raspberry Pi] Scraping of web pages that cannot be obtained with python requests + Beautiful Soup
Update Python for Raspberry Pi to 3.7 or later with pyenv
Create a web surveillance camera with Raspberry Pi and OpenCV
Programming history 1 month Extract NY Dow stock price with Python!