Atlas 技術版 > 三大法人買賣超每日更新

三大法人買賣超每日更新 NO_AGENT P0 risk=CRITICAL

1. 做什麼 / 2. 為什麼存在

三大法人買賣超每日更新:TWSE/TPEx 爬蟲寫入 shioaji_kline.db 的 stock_institutional 表,是層零過濾器與多個下游的關鍵資料生產者。

3. Schedule / Mode

mode=NO_AGENT state=scheduled enabled=1
schedule=30 17 * * 1-5
next_run=2026-10-21T17:30:00 last_run=2026-10-20T17:31:53
deliver=local model=— provider=—

4. Implementation

script=/Users/exion/.hermes/scripts/fetch_institutional.py
monitor_script=— monitor_url=—
skills=[]
workdir=—

5. Effective instruction sources

prompt_sha256=99f0d507b76afed4… chars=329
skill_files={}

執行三大法人買賣超資料更新腳本。

執行命令:python3 ~/.hermes/scripts/fetch_institutional.py

這個腳本會:
1. 從 TWSE T86 API 爬上市股票三大法人買賣超
2. 從 TPEx 新版 API (POST /www/zh-tw/insti/dailyTrade) 爬櫃買股票三大法人買賣超
3. 只存關注清單內的股票到 ~/.hermes/data/shioaji_kline.db 的 stock_institutional 資料表

執行完畢後,根據執行結果回覆以下格式(僅此一行,不要多說):
- 成功:「✅ 三大法人資料更新完成」
- 失敗:「❌ 三大法人資料更新失敗:[簡短錯誤原因]」…

6. Actual rules / thresholds

rulevaluesource
none extracted

7/8. Inputs & Outputs (resources)

kindpathnameaccess
SQLITE_TABLEselfstock_institutionalread
SQLITE_TABLEselfstock_institutionalwrite
FILE_WRITEwrite
MODULE/Users/exion/.hermes/lib/db_config.pydb_configimport
MODULE/Users/exion/.hermes/lib/trading_calendar.pytrading_calendarimport

9/10. Upstream / Downstream

Upstream: shioaji-holdings-sync、個股融資資料爬取
Downstream: 層零市場風險過濾器、每日帳戶資產記錄、E7×C20 影子策略每日 EOD(ingest→雙帳→月報→通知)、Shioaji每日股價抓取、E7 Control vs C20 Prospective Lifetime Shadow、13:07 盤中狀態通知、系統健康檢查、DAILY_E7_FORMAL 每日正式訊號、處置股票狀態查詢、TH-0154 Runner參考線自然驗收讀回(一次)、定錨追蹤變動通知、Intraday Holdings Risk Owner、早盤風向-0945、持股同步觀察清單、盤中13:00帶量長紅K掃描
Transitive downstream (8): 週日長紅K回測報告(現行規則:停損+20MA停利) (68ea49353330)、盤中持股即時快照1300 (d94622a2d6b8)、13:08 盤中決策摘要資料準備 (8f2a6c1d9b44)、13:09 盤中決策摘要 (b7d94e3a1c20)、Prospective Shadow Exit Runner Intraday (b4937395cbb3)、Discovery Entry Observation Runtime (c5c5e8b6e055)、Prospective Shadow Exit Runner Close (7d5d77ea5e13)、Discovery FORMAL Fundamental Dingmao Review (904870b67948)

Edges (typed evidence)

typehard?fromtoresourceoriginconfevidence
DATAsoft三大法人買賣超每日更新層零市場風險過濾器sqlite:stock_institutionalSTATIC0.75table 'stock_institutional' write@d768546515da(line 219) -> read@11c1041f48b4(line 30)
DATAsoft三大法人買賣超每日更新系統健康檢查sqlite:stock_institutionalSTATIC0.75table 'stock_institutional' write@d768546515da(line 219) -> read@565ad371fad2(line 92)
DATAhardshioaji-holdings-sync三大法人買賣超每日更新~/.hermes/data/stock_list.jsonMANIFEST1.0manifest data contract '~/.hermes/data/stock_list.json' output(70a918c3f294.json) -> input(d768546515da.json)
CODEsoft三大法人買賣超每日更新每日帳戶資產記錄module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新E7×C20 影子策略每日 EOD(ingest→雙帳→月報→通知)module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新Shioaji每日股價抓取module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新E7 Control vs C20 Prospective Lifetime Shadowmodule:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新13:07 盤中狀態通知module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新DAILY_E7_FORMAL 每日正式訊號module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新處置股票狀態查詢module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新TH-0154 Runner參考線自然驗收讀回(一次)module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新Intraday Holdings Risk Ownermodule:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新早盤風向-0945module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新持股同步觀察清單module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新盤中13:00帶量長紅K掃描module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft個股融資資料爬取三大法人買賣超每日更新module:trading_calendarSTATIC0.6both scripts import shared module 'trading_calendar'
CODEsoft三大法人買賣超每日更新Shioaji每日股價抓取module:db_configSTATIC0.6both scripts import shared module 'db_config'
CODEsoft三大法人買賣超每日更新定錨追蹤變動通知module:db_configSTATIC0.6both scripts import shared module 'db_config'

11. Shared resources

12. Recent executions

failure_streak=0
last_error=—
delivery_error=—

14. Drift history

16. Impact / change risk

change_risk=CRITICAL