IDX REST Wrapper
REST API data pasar saham & indeks IDX. Base URL: https://idx.anci.web.id
Buka Aplikasi Grafik & Analisa →
Daftar Endpoint
| Method | Path | Keterangan |
|---|---|---|
| GET | /health | Cek status service |
| GET | /api/saham/:code | Full: quote + semua bar OHLC |
| GET | /api/saham/:code/quote | Snapshot harga terakhir |
| GET | /api/saham/:code/bars | Bar OHLC (+ query filter) |
| GET | /api/saham/:code/indicators | Indikator teknikal |
| GET | /api/saham/:code/analysis | Sinyal + skor + support/resistance |
| GET | /api/saham/:code/fundamentals | Laporan keuangan: laba-rugi, neraca, arus kas, rasio/valuasi |
| GET | /api/saham/:code/dividends | Ringkasan + riwayat dividen |
| GET | /api/saham/:code/history | Riwayat snapshot harian dari database (D1) |
| GET | /api/compare | Perbandingan beberapa emiten (tabel teknikal + fundamental + dividen) |
| GET | /api/history | Riwayat snapshot beberapa emiten |
Parameter
:code = kode emiten/indeks, mis. IHSG, BBRI, BBCA, TLKM.
/bars: range=1D|1M|3M|6M|YTD|1Y|2Y|3Y|5Y|MAX, limit=, from=/to= (epoch ms), format=csv.
/indicators: sma=20,50, ema=12,26, rsi=14, macd=12,26,9, stoch=14,3,3, bb=20,2, atr=14, adx=14, limit=.
/compare & /history: codes=BBRI,BBCA,TLKM (maks 8), range=, days=.
Snapshot harian tersimpan otomatis di Cloudflare D1 setiap data diambil. UI perbandingan: /compare.
Contoh
curl https://idx.anci.web.id/api/saham/IHSG/quote curl "https://idx.anci.web.id/api/saham/BBRI/bars?range=3M" curl "https://idx.anci.web.id/api/saham/BBRI/indicators?sma=20,50&rsi=14&limit=30" curl "https://idx.anci.web.id/api/saham/BBCA/bars?format=csv" -o bbca.csv curl https://idx.anci.web.id/api/saham/IHSG/analysis curl https://idx.anci.web.id/api/saham/BBRI/fundamentals curl https://idx.anci.web.id/api/saham/BBRI/dividends curl "https://idx.anci.web.id/api/compare?codes=BBRI,BBCA,TLKM&range=1Y" curl "https://idx.anci.web.id/api/history?codes=BBRI,BBCA&days=30"