{"id":47837254,"url":"https://github.com/nichsedge/idx-bei","last_synced_at":"2026-04-03T20:34:05.203Z","repository":{"id":255016212,"uuid":"848234199","full_name":"nichsedge/idx-bei","owner":"nichsedge","description":"Indonesia Stock Exchange (Bursa Efek Indonesia) Scraper","archived":false,"fork":false,"pushed_at":"2026-03-02T12:22:14.000Z","size":3224,"stargazers_count":56,"open_issues_count":0,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-02T16:19:55.609Z","etag":null,"topics":["bei","bursa-efek-indonesia","financial-data","idx","idx-api","indonesia-stock-exchange","nodejs","stock-data"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nichsedge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-27T11:41:54.000Z","updated_at":"2026-03-02T12:20:58.000Z","dependencies_parsed_at":"2025-05-10T09:28:13.710Z","dependency_job_id":"8cd7c8a1-701f-4f0b-aac3-f40d22b8a316","html_url":"https://github.com/nichsedge/idx-bei","commit_stats":null,"previous_names":["ichsanulamal/idx-bei","nichsedge/idx-bei"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nichsedge/idx-bei","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichsedge%2Fidx-bei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichsedge%2Fidx-bei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichsedge%2Fidx-bei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichsedge%2Fidx-bei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichsedge","download_url":"https://codeload.github.com/nichsedge/idx-bei/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichsedge%2Fidx-bei/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31375769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bei","bursa-efek-indonesia","financial-data","idx","idx-api","indonesia-stock-exchange","nodejs","stock-data"],"created_at":"2026-04-03T20:34:05.057Z","updated_at":"2026-04-03T20:34:05.175Z","avatar_url":"https://github.com/nichsedge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IDX-BEI Data Analysis Toolkit\n\nA comprehensive toolkit for fetching, processing, and analyzing data from the Indonesia Stock Exchange (IDX / Bursa Efek Indonesia). This project provides scrapers for market data, company profiles, and financial ratios, with integration into Neo4j for network analysis and PostgreSQL for financial modeling.\n\n![Neo4j Network Analysis](neo4j-network-analysis.png)\n\n## 🚀 Features\n\n- **Data Scraping**: Efficiently fetch data from the official IDX API using `curl_cffi` to handle rate limiting and browser emulation.\n- **Graph Analysis**: Ingest company data into **Neo4j** to visualize and query relationships between companies, directors, commissioners, and shareholders.\n- **Financial Ratios**: Process and analyze financial ratios with support for PostgreSQL ingestion.\n- **iXBRL Parser**: Extract data from inline XBRL financial reports.\n- **Yahoo Finance Integration**: Supplemental market data via `yfinance`.\n\n## 🛠️ Tech Stack\n\n- **Language**: Python 3.13+\n- **Database**: Neo4j (Graph), PostgreSQL (Relational)\n- **Tools**: `uv` for package management, Docker for database services.\n- **Libraries**: `pandas`, `sqlalchemy`, `neo4j`, `matplotlib`, `seaborn`, `scikit-learn`.\n\n## 📋 Prerequisites\n\n- **Python 3.13+** (Recommended: [uv](https://github.com/astral-sh/uv))\n- **Docker \u0026 Docker Compose** (for Neo4j)\n\n## 🚀 Getting Started\n\n### 1. Clone the repository\n```bash\ngit clone https://github.com/yourusername/idx-bei.git\ncd idx-bei\n```\n\n### 2. Set up the Environment\nWe use `uv` for fast, reliable Python dependency management.\n\n```bash\ncd python\nuv sync\n```\n\n### 3. Start Database Services\nUse Docker Compose to spin up a Neo4j instance:\n\n```bash\ndocker compose up -d\n```\nNeo4j will be available at:\n- Web UI: http://localhost:7474\n- Bolt: bolt://localhost:7687\n- Default Login: `neo4j` / `password`\n\n### 4. Running Scrapers\nThe `python/` directory contains various scripts for data collection:\n\n```bash\n# Scrape all company profiles\nuv run scrape_company_profiles.py\n\n# Scrape financial ratios\nuv run scrape_financial_ratio.py\n\n# Scrape broker search results\nuv run scrape_broker_search.py\n```\n\n### 5. Graph Ingestion \u0026 Analysis\nOpen the Jupyter notebook for Neo4j ingestion and network analysis:\n\n```bash\ncd python\nuv run jupyter notebook neo4j.ipynb\n```\n\n## 📁 Repository Structure\n\n```text\nidx-bei/\n├── data/                  # Stored JSON data (ignored by git in production)\n├── docker-compose/        # Docker service configurations\n├── docker-compose.yml     # Main docker-compose file\n├── python/                # Core Python scripts and notebooks\n│   ├── scrape_*.py        # Data collection scripts\n│   ├── neo4j_ingest.py    # Script to push data to Neo4j\n│   ├── neo4j.ipynb        # Main analysis \u0026 ingestion notebook\n│   └── pyproject.toml     # Python dependencies (managed by uv)\n└── LICENSE                # MIT License\n```\n\n## 📊 Data Insights\n\nThe Neo4j integration allows for powerful queries, such as:\n- Identifying interlocking directorates (insiders holding positions in multiple companies).\n- Mapping complex ownership structures and ultimate beneficiaries.\n- Tracking historical trading performance against corporate actions.\n\nExample Cypher query to find insider ownership:\n```cypher\nMATCH (i:Insider)-[owns:OWNS]-\u003e(c:Company)-[:HAS_TRADE_DAY]-\u003e(td:TradeDay)\nWITH i, owns.jumlah AS sharesOwned, c, td.close AS latestClosePrice\nWITH i, sum(sharesOwned * latestClosePrice) AS totalValue\nRETURN i.name AS InsiderName, totalValue\nORDER BY totalValue DESC\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n---\n*Disclaimer: This project is for educational and research purposes only. Ensure you comply with IDX terms of service when using these scripts.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichsedge%2Fidx-bei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichsedge%2Fidx-bei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichsedge%2Fidx-bei/lists"}