yfinance for Openclaw

A specialized financial tool for fetching live and historical stock data from Yahoo Finance with optimized support for Indonesian markets.

temmyraharjo
v1.0.4
Apr 26, 2026
0
1.5k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install yfinance

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install yfinance using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is yfinance?

The yfinance skill is a robust integration designed to provide AI agents with direct access to global financial markets, with a specific optimization for the Indonesia Stock Exchange (IDX). By leveraging a local FastAPI server, this Openclaw Skills component allows for low-latency retrieval of stock prices, company fundamentals, and historical performance data. It streamlines the data fetching process by automatically handling ticker suffixes, ensuring that users can query Indonesian stocks using simple names like BBCA or TLKM without needing to manually append exchange codes.

yfinance Use Cases

  • Tracking real-time price movements for major Indonesian stocks like BBCA, BBRI, and GOTO.
  • Analyzing historical OHLCV (Open, High, Low, Close, Volume) data to identify market trends.
  • Reviewing company health through fundamental metrics such as P/E ratios, market capitalization, and ROE.
  • Monitoring dividend distributions and historical stock splits for long-term investment planning.
  • Powering automated financial research reports within Openclaw Skills ecosystems.

How yfinance Works

  1. The AI agent identifies a stock-related query and checks if the local FastAPI server is active.
  2. If the server is offline, the agent executes a startup command to launch the FastAPI application on port 8000.
  3. The agent processes the ticker symbol, automatically appending .JK for Indonesian stocks unless specified otherwise.
  4. A GET request is sent to the specific endpoint (e.g., /price or /fundamentals) corresponding to the user's request.
  5. The skill retrieves data via the yfinance library, processes it into JSON, and returns a formatted response for the user.

yfinance Setup

To set up the yfinance skill for Openclaw Skills, ensure you have python3 and curl installed, then follow these steps:

# Install the necessary python package
pip install yfinance fastapi uvicorn

# Navigate to the skill directory and start the server
cd ~/.openclaw/workspace/skills/yfinance
uvicorn main:app --host 0.0.0.0 --port 8000 --reload &

# Verify the server is running
curl http://localhost:8000/

yfinance Data Schema & Taxonomy

The skill organizes financial data through a structured API with the following schema:

Endpoint Data Returned Key Parameters
/price Real-time ticker price and change ticker
/history Historical OHLCV data ticker, period, interval
/fundamentals P/E ratio, Market Cap, EPS, ROE ticker
/dividends Historical dividend payout data ticker
/splits History of stock splits ticker

By default, any ticker provided without a dot suffix is treated as an IDX stock (appending .JK). You can disable this by setting auto_jk=false in the query string.

yfinance Advanced Features

  • Automatic IDX Resolution: Seamlessly handles Indonesian tickers without requiring exchange suffixes.
  • Flexible Timeframes: Supports multiple historical periods ranging from 1 day to maximum available data.
  • Comprehensive Fundamentals: Access deep company metrics beyond just the current price.
  • Local Server Architecture: Provides a high-performance bridge between Openclaw Skills and external financial APIs.
  • Language Sensitivity: Automatically detects and responds in Bahasa Indonesia if the original query is in that language.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*