OHLC.dev editorialIDX

Global Impact Analysis RUPS Calendar Intelligence with Python Using IDX API

Global Impact Analysis & RUPS Calendar Intelligence is a Python-based workflow that combines data from the Global Impact Analysis API and the RUPS Calendar API to help investors monitor global market risks and upcoming corporate meetings in a single view. The workflow retrieves, normalizes, and analyzes data from both APIs to generate market intelligence that supports investment research, risk monitoring, and more informed decision-making.

May 31, 20264 min readRafatar
Global Impact Analysis RUPS Calendar Intelligence with Python Using IDX API

Global Impact Analysis & RUPS Calendar Intelligence

This tutorial demonstrates how to build a Global Impact Analysis & RUPS Calendar Intelligence workflow using Python and the Indonesia Stock Exchange (IDX) API.

The Global Impact Analysis & RUPS Calendar Intelligence approach combines global market risk monitoring with upcoming RUPS event tracking, allowing investors to generate more comprehensive market intelligence . Global market conditions and corporate meetings can strongly influence investor decisions in the Indonesian stock market.

This notebook demonstrates how to build a simple market intelligence workflow using two Indonesia Stock Exchange API endpoints:

  • getGlobalImpactAnalysis

  • getRupsCalendar

The goal is to combine global market risk information with upcoming RUPS events so investors can monitor external market pressure and corporate agenda in one workflow.

CELL 1 — Import Libraries

import requests
import pandas as pd
from IPython.display import display

Explanation

Cell 1 prepares the notebook environment.

The notebook imports:

  • requests for API communication

  • pandas for data processing

  • display to show dataframe output neatly in Google Colab

CELL 2 — Configure API

RAPIDAPI_KEY = "YOUR_API_KEY"

BASE_URL = "https://indonesia-stock-exchange-idx.p.rapidapi.com"

HEADERS = {
    "Content-Type": "application/json",
    "x-rapidapi-host": "indonesia-stock-exchange-idx.p.rapidapi.com",
    "x-rapidapi-key": RAPIDAPI_KEY
}

Explanation

Cell 2 configures the API connection.

The notebook defines the base URL and request headers required to access the Indonesia Stock Exchange API through RapidAPI.

The API key is stored in RAPIDAPI_KEY, while HEADERS is used for every request.

CELL 3 — Create API Caller Function

def call_api(endpoint):
    url = f"{BASE_URL}{endpoint}"
    response = requests.get(url, headers=HEADERS)

    if response.status_code == 200:
        return response.json()
    else:
        print("Error:", response.status_code)
        print(response.text)
        return None

Explanation

Cell 3 creates a reusable function for calling API endpoints.

The function receives an endpoint, sends a GET request, and returns the response in JSON format.

If the request fails, the function displays the error code and response message.

This makes the notebook cleaner because the same function can be reused for multiple APIs.

CELL 4 — Retrieve and Combine Two APIs

import time

def safe_call(endpoint, retries=3, delay=2):
    for attempt in range(retries):
        response = requests.get(
            f"{BASE_URL}{endpoint}",
            headers=HEADERS
        )

        if response.status_code == 200:
            return response.json()

        elif response.status_code == 429:
            print(f"Rate limit terkena. Menunggu {delay} detik...")
            time.sleep(delay)
            delay *= 2

        else:
            print("Error:", response.status_code)
            print(response.text)
            return None

    return None


global_impact = safe_call("/api/global/impact-analysis")

time.sleep(3)

rups_calendar = safe_call("/api/calendar/rups")

api_result = {
    "getGlobalImpactAnalysis": global_impact,
    "getRupsCalendar": rups_calendar
}

print("Data berhasil digabung")

Explanation

Cell 4 retrieves data from two API endpoints.

The notebook calls:

  • Global Impact Analysis API

  • RUPS Calendar API

The safe_call() function is used to handle rate limits. If the API returns status code 429, the notebook waits before retrying the request.

After both APIs are called, the responses are combined into one dictionary named api_result.

This combined structure makes the workflow easier to manage and analyze.

CELL 5 — Display API Results

print("Global Impact Analysis:")

if api_result["getGlobalImpactAnalysis"] is not None:
    display(pd.json_normalize(api_result["getGlobalImpactAnalysis"]))
else:
    print("Data Global Impact kosong / gagal diambil")


print("RUPS Calendar:")

rups_data = api_result["getRupsCalendar"]

if rups_data is None:
    print("Data RUPS kosong / gagal diambil")

elif isinstance(rups_data, dict):
    display(pd.json_normalize(rups_data))

elif isinstance(rups_data, list):
    display(pd.DataFrame(rups_data))

else:
    print("Format data RUPS tidak bisa langsung dinormalisasi:")
    print(type(rups_data))
    print(rups_data)

Explanation

Cell 5 displays the final result from both APIs.

For getGlobalImpactAnalysis, the notebook uses pd.json_normalize() to flatten the JSON response into a dataframe.

For getRupsCalendar, the notebook checks the data type first.

If the response is a dictionary, it is normalized using pd.json_normalize().

If the response is a list, it is converted directly into a dataframe using pd.DataFrame().

This conditional handling is important because different APIs may return different JSON structures.

Result:

result

OVERALL WORKFLOW

This notebook follows a simple market intelligence workflow.

First, it imports the required Python libraries.

Second, it configures API authentication using RapidAPI headers.

Third, it creates a reusable API caller function.

Fourth, it retrieves data from Global Impact Analysis and RUPS Calendar endpoints.

Fifth, it combines both API results into a single dictionary.

Finally, it displays both datasets in structured dataframe format.

WHY THIS CASE MATTERS

Investors do not only need stock price data.

They also need to understand external market risks and upcoming corporate events.

Global Impact Analysis helps investors monitor international events that may affect Indonesian stocks.

RUPS Calendar helps investors track shareholder meetings, corporate decisions, and important company agendas.

By combining both APIs, investors can better understand market conditions from two perspectives:

  • Global risk and macro sentiment

  • Corporate event schedule

This creates a more complete investment monitoring workflow.

CONCLUSION

This Global Impact Analysis & RUPS Calendar Intelligence project provides a practical framework for investors, analysts, and fintech developers to monitor external market risks and corporate events from a single workflow.
This tutorial demonstrates how to combine getGlobalImpactAnalysis and getRupsCalendar using Python.

The notebook retrieves global market impact data, collects RUPS calendar information, handles API rate limits, combines the responses, and displays the results in dataframe format.

The final workflow provides:

  • Global impact monitoring

  • RUPS event tracking

  • API response normalization

  • Market intelligence reporting

  • Investor decision support

Ultimately, this project is not only about calling two APIs.

It is about transforming API data into useful market intelligence for investors, analysts, and fintech developers.