GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NeaByteLab/IDX-API: Indonesian Stock Exchange API wrapper for trading data integration.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
sample
sample
 
 
src
src
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Cron.ts
Cron.ts
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
USAGE.md
USAGE.md
 
 
deno.json
deno.json
 
 
drizzle.config.json
drizzle.config.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Indonesian Stock Exchange API Wrapper

A data pipeline for the Indonesian Stock Exchange (IDX). Built with Deno and Drizzle ORM to sync official market data into a structured SQLite database. It includes automated retries for network stability and provides modules for company info, indices, and trading data.

Deno SQLite Drizzle

Module type: Deno/ESM License

Features

  • Automated Sync - Scheduled data synchronization with retry logic
  • Official IDX Data - Direct integration with Indonesian Stock Exchange APIs
  • Structured Storage - SQLite database with Drizzle ORM for type-safe queries

Installation

Note

Prerequisites: For Deno (install from deno.com).

Tip

Want to see the data in action? Check out IDX-UI - the interactive dashboard for your market data!

Clone Repository:

# Clone the repository
git clone https://github.com/NeaByteLab/IDX-API.git

# Enter the project directory
cd IDX-API/

# Initialize the database (Drizzle generate & push)
deno task db:sync

Requirements:

  • Deno (v2.5.0 or higher recommended)
  • Git (for cloning the repository)

Technology Stack

  • Runtime: Deno (Modern, Secure, High-Performance)
  • Database: SQLite via LibSQL Client
  • ORM: Drizzle ORM (Type-Safe SQL ORM)

Architecture Overview

flowchart TD
    %% Define Nodes
    A[(Local SQLite DB)]:::db
    B(Drizzle Schema Sync):::process
    C[IDX API Endpoints]:::api
    D(BaseClient Fetcher):::process
    E{Data Valid?}:::decision
    F(Data Processing):::process
    G(Drizzle Upsert):::process
    H[Your Application / CLI]:::app

    %% Define Flow
    B -->|Setup Tables| A
    C -.->|HTTP Res| D
    D -->|Raw JSON| E
    E -->|No: Retry| D
    E -->|Yes: Parse| F
    F -->|Clean Data| G
    G -->|Store| A
    A -->|Query| H

    %% Styling
    classDef db fill:#e0f7fa,stroke:#006064,stroke-width:2px,color:#000000;
    classDef process fill:#f5f5f5,stroke:#9e9e9e,color:#000000;
    classDef api fill:#fff3e0,stroke:#e65100,stroke-dasharray: 5 5,color:#000000;
    classDef decision fill:#e8f5e9,stroke:#2e7d32,color:#000000,shape:rhombus;
    classDef app fill:#ede7f6,stroke:#4527a0,stroke-width:2px,color:#000000;
Loading

Quick Start

import * as sync from '@app/Backend/Sync/index.ts'
import IDXClient from '@app/index.ts'

// Initialize database (run once)
await sync.dbInitialize()

// Sync company profiles
await sync.syncCompanyProfile()

// Get current market data
const client = new IDXClient()
const indices = await client.market.getIndexList()
const stockSummary = await client.trading.getStockSummary('20240220')

For detailed usage examples, see USAGE.md.

Module Overview

Corporate Modules:

  • syncCompanyProfile() - Company metadata and profiles
  • syncCompanyAnnouncement() - Corporate news and announcements
  • syncFinancialRatio() - Financial indicators (PER, PBV, ROE, DER)
  • syncFinancialReport() - Detailed financial reports
  • syncCompanyDividend() - Dividend payment data
  • syncStockSplit() - Stock split events
  • syncNewListing() - IPO and new listings
  • syncCompanyDelisting() - Delisted companies

Market Modules:

  • syncDailyIndex() - Daily index performance
  • syncIndexList() - Current index prices
  • syncIndexSummary() - Daily index snapshots
  • syncForeignTrading() - Foreign investor flows
  • syncTopGainer() - Top gaining stocks
  • syncTopLoser() - Top losing stocks

Trading Modules:

  • syncStockSummary() - Daily OHLC and volume data
  • syncTradeSummary() - Market aggregate data
  • syncBrokerSummary() - Broker trading activity
  • syncTradingDaily() - Real-time price snapshots
  • syncTradingSS() - Historical trading data

Participants Modules:

  • syncBrokerParticipant() - Exchange member brokers
  • syncDealerParticipant() - Primary dealers
  • syncProfileParticipant() - Participant profiles

General Modules:

  • syncMarketCalendar() - Trading holidays and events
  • syncSecurityStock() - Master security list

Project Structure

.
├── src/                  # Core modules and backend implementation
│   ├── Backend/          # Task automation, schemas, and sync logic
│   ├── Company/          # Corporate information endpoints
│   ├── Market/           # Market and index endpoints
│   ├── Participants/     # Broker and dealer endpoints
│   ├── Statistics/       # Stock activity endpoints
│   ├── Trading/          # Trading summary endpoints
│   └── Client.ts         # Main API client wrapper
├── tests/                # Deno unit test suites
├── sample/               # Generator for sample documentation
└── data/                 # SQLite database storage

License

This project is licensed under the MIT license. See the LICENSE file for more info.

About

Indonesian Stock Exchange API wrapper for trading data integration.

www.idx.co.id

Topics

api-wrapperdata-analysisdata-pipelinedenodrizzle-ormfinancefinancial-datafintechidxidx-apiihsgindonesian-stock-exchangejakarta-stock-exchangemarket-datasecuritiessqlitestock-marketstock-quotestrading-apitypescript

Resources

Readme
MIT license
Activity

Stars

102 stars

Watchers

1 watching

Forks

33 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.