Post

Analyzing Stock data Using Django and React [Part 2]

Django

Github : KRX

1. Natural Language (NLP)

  • Using spaCy, I built a function to extract a stock name (company name) and a price threshold

  • For exmaple, If i ask “What did Apple stock price exceed 120 dollars?”

    then the query was processed to find a company (Apple) and price (120)

2. APIs

  • Using yfinance, fetch historical stock data

  • I also used the Polygon API to fetch real-time stock tickers dynamically.

    Resolve the company name to the correct ticker

React

Github : KRX-frontend

1. JWT Token Interceptors

  • Create a axiosInstance.js with an interceptor

    Automatically attached to the Authorization header for every request

2. 401 Unauthorization

  • Ensure that the token is correctly stored in localStorage after login

3. Difference Between <div> and <route>

1. Div

  • Used for grouping content together for layout purpose

    1
    2
    3
    4
    
     <div>
        <h1>Welcome to My Website</h1>
        <p>This is a sample paragraph.</p>
     </div>
    

2. Route

  • It is part of React Router

  • It defines a path in the app and tells React Router which component to render when the URL matchs that path

This post is licensed under CC BY 4.0 by the author.