Project

General

Profile

Actions

ClientProject #2826

open

ClientProject #2825: [Module] : Korean Stock

[API] : API develop & Integration for korean stock

Added by Md.Sajib Ahmed 8 months ago. Updated 8 months ago.

Status:
Complete
Priority:
High
Target version:
Start date:
08/09/2025
Due date:
% Done:

100%

Estimated time:
8:00 h
Spent time:

Description

Tasks:

1. Implement All Korean Stock APIs

  • Set up API routes and fetch logic for all required endpoints.

  • Implement both:

    • Next.js API Routes (under /app/api/v1/korean-stock...)
    • Fetch Functions (server-side use)
  • API List to Integrate:

    • /makers-and-bodytypes
    • /models/?makerId=''
    • /products
    • /sitemap
    • /products/:id

2. Testing Purposes Only – No UI Design

  • Do not implement or style any design components.

  • The purpose of this task is to ensure that:

    • API endpoints are reachable
    • Data is correctly fetched
    • Fetch functions return typed responses

3. Create KoreanStock API Service Functions

  • Set up reusable fetcher functions inside services/korean-stock.ts

  • Write type-safe wrappers for each API with proper TypeScript interfaces or types

  • Examples:

    • getKoreanStockProducts()
    • getKoreanStockProductDetail(id: string)
    • etc.

4. Redis integration

  • Maintian contastaint file using key value pair. (/lib.constants.ts)
  MODELS: {
    KEY: (id: string) => `getKoreanModelCount-${id}`,
    EXPIRE_TIME_IN_SECONDS: 60 * 60, // 1 hour
  },
  PRODUCTS: {
    KEY: (searchParams: Record<string, string | number | string[]>) =>
      `getKoreanStockList-${JSON.stringify(searchParams)}`,
    EXPIRE_TIME_IN_SECONDS: 60 * 60, // 1 hour
  },
  PRODUCT_DETAIL: {
    KEY: (id: string) => `getKoreanProductDetails-${id}`,
    EXPIRE_TIME_IN_SECONDS: 60 * 60, // 1 hour
  },
  SITEMAP: {
    KEY: "getAllKoreanStockListForSeo",
    EXPIRE_TIME_IN_SECONDS: 60 * 60 * 24, // 24 hours
  },

Notes:

  • Ensure all API calls are async and handle error states gracefully.
  • Keep console logs or JSON previews for now (for verification).
  • This issue is preparatory — future issues will focus on UI rendering and interactivity.
Actions

Also available in: Atom PDF