Skip to main content

Use Finnhub API data with Plotly Library for Python

Technical Summary of Jupyter Notebook for Stock Data Analysis

Setting Up the Environment

  - Imports: Essential libraries are imported:
  - plotly for interactive plotting.
  - pandas for data manipulation.
  - jproperties for configuration management.
  - finnhub to access Finnhub's API.
  - datetime for handling date and time data.

pip install panda plotly jproperties

Requirement already satisfied: panda in /opt/conda/lib/python3.10/site-packages (0.3.1)
Requirement already satisfied: plotly in /opt/conda/lib/python3.10/site-packages (5.22.0)
Requirement already satisfied: jproperties in /opt/conda/lib/python3.10/site-packages (2.1.1)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.10/site-packages (from panda) (67.7.2)
Requirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from panda) (2.31.0)
Requirement already satisfied: tenacity>=6.2.0 in /opt/conda/lib/python3.10/site-packages (from plotly) (8.2.2)
Requirement already satisfied: packaging in /opt/conda/lib/python3.10/site-packages (from plotly) (23.1)
Requirement already satisfied: six~=1.13 in /opt/conda/lib/python3.10/site-packages (from jproperties) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->panda) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->panda) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->panda) (2.0.2)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->panda) (2023.5.7)
Note: you may need to restart the kernel to use updated packages
pip install finnhub-python

Collecting finnhub-python
  Downloading finnhub_python-2.4.19-py3-none-any.whl (11 kB)
Requirement already satisfied: requests>=2.22.0 in /opt/conda/lib/python3.10/site-packages (from finnhub-python) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests>=2.22.0->finnhub-python) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests>=2.22.0->finnhub-python) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests>=2.22.0->finnhub-python) (2.0.2)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests>=2.22.0->finnhub-python) (2023.5.7)
Installing collected packages: finnhub-python
Successfully installed finnhub-python-2.4.19
Note: you may need to restart the kernel to use updated packages.

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Files


- Jupyler Notebook file :
- Config File :


Source: https://medium.com/@sugath.mudali/plot-recommendation-trends-from-finnhub-using-plotly-library-for-python-6487a9c9e4ec