/luse_graph

Lisa Graph: A Django-based GraphQL API for querying Lusaka Stock Exchange data. Built with Python, PostgreSQL, and JWT tokens for security. Precise, efficient, and easy integration. Explore financial insights effortlessly.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Lisa Graph API Documentation

LISA GRAPH
Lisa Graph, a robust Django-powered GraphQL API, facilitates seamless querying of Lusaka Stock Exchange data. The API offers a single query with optional filters (start, end, single_date, date) that fetches data in descending order by default.

Getting Started

  1. Installation:
    git clone https://github.com/suwilanji-chipofya-hadat/lisa_graph
    cd lisa_graph
    pip install -r requirements.txt
    make init # runs initial migrations (you can run individual commands in the makefile if you don't have make command available)
    make run # or
    python manage.py runserver

NOTE: CHANGE THE DATABASE CONFIGURATIONS IN THE settings.py file

WILL SOON PROVIDE ACCESS TO A PUBLIC DEVELOPMENT DATABASE

Query

Retrieve Data

query {
  stockData(start: "2022-01-01", end: "2022-12-31", single_date: true, date: "2022-06-30") {
    # Fields to retrieve
    id
    name
    value
    date
  }
}
  • start (optional): Start date for data filtering.
  • end (optional): End date for data filtering.
  • single_date (optional): Boolean flag for single-date retrieval.
  • date (optional): Specific date for single-date retrieval.

IF NONE OF THE OPTIONAL PARAMETERS ARE PROVIDED THE API RETURNS ALL THE DATA

PAGINATION NOT YET SUPPORTED BUT WILL BE ADDED IN NO TIME

Work Done

  • ✔️ Implemented single GraphQL query.
  • ✔️ Added optional date filters.
  • ✔️ Data retrieval in descending order by default.
  • ✔️ User authentication using JWT tokens.

Future Work

  • ☑️ Add support for news data from diffrent news platforms.
  • ☑️ AI finance forecasts.
  • ☑️ Blogging feature.
  • ☑️ Forums.

WOULD LOVE TO SEE YOUR PARTICIPATION IN THIS PROJECT

FORK THE REPO AND ADD YOUR UPDATES WILL REVIEW AND ADD AS SOON AS POSSIBLE