Install
openclaw skills install ihsg-session-summaryIHSG Closing Summary Agent untuk OpenClaw. Menghasilkan laporan sesi pagi dan closing dengan Top 10 Net Buy/Sell, Foreign Flow, YTD data, dan insights dalam...
openclaw skills install ihsg-session-summaryihsg_session_summary| Session | Trading Hours | Closing | Agent Run | Cron |
|---|---|---|---|---|
| Session 1 (Morning) | 09:00 - 11:30 | 11:30 WIB | 12:30 WIB | 30 12 * * 1-5 |
| Session 2 (Closing) | 13:30 - 16:00 | 16:00 WIB | 16:30 WIB | 30 16 * * 1-5 |
Use this skill when:
IHSG Index Data
https://query1.finance.yahoo.com/v8/finance/chart/%5EJKSETop 10 Net Buy/Sell (via Tavily Search)
"top 10 net buy sell saham Indonesia hari ini""top foreign net buy sell IDX today"Foreign Flow Data (via Tavily Search + Extract)
"net foreign flow Bursa Efek Indonesia hari ini"YTD Foreign Flow (via Tavily Search)
"YTD foreign flow Indonesia stock exchange""akumulasi dana asing BEI tahun ini"Stock Price Changes (via Tavily Extract)
Set the TAVILY_API_KEY environment variable with your Tavily API key.
Get your API key from: https://app.tavily.com
cd ~/.openclaw/skills/ihsg-session-summary/scripts
python3 ihsg_session_extractor.py [morning|closing]
The script will indicate missing data. Use Tavily to fill gaps:
Tavily Search - For finding information:
from tavily import TavilyClient
import os
client = TavilyClient(api_key=os.environ.get("TAVILY_API_KEY"))
# Search for top net buy/sell
response = client.search(
query="top 10 net buy sell saham Indonesia hari ini",
search_depth="advanced",
max_results=10,
include_raw_content=True
)
# Search for foreign flow
response = client.search(
query="net foreign flow Bursa Efek Indonesia hari ini miliar",
search_depth="advanced",
max_results=10
)
Tavily Extract - For extracting content from URLs:
# Extract content from financial news sites
response = client.extract(
urls=["https://investasi.kontan.co.id/news/..."],
extract_depth="advanced"
)
Format output in PLAIN TEXT with ASCII tables.
IMPORTANT: Output must be in Bahasa Indonesia (Indonesian language)
Generate insights in Bahasa Indonesia:
from tavily import TavilyClient
import os
import json
client = TavilyClient(api_key=os.environ.get("TAVILY_API_KEY"))
# Search queries for different data
queries = [
"top 10 net buy sell saham Indonesia hari ini 2026",
"top foreign net buy sell IDX Indonesia today",
"net foreign flow Bursa Efek Indonesia hari ini miliar",
"YTD foreign flow Indonesia stock exchange 2026",
"akumulasi dana asing BEI tahun ini"
]
all_results = []
for query in queries:
response = client.search(
query=query,
search_depth="advanced",
max_results=10,
include_raw_content=True
)
all_results.extend(response.get('results', []))
# Extract detailed content from URLs found in search
urls_to_extract = [
"https://investasi.kontan.co.id/news/...",
"https://money.kompas.com/read/...",
"https://www.cnbcindonesia.com/market/..."
]
extracted = client.extract(
urls=urls_to_extract,
extract_depth="advanced"
)
for item in extracted.get('results', []):
content = item.get('raw_content', '')
# Parse content for stock data
# Get price changes for specific stocks
stock_codes = ["GOTO", "BUMI", "BMRI", "BBRI", "BBCA"]
for code in stock_codes:
response = client.search(
query=f"{code} stock price change Indonesia today",
search_depth="basic",
max_results=5
)
# Parse response for price change %
📊 IHSG PAGI SUMMARY
[Hari, Tanggal dalam Bahasa Indonesia]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[🟢/🔴] IHSG: [nilai] ([+/-]X.XX%)
Open: [nilai] | High: [nilai] | Low: [nilai]
Prev Close: [nilai]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 TOP 10 NET BUY (by Value)
┌────┬────────┬────────────┬───────────┬──────────┐
│ No │ Kode │ Net Value │ Net Vol │ Chg % │
├────┼────────┼────────────┼───────────┼──────────┤
│ 1 │ BBCA │ IDR 125.5B │ 45.2M │ +1.25% │
│ 2 │ TLKM │ IDR 98.3B │ 125.8M │ +0.85% │
... (10 stocks)
└────┴────────┴────────────┴───────────┴──────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 TOP 10 NET SELL (by Value)
┌────┬────────┬────────────┬───────────┬──────────┐
│ No │ Kode │ Net Value │ Net Vol │ Chg % │
├────┼────────┼────────────┼───────────┼──────────┤
│ 1 │ GOTO │ IDR 85.5B │ 180.5M │ -2.35% │
... (10 stocks)
└────┴────────┴────────────┴───────────┴──────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💰 FOREIGN FLOW
Foreign:
• Buy: IDR [X,XXX.X]B
• Sell: IDR [X,XXX.X]B
• Net: IDR [+/-XXX.X]B [📈INFLOW/📉OUTFLOW]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 INSIGHTS SESI PAGI
[ONE SHORT PARAGRAPH - 2-3 sentences max]
[Focus: What happened + What to watch in Session 2]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session: PAGI | Generated: [HH:MM] WIB
Data Source: Tavily API
📊 IHSG CLOSING SUMMARY
[Hari, Tanggal dalam Bahasa Indonesia]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[🟢/🔴] IHSG: [nilai] ([+/-]X.XX%)
Open: [nilai] | High: [nilai] | Low: [nilai]
Prev Close: [nilai]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 TOP 10 NET BUY (by Value)
... (same format)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 TOP 10 NET SELL (by Value)
... (same format)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💰 FOREIGN vs DOMESTIC FLOW
Foreign:
• Buy: IDR 8,250.5B
• Sell: IDR 8,500.2B
• Net: IDR -249.7B 📉 OUTFLOW
Domestic:
• Net: IDR +249.7B
YTD Foreign: IDR +2,459.7B
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 INSIGHTS CLOSING
[2-3 PARAGRAPHS - Full analysis]
[Paragraph 1: Full day summary + what happened]
[Paragraph 2: Connect the dots - patterns, rotation, themes]
[Paragraph 3: Outlook for tomorrow + actionable recommendations]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session: CLOSING | Generated: [HH:MM] WIB
Data Source: Tavily API
Length: 1 paragraph, 2-3 sentences max
Focus:
Length: 2-3 paragraphs
Structure:
Paragraph 1: The Big Picture
Paragraph 2: Connecting the Dots
Paragraph 3: Outlook & Actionable
{
"jobs": [
{
"name": "ihsg_session_morning",
"schedule": { "kind": "cron", "expr": "30 12 * * 1-5" },
"timezone": "Asia/Jakarta",
"prompt": "Use skill ihsg_session_summary to create MORNING session summary. Run extraction script first, then use Tavily API (search & extract) to fill any missing data. Generate SHORT insights (1 paragraph) in Bahasa Indonesia.",
"enabled": true
},
{
"name": "ihsg_session_closing",
"schedule": { "kind": "cron", "expr": "30 16 * * 1-5" },
"timezone": "Asia/Jakarta",
"prompt": "Use skill ihsg_session_summary to create CLOSING session summary. Run extraction script first, then use Tavily API (search & extract) to fill any missing data (Top 10, Foreign Flow, YTD, Price Changes). Generate FULL insights (2-3 paragraphs) in Bahasa Indonesia.",
"enabled": true
}
]
}
~/.openclaw/
├── skills/
│ └── ihsg-session-summary/
│ ├── SKILL.md
│ └── scripts/
│ ├── ihsg_session_extractor.py
│ └── requirements.txt
└── cron/
└── jobs.json
# 1. Create skill directory
mkdir -p ~/.openclaw/skills/ihsg-session-summary/scripts
# 2. Copy files
cp SKILL.md ~/.openclaw/skills/ihsg-session-summary/
cp ihsg_session_extractor.py ~/.openclaw/skills/ihsg-session-summary/scripts/
cp requirements.txt ~/.openclaw/skills/ihsg-session-summary/scripts/
# 3. Install dependencies
cd ~/.openclaw/skills/ihsg-session-summary/scripts
pip install -r requirements.txt
# 4. Set Tavily API key (use your actual key)
# On Linux/Mac: export TAVILY_API_KEY="your-key"
# On Windows: set TAVILY_API_KEY=your-key
# 5. Test
python3 ihsg_session_extractor.py morning
python3 ihsg_session_extractor.py closing
| Plan | Searches/month | Price |
|---|---|---|
| Free | 1,000 | $0 |
| Pro | 10,000 | $29/mo |
| Enterprise | Unlimited | Custom |
For IHSG session summaries (2x daily on weekdays):