Use cases › Market Dashboards

Build an Indonesian market dashboard

IHSG from IDX, the JISDOR rate from Bank Indonesia, Antam gold and Indodax crypto prices, from one API.

Finance4 sources
  1. 01
    Pick the numbers

    The IHSG index from IDX, the USD/IDR JISDOR rate, Antam’s gold price list and Indodax tickers.

  2. 02
    Refresh on a timer

    Call each endpoint every few minutes or every hour. Each source has its own short cache.

  3. 03
    Show them in one place

    Write the values to a sheet, a database or your own dashboard page.

import os, requests

KEY = os.environ["ZAPI_KEY"]

def get(path, **params):
    r = requests.get(
        "https://api.zapi.ink/v1/finance:" + path,
        params=params,
        headers={"x-api-key": KEY},
        timeout=60,
    )
    return r.json()["data"]

ihsg = next(i for i in get("idx/index-summary")["data"] if i["IndexCode"] == "COMPOSITE")
usd = get("bi-kurs/jisdor")["items"][0]
gold = next(
    b for b in get("antam/harga", metal="gold")["items"]
    if b["series"] == "Emas Batangan" and b["weightGram"] == 1
)
btc = get("indodax/ticker", pair="btc_idr")

print("IHSG", ihsg["Close"], ihsg["Change"])
print("USD/IDR", usd["rate"], usd["date"])
print("Antam 1 g", gold["basePrice"])
print("BTC/IDR", btc["last"])

What you get

Example output
InstrumentSourceAs ofZapLatest
IHSG (Composite)IDX12 Jun 202656,007.66
USD/IDR (JISDOR)Bank Indonesia31 Jul 20261Rp18,058
Antam gold bar, 1 gAntam21 Aug 20261Rp2,725,000
BTC/IDRIndodax21 Aug 20261Rp1,317,914,000

Questions

How fresh are the numbers?

Answers are cached briefly: 15 seconds for the Indodax ticker, 60 seconds for IDX summaries, 5 minutes for JISDOR and 1 hour for the Antam price list. IDX summaries default to the latest trading day; pass a date for an earlier one.

Can I draw history charts?

Yes. Use IDX stock-history, JISDOR with startDate and endDate, and Indodax klines for candles.

Can I show these prices to my users?

Check each publisher’s terms first and use the data within our Acceptable Use Policy. Zapi passes on what IDX, Bank Indonesia, Antam and Indodax publish.

Which other markets can I add?

The finance category also has sources such as Pegadaian gold, Tokocrypto, Pintu, Yahoo Finance and TradingView.

Start building today.

Free key, 600 Zap a month and one response shape for every source.