Files
easy-tdx/examples/08_fund_flow/history_fund_flow.py
T
Justin Gu 02701952ca feat: merge datetime fields in DataFrame output, hide MinuteBar internal fields
- K-line: daily+ periods output 'date' only, minute periods output 'datetime'
- Transactions (tick-by-tick): combine date param + hour/minute into 'datetime'
- XdxrRecord, HistoricalFundFlow: year/month/day merged to 'date'
- MinuteBar: rename unknown_1 to _unknown_1 (hidden from DataFrame)
- MinuteBar: add datetime column computed from bar index (A-share 240-bar pattern)
- get_minute_time_data: use history endpoint only (current-day endpoint broken in pytdx too)
- Update all examples to reflect new DataFrame column names
2026-05-22 04:19:07 +08:00

9 lines
305 B
Python

"""演示:获取个股历史日线资金流向序列。"""
from easy_tdx import Market, TdxClient
with TdxClient.from_best_host() as c:
df = c.get_history_fund_flow(Market.SH, "600519", 0, 10)
print(f"贵州茅台 历史资金流向,共 {len(df)} 天:")
print(df.to_string(index=False))