OHLC.dev editorialIDX

IPO Calendar Global Impact Analysis Python API Guide

Learn ipo calendar global impact analysis Python API step by step using real financial market data. This guide explains how to fetch IPO calendar data, process global impact analysis, visualize IPO trends, compare final IPO prices, analyze active global events, and generate market insights using Python in Google Colab.

May 10, 20265 min readRafatar
IPO Calendar Global Impact Analysis Python API Guide

ipo calendar global impact analysis Python API is a practical way to understand IPO activity and global market risk using real API data. IPO data helps us track companies entering the stock market, while global impact analysis helps identify active global events, recommendations, overall risk, and market summaries.

In this tutorial, we will use Python in Google Colab to fetch IPO Calendar data and Global Impact Analysis data from an API. Then, we will convert the data into tables, inspect the structure, visualize IPO trends, analyze IPO prices, and summarize the final market insight.

This guide is written for beginners, so every cell is explained in simple language

Cell 1 — Import Libraries

import requests
import pandas as pd
import matplotlib.pyplot as plt

This cell imports the main libraries used in the notebook.

requests is used to fetch data from the API. pandas is used to process JSON data into table format. matplotlib.pyplot is used to create charts.

Cell 2 — API Key and Headers

RAPIDAPI_KEY = "YOUR_RAPIDAPI_KEY_HERE"

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

This cell prepares the API authentication.

The RAPIDAPI_KEY is your private access key. The headers variable tells the API that the request uses JSON format and includes the RapidAPI host and key.

Never publish your real API key in a public article.

Cell 3 — Define API URLs

ipo_url = "https://indonesia-stock-exchange-idx.p.rapidapi.com/api/calendar/ipo"
global_impact_url = "https://indonesia-stock-exchange-idx.p.rapidapi.com/api/global/impact-analysis"

This cell defines two API endpoints.

ipo_url is used to get IPO Calendar data. global_impact_url is used to get Global Impact Analysis data.

Cell 4 — Create API Request Function

import time

def get_api_data(url):
    time.sleep(2)  # delay 2 detik

    response = requests.get(url, headers=headers)

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

This cell creates a reusable function to fetch API data.

The time.sleep(2) line adds a 2-second delay before sending a request. This helps reduce the chance of hitting API rate limits.

If the response status code is 200, the function returns JSON data. If the request fails, it prints the error message and returns None.

Cell 5 — Fetch IPO and Global Impact Data

ipo_data = get_api_data(ipo_url)
global_impact_data = get_api_data(global_impact_url)

This cell calls the function created earlier.

ipo_data stores the IPO Calendar response. global_impact_data stores the Global Impact Analysis response.

Cell 6 — Convert IPO Data into DataFrame

ipo_list = ipo_data["data"]["data"]["ipo"]

df_ipo = pd.DataFrame(ipo_list)

df_ipo.head()

This cell extracts IPO data from the JSON response and converts it into a pandas DataFrame.

A DataFrame is like a table in Python. df_ipo.head() displays the first few rows so we can preview the IPO data.

Cell 7 — Convert Global Impact Data into DataFrames

df_events = pd.DataFrame(global_impact_data["data"]["activeEvents"])
df_recommendations = pd.DataFrame(global_impact_data["data"]["recommendations"])

df_events.head()

This cell converts Global Impact Analysis data into two DataFrames.

df_events stores active global events. df_recommendations stores recommendations from the API.

The df_events.head() line displays the first few rows of active event data.

Cell 8 — Preview Recommendations Data

df_recommendations.head()

This cell previews the recommendations DataFrame.

It helps us check what recommendation data looks like before doing further analysis.

Cell 9 — Check Columns

print("Kolom Active Events:")
print(df_events.columns.tolist())

print("\nKolom Recommendations:")
print(df_recommendations.columns.tolist())

This cell displays the column names from both DataFrames.

This is important because we need to know what fields are available before performing analysis or visualization.

Cell 10 — Extract Summary Information

timestamp = global_impact_data["data"]["timestamp"]
overall_risk = global_impact_data["data"]["overallRisk"]
summary = global_impact_data["data"]["summary"]

print("Timestamp:", timestamp)
print("Overall Risk:", overall_risk)
print("Summary:", summary)

This cell extracts three important summary values from Global Impact Analysis.

timestamp shows when the data was generated. overall_risk shows the overall risk level. summary provides a short market summary.

Cell 11 — Visualize Global Impact Data Count

jumlah_global = {
    "Active Events": len(df_events),
    "Recommendations": len(df_recommendations)
}

plt.figure(figsize=(7, 5))
plt.bar(jumlah_global.keys(), jumlah_global.values())
plt.title("Jumlah Data Global Impact Analysis")
plt.xlabel("Kategori")
plt.ylabel("Jumlah Data")
plt.show()

This cell creates a bar chart comparing the number of active events and recommendations.

For beginners, this visualization helps show how much data exists in each Global Impact Analysis category.

Cell 12 — Monthly IPO Analysis

df_ipo["ipo_listing_date"] = pd.to_datetime(df_ipo["ipo_listing_date"], errors="coerce")

df_ipo_clean = df_ipo.dropna(subset=["ipo_listing_date"]).copy()

df_ipo_clean["bulan"] = df_ipo_clean["ipo_listing_date"].dt.to_period("M").astype(str)

ipo_bulanan = df_ipo_clean.groupby("bulan").size()

plt.figure(figsize=(12, 6))
ipo_bulanan.plot(kind="bar")
plt.title("Jumlah IPO per Bulan")
plt.xlabel("Bulan")
plt.ylabel("Jumlah IPO")
plt.xticks(rotation=45)
plt.show()

This cell analyzes IPO activity by month.

First, the IPO listing date is converted into datetime format. Invalid dates are removed. Then a new column called bulan is created to represent the month. Finally, the data is grouped by month and visualized as a bar chart.

This helps us see which months have more IPO activity.

Cell 13 — IPO Final Price Visualization

df_ipo["harga_ipo"] = df_ipo["ipo_price"].apply(
    lambda x: x.get("final") if isinstance(x, dict) else None
)

df_ipo["harga_ipo"] = pd.to_numeric(df_ipo["harga_ipo"], errors="coerce")

df_harga_ipo = df_ipo.dropna(subset=["harga_ipo"]).copy()

plt.figure(figsize=(12, 6))
plt.bar(df_harga_ipo["company_symbol"], df_harga_ipo["harga_ipo"])
plt.title("Harga Final IPO Berdasarkan Kode Saham")
plt.xlabel("Kode Saham")
plt.ylabel("Harga IPO")
plt.xticks(rotation=45)
plt.show()

This cell visualizes final IPO prices by stock symbol.

The code extracts the final price from the ipo_price dictionary, converts it into a numeric value, removes empty values, and creates a bar chart.

This helps compare IPO prices across different stock symbols.

Cell 14 — Top 10 IPO by Number of Shares

df_ipo["jumlah_saham"] = (
    df_ipo["ipo_data_detail"]
    .apply(lambda x: x.get("shares") if isinstance(x, dict) else None)
    .astype(str)
    .str.replace(",", "", regex=False)
)

df_ipo["jumlah_saham"] = pd.to_numeric(df_ipo["jumlah_saham"], errors="coerce")

top_saham_ipo = df_ipo.dropna(subset=["jumlah_saham"]).sort_values(
    "jumlah_saham", ascending=False
).head(10)

plt.figure(figsize=(12, 6))
plt.bar(top_saham_ipo["company_symbol"], top_saham_ipo["jumlah_saham"])
plt.title("Top 10 IPO Berdasarkan Jumlah Saham")
plt.xlabel("Kode Saham")
plt.ylabel("Jumlah Saham")
plt.xticks(rotation=45)
plt.show()

This cell finds and visualizes the top 10 IPOs based on the number of shares.

The code extracts the shares value from ipo_data_detail, removes commas, converts it into a number, sorts the data from largest to smallest, and displays the top 10 using a bar chart.

This helps identify which IPOs offered the largest number of shares.

Cell 15 — Final Analysis Summary

print("KESIMPULAN ANALISIS")
print("- Jumlah data IPO:", len(df_ipo))
print("- Jumlah active events:", len(df_events))
print("- Jumlah recommendations:", len(df_recommendations))
print("- Overall risk:", overall_risk)
print("- Summary:", summary)

This final cell prints the conclusion of the analysis.

It summarizes the total IPO data, total active events, total recommendations, overall risk, and global impact summary.

Result:

Result cell 15

Conclusion

ipo calendar global impact analysis Python API helps combine IPO activity with broader global market analysis. By using IPO Calendar data, we can understand IPO trends, final IPO prices, and the number of shares offered. By using Global Impact Analysis data, we can understand active events, recommendations, overall risk, and market summaries.

This notebook demonstrates a complete workflow: fetching API data, converting it into DataFrames, checking structure, creating visualizations, and printing final insights. The result is a beginner-friendly data analysis pipeline that can be expanded into dashboards, investment research tools, or financial monitoring systems.