Skip to main content

Build Status license Documentation Status Gitter PyPI version Python Versions

Donate

Quickstart

pip install FinMind

LLM / AI 整合

想用 ChatGPT、Claude 等 AI 工具查詢 FinMind 的資料集和 API 用法?我們提供 llms.txt,讓 AI 快速理解 FinMind 的所有資料集、API 端點與使用方式。

只要將以下連結貼給你的 AI 助手,即可開始對話:

  • llms.txt — 精簡版,資料集索引與 API 概覽
  • llms-full.txt — 完整版,包含所有資料集的欄位名稱、SDK 方法、參數範例
  • Agent Skill 教學 — 讓 AI Agent(如 Claude Code)直接查詢 FinMind 資料

這是什麼?

FinMind 是超過 50 種金融開源數據 50 datasets。 包含

  • 技術面 : 台股股價 daily、即時報價、歷史 tick、PER、PBR、每5秒委託成交統計、加權指數、當日沖銷交易標的及成交量值。
  • 基本面 : 綜合損益表、現金流量表、資產負債表、股利政策表、除權除息結果表、月營收。
  • 籌碼面 : 外資持股、股權分散表、融資融券、三大法人買賣、借券成交明細。
  • 消息面 : 台股相關新聞。
  • 衍生性商品 : 期貨、選擇權 daily data、即時報價、交易明細,選擇權、期貨三大法人買賣,期貨各卷商每日交易、選擇權各卷商每日交易。
  • 國際市場 : 美股股價 daily、minute、美國債券殖利率、貨幣發行量(美國)、黃金價格、原油價格、G8 央行利率、G8 匯率、

資料每天更新。你不需收集資料,就可進行分析。

What is this?

FinMind is open source of more than 50 datasets, including

Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~ now, more than 30 million data in total), Financial Statements, Balance Sheet, Cash Flows Statement, Month Revenue, Holding Shares Per, Institutional Investors Buy Sell. Taiwan Futures Trade Detail, Taiwan Option Trade Detail.

US stock price daily, minute (2019-06-01 ~ now, more than 80 million data in total), oil price, gold price, G7 exchange rate, interest rate.

US Government Bonds Yield.

The datasets are automatically updated daily. You can analyze financial data without having to collect the data by yourself.


License

  • License Detail

  • 本專案提供的所有內容均用於教育、非商業用途。資料僅供參考,使用者依本資料交易發生交易損失需自行負責,本專案不對資料內容錯誤、更新延誤或傳輸中斷負任何責任。

Project of Contents

Plotting

kbar_plotting.ipynb

# 取得股價
from FinMind.data import DataLoader

dl = DataLoader()
# 下載台股股價資料
stock_data = dl.taiwan_stock_daily(
    stock_id='2609', start_date='2018-01-01', end_date='2021-06-26'
)
# 下載三大法人資料
stock_data = dl.feature.add_kline_institutional_investors(
    stock_data
) 
# 下載融資券資料
stock_data = dl.feature.add_kline_margin_purchase_short_sale(
    stock_data
)

# 繪製k線圖
from FinMind import plotting

plotting.kline(stock_data)

gif

dashboard

png

Contact

Email: FinMind.TW@gmail.com

每週日早上零點至早上七點為維護時間,不提供服務。

Note

  • 未來預計新增更多功能,包含個人化回測分析、chatbot 監控策略,
  • API Request 上限:300 / 小時。
  • Limit amount of request, 300 / hour.
  • FinMind官網註冊並驗證信箱後,API 的 Request 加上 token 參數可以提高使用上限到 600/hr。
  • token 獲取方法,可在官網登入後獲取。

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finmind-2.0.5.tar.gz (61.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finmind-2.0.5-py3-none-any.whl (76.2 kB view details)

Uploaded Python 3

File details

Details for the file finmind-2.0.5.tar.gz.

File metadata

  • Download URL: finmind-2.0.5.tar.gz
  • Upload date:
  • Size: 61.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for finmind-2.0.5.tar.gz
Algorithm Hash digest
SHA256 a781428301514231af81cc4b7a94ad1a1550ff9e709801d849e388e6792738ce
MD5 9d1814be4ff2d8e0e1ffa5cf16af5a6d
BLAKE2b-256 72ea03964d7c9c4f547c7c915906c7ba0cbd8b1fa015f3374b139f1937481692

See more details on using hashes here.

File details

Details for the file finmind-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: finmind-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 76.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for finmind-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6ef2d0b11c3b0b1ba083420fe67d85556cc2f49f84fd8e543feae286b1a7b1ed
MD5 9e859736c3e84219c4a122bbc6380299
BLAKE2b-256 592eafae2c359287893541c7503a2e4ad6756fcc6bacefcf61edb6c73cfee1e9

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page